From 9e869d29e62e36b7eb6fb238a4ca6a6237e7d78b Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Wed, 15 Feb 2023 18:31:09 -0500 Subject: [PATCH] Copilot.vim 1.8.3 --- autoload/copilot.vim | 34 +++++++++++++++++++++++++--------- autoload/copilot/agent.vim | 2 +- copilot/dist/agent.js | 6 +++--- syntax/copilot.vim | 19 +++++++++++++++++++ 4 files changed, 48 insertions(+), 13 deletions(-) create mode 100644 syntax/copilot.vim diff --git a/autoload/copilot.vim b/autoload/copilot.vim index d5cbfcc9..2dd81f60 100644 --- a/autoload/copilot.vim +++ b/autoload/copilot.vim @@ -19,6 +19,14 @@ if s:has_vim_ghost_text && empty(prop_type_get(s:annot_hlgroup)) call prop_type_add(s:annot_hlgroup, {'highlight': s:annot_hlgroup}) endif +function! s:Echo(msg) abort + if has('nvim') && &cmdheight == 0 + call v:lua.vim.notify(a:msg, v:null, {'title': 'GitHub Copilot'}) + else + echo a:msg + endif +endfunction + function! s:EditorConfiguration() abort let filetypes = copy(s:filetype_defaults) if type(get(g:, 'copilot_filetypes')) == v:t_dict @@ -26,7 +34,7 @@ function! s:EditorConfiguration() abort endif return { \ 'enableAutoCompletions': empty(get(g:, 'copilot_enabled', 1)) ? v:false : v:true, - \ 'disabledLanguages': map(sort(keys(filter(filetypes, { k, v -> empty(v) ? v:true : v:false }))), { _, v -> {'languageId': v}}), + \ 'disabledLanguages': map(sort(keys(filter(filetypes, { k, v -> empty(v) }))), { _, v -> {'languageId': v}}), \ } endfunction @@ -199,6 +207,11 @@ function! s:SuggestionTextWithAdjustments() abort endif let typed = strpart(line, 0, offset) let delete = strpart(line, offset) + if choice.range.end.line == line('.') - 1 && choice.range.end.character < copilot#doc#UTF16Width(line) + let append = delete + else + let append = '' + endif let uuid = get(choice, 'uuid', '') if typed =~# '^\s*$' let leading = matchstr(choice.text, '^\s\+') @@ -207,7 +220,7 @@ function! s:SuggestionTextWithAdjustments() abort return [unindented, len(typed) - len(leading), strchars(delete), uuid] endif elseif typed ==# strpart(choice.text, 0, offset) - return [strpart(choice.text . delete, offset), 0, strchars(delete), uuid] + return [strpart(choice.text . append, offset), 0, strchars(delete), uuid] endif catch call copilot#logger#Exception() @@ -439,6 +452,9 @@ endfunction function! copilot#OnInsertEnter() abort let s:is_mapped = copilot#IsMapped() let s:dest = bufnr('^copilot://$') + if s:dest > 0 && bufwinnr(s:dest) < 0 + let s:dest = -1 + endif if s:dest < 0 && !s:has_ghost_text let s:dest = 0 endif @@ -622,16 +638,16 @@ function! s:commands.setup(opts) abort let @+ = data.userCode let @* = data.userCode endif - echo "First copy your one-time code: " . data.userCode + call s:Echo("First copy your one-time code: " . data.userCode) try if len(&mouse) let mouse = &mouse set mouse= endif if get(a:opts, 'bang') - echo "In your browser, visit " . uri + call s:Echo("In your browser, visit " . uri) elseif len(browser) - echo "Press ENTER to open GitHub in your browser" + call s:Echo("Press ENTER to open GitHub in your browser") let c = getchar() while c isnot# 13 && c isnot# 10 && c isnot# 0 let c = getchar() @@ -643,14 +659,14 @@ function! s:commands.setup(opts) abort sleep 10m endwhile if get(status, 'code', browser[0] !=# 'xdg-open') != 0 - echo "Failed to open browser. Visit " . uri + call s:Echo("Failed to open browser. Visit " . uri) else - echo "Opened " . uri + call s:Echo("Opened " . uri) endif else - echo "Could not find browser. Visit " . uri + call s:Echo("Could not find browser. Visit " . uri) endif - echo "Waiting (could take up to 5 seconds)" + call s:Echo("Waiting (could take up to 5 seconds)") let request = copilot#Request('signInConfirm', {'userCode': data.userCode}).Wait() finally if exists('mouse') diff --git a/autoload/copilot/agent.vim b/autoload/copilot/agent.vim index 3e4ee8b8..38abbb9b 100644 --- a/autoload/copilot/agent.vim +++ b/autoload/copilot/agent.vim @@ -5,7 +5,7 @@ let g:autoloaded_copilot_agent = 1 scriptencoding utf-8 -let s:plugin_version = '1.8.2' +let s:plugin_version = '1.8.3' let s:error_exit = -1 diff --git a/copilot/dist/agent.js b/copilot/dist/agent.js index 7c6d7a49..3a17e70f 100644 --- a/copilot/dist/agent.js +++ b/copilot/dist/agent.js @@ -1,9 +1,9 @@ /*! For license information please see agent.js.LICENSE.txt */ -(()=>{var e={23870:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.Trace=t.ProgressType=t.createMessageConnection=t.NullLogger=t.ConnectionOptions=t.ConnectionStrategy=t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=t.CancellationToken=t.CancellationTokenSource=t.Emitter=t.Event=t.Disposable=t.ParameterStructures=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.ErrorCodes=t.ResponseError=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType0=t.RequestType=t.RAL=void 0,t.CancellationStrategy=void 0;const n=r(20839);Object.defineProperty(t,"RequestType",{enumerable:!0,get:function(){return n.RequestType}}),Object.defineProperty(t,"RequestType0",{enumerable:!0,get:function(){return n.RequestType0}}),Object.defineProperty(t,"RequestType1",{enumerable:!0,get:function(){return n.RequestType1}}),Object.defineProperty(t,"RequestType2",{enumerable:!0,get:function(){return n.RequestType2}}),Object.defineProperty(t,"RequestType3",{enumerable:!0,get:function(){return n.RequestType3}}),Object.defineProperty(t,"RequestType4",{enumerable:!0,get:function(){return n.RequestType4}}),Object.defineProperty(t,"RequestType5",{enumerable:!0,get:function(){return n.RequestType5}}),Object.defineProperty(t,"RequestType6",{enumerable:!0,get:function(){return n.RequestType6}}),Object.defineProperty(t,"RequestType7",{enumerable:!0,get:function(){return n.RequestType7}}),Object.defineProperty(t,"RequestType8",{enumerable:!0,get:function(){return n.RequestType8}}),Object.defineProperty(t,"RequestType9",{enumerable:!0,get:function(){return n.RequestType9}}),Object.defineProperty(t,"ResponseError",{enumerable:!0,get:function(){return n.ResponseError}}),Object.defineProperty(t,"ErrorCodes",{enumerable:!0,get:function(){return n.ErrorCodes}}),Object.defineProperty(t,"NotificationType",{enumerable:!0,get:function(){return n.NotificationType}}),Object.defineProperty(t,"NotificationType0",{enumerable:!0,get:function(){return n.NotificationType0}}),Object.defineProperty(t,"NotificationType1",{enumerable:!0,get:function(){return n.NotificationType1}}),Object.defineProperty(t,"NotificationType2",{enumerable:!0,get:function(){return n.NotificationType2}}),Object.defineProperty(t,"NotificationType3",{enumerable:!0,get:function(){return n.NotificationType3}}),Object.defineProperty(t,"NotificationType4",{enumerable:!0,get:function(){return n.NotificationType4}}),Object.defineProperty(t,"NotificationType5",{enumerable:!0,get:function(){return n.NotificationType5}}),Object.defineProperty(t,"NotificationType6",{enumerable:!0,get:function(){return n.NotificationType6}}),Object.defineProperty(t,"NotificationType7",{enumerable:!0,get:function(){return n.NotificationType7}}),Object.defineProperty(t,"NotificationType8",{enumerable:!0,get:function(){return n.NotificationType8}}),Object.defineProperty(t,"NotificationType9",{enumerable:!0,get:function(){return n.NotificationType9}}),Object.defineProperty(t,"ParameterStructures",{enumerable:!0,get:function(){return n.ParameterStructures}});const i=r(83911);Object.defineProperty(t,"Disposable",{enumerable:!0,get:function(){return i.Disposable}});const o=r(27135);Object.defineProperty(t,"Event",{enumerable:!0,get:function(){return o.Event}}),Object.defineProperty(t,"Emitter",{enumerable:!0,get:function(){return o.Emitter}});const s=r(13881);Object.defineProperty(t,"CancellationTokenSource",{enumerable:!0,get:function(){return s.CancellationTokenSource}}),Object.defineProperty(t,"CancellationToken",{enumerable:!0,get:function(){return s.CancellationToken}});const a=r(56525);Object.defineProperty(t,"MessageReader",{enumerable:!0,get:function(){return a.MessageReader}}),Object.defineProperty(t,"AbstractMessageReader",{enumerable:!0,get:function(){return a.AbstractMessageReader}}),Object.defineProperty(t,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return a.ReadableStreamMessageReader}});const c=r(96654);Object.defineProperty(t,"MessageWriter",{enumerable:!0,get:function(){return c.MessageWriter}}),Object.defineProperty(t,"AbstractMessageWriter",{enumerable:!0,get:function(){return c.AbstractMessageWriter}}),Object.defineProperty(t,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return c.WriteableStreamMessageWriter}});const l=r(61343);Object.defineProperty(t,"ConnectionStrategy",{enumerable:!0,get:function(){return l.ConnectionStrategy}}),Object.defineProperty(t,"ConnectionOptions",{enumerable:!0,get:function(){return l.ConnectionOptions}}),Object.defineProperty(t,"NullLogger",{enumerable:!0,get:function(){return l.NullLogger}}),Object.defineProperty(t,"createMessageConnection",{enumerable:!0,get:function(){return l.createMessageConnection}}),Object.defineProperty(t,"ProgressType",{enumerable:!0,get:function(){return l.ProgressType}}),Object.defineProperty(t,"Trace",{enumerable:!0,get:function(){return l.Trace}}),Object.defineProperty(t,"TraceFormat",{enumerable:!0,get:function(){return l.TraceFormat}}),Object.defineProperty(t,"SetTraceNotification",{enumerable:!0,get:function(){return l.SetTraceNotification}}),Object.defineProperty(t,"LogTraceNotification",{enumerable:!0,get:function(){return l.LogTraceNotification}}),Object.defineProperty(t,"ConnectionErrors",{enumerable:!0,get:function(){return l.ConnectionErrors}}),Object.defineProperty(t,"ConnectionError",{enumerable:!0,get:function(){return l.ConnectionError}}),Object.defineProperty(t,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return l.CancellationReceiverStrategy}}),Object.defineProperty(t,"CancellationSenderStrategy",{enumerable:!0,get:function(){return l.CancellationSenderStrategy}}),Object.defineProperty(t,"CancellationStrategy",{enumerable:!0,get:function(){return l.CancellationStrategy}});const u=r(30147);t.RAL=u.default},13881:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;const n=r(30147),i=r(67574),o=r(27135);var s;!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:o.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:o.Event.None}),e.is=function(t){const r=t;return r&&(r===e.None||r===e.Cancelled||i.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}}(s=t.CancellationToken||(t.CancellationToken={}));const a=Object.freeze((function(e,t){const r=n.default().timer.setTimeout(e.bind(t),0);return{dispose(){n.default().timer.clearTimeout(r)}}}));class c{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?a:(this._emitter||(this._emitter=new o.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}}t.CancellationTokenSource=class{get token(){return this._token||(this._token=new c),this._token}cancel(){this._token?this._token.cancel():this._token=s.Cancelled}dispose(){this._token?this._token instanceof c&&this._token.dispose():this._token=s.None}}},61343:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.ConnectionOptions=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.ConnectionStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.Trace=t.NullLogger=t.ProgressType=void 0;const n=r(30147),i=r(67574),o=r(20839),s=r(96184),a=r(27135),c=r(13881);var l,u,d,p,h,f,g,m,y,v,_,b,w;!function(e){e.type=new o.NotificationType("$/cancelRequest")}(l||(l={})),function(e){e.type=new o.NotificationType("$/progress")}(u||(u={})),t.ProgressType=class{constructor(){}},function(e){e.is=function(e){return i.func(e)}}(d||(d={})),t.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}}),function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Verbose=2]="Verbose"}(p=t.Trace||(t.Trace={})),function(e){e.fromString=function(t){if(!i.string(t))return e.Off;switch(t=t.toLowerCase()){case"off":default:return e.Off;case"messages":return e.Messages;case"verbose":return e.Verbose}},e.toString=function(t){switch(t){case e.Off:return"off";case e.Messages:return"messages";case e.Verbose:return"verbose";default:return"off"}}}(p=t.Trace||(t.Trace={})),function(e){e.Text="text",e.JSON="json"}(t.TraceFormat||(t.TraceFormat={})),function(e){e.fromString=function(t){return"json"===(t=t.toLowerCase())?e.JSON:e.Text}}(h=t.TraceFormat||(t.TraceFormat={})),function(e){e.type=new o.NotificationType("$/setTrace")}(f=t.SetTraceNotification||(t.SetTraceNotification={})),function(e){e.type=new o.NotificationType("$/logTrace")}(g=t.LogTraceNotification||(t.LogTraceNotification={})),function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"}(m=t.ConnectionErrors||(t.ConnectionErrors={}));class C extends Error{constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,C.prototype)}}t.ConnectionError=C,function(e){e.is=function(e){const t=e;return t&&i.func(t.cancelUndispatched)}}(y=t.ConnectionStrategy||(t.ConnectionStrategy={})),function(e){e.Message=Object.freeze({createCancellationTokenSource:e=>new c.CancellationTokenSource}),e.is=function(e){const t=e;return t&&i.func(t.createCancellationTokenSource)}}(v=t.CancellationReceiverStrategy||(t.CancellationReceiverStrategy={})),function(e){e.Message=Object.freeze({sendCancellation(e,t){e.sendNotification(l.type,{id:t})},cleanup(e){}}),e.is=function(e){const t=e;return t&&i.func(t.sendCancellation)&&i.func(t.cleanup)}}(_=t.CancellationSenderStrategy||(t.CancellationSenderStrategy={})),function(e){e.Message=Object.freeze({receiver:v.Message,sender:_.Message}),e.is=function(e){const t=e;return t&&v.is(t.receiver)&&_.is(t.sender)}}(b=t.CancellationStrategy||(t.CancellationStrategy={})),(t.ConnectionOptions||(t.ConnectionOptions={})).is=function(e){const t=e;return t&&(b.is(t.cancellationStrategy)||y.is(t.connectionStrategy))},function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"}(w||(w={})),t.createMessageConnection=function(e,r,y,v){const _=void 0!==y?y:t.NullLogger;let E=0,T=0,S=0;const x="2.0";let k;const I=Object.create(null);let A;const P=Object.create(null),R=new Map;let N,O,D=new s.LinkedMap,L=Object.create(null),M=Object.create(null),B=p.Off,F=h.Text,j=w.New;const U=new a.Emitter,$=new a.Emitter,q=new a.Emitter,H=new a.Emitter,V=new a.Emitter,z=v&&v.cancellationStrategy?v.cancellationStrategy:b.Message;function K(e){if(null===e)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+e.toString()}function W(e){}function G(){return j===w.Listening}function Q(){return j===w.Closed}function Y(){return j===w.Disposed}function J(){j!==w.New&&j!==w.Listening||(j=w.Closed,$.fire(void 0))}function X(){N||0===D.size||(N=n.default().timer.setImmediate((()=>{N=void 0,function(){if(0===D.size)return;const e=D.shift();try{o.isRequestMessage(e)?function(e){if(Y())return;function t(t,n,i){const s={jsonrpc:x,id:e.id};t instanceof o.ResponseError?s.error=t.toJson():s.result=void 0===t?null:t,ee(s,n,i),r.write(s)}function n(t,n,i){const o={jsonrpc:x,id:e.id,error:t.toJson()};ee(o,n,i),r.write(o)}!function(e){if(B!==p.Off&&O)if(F===h.Text){let t;B===p.Verbose&&e.params&&(t=`Params: ${JSON.stringify(e.params,null,4)}\n\n`),O.log(`Received request '${e.method} - (${e.id})'.`,t)}else te("receive-request",e)}(e);const s=I[e.method];let a,c;s&&(a=s.type,c=s.handler);const l=Date.now();if(c||k){const s=String(e.id),u=z.receiver.createCancellationTokenSource(s);M[s]=u;try{let d;if(c)if(void 0===e.params){if(void 0!==a&&0!==a.numberOfParams)return void n(new o.ResponseError(o.ErrorCodes.InvalidParams,`Request ${e.method} defines ${a.numberOfParams} params but recevied none.`),e.method,l);d=c(u.token)}else if(Array.isArray(e.params)){if(void 0!==a&&a.parameterStructures===o.ParameterStructures.byName)return void n(new o.ResponseError(o.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by name but received parameters by position`),e.method,l);d=c(...e.params,u.token)}else{if(void 0!==a&&a.parameterStructures===o.ParameterStructures.byPosition)return void n(new o.ResponseError(o.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by position but received parameters by name`),e.method,l);d=c(e.params,u.token)}else k&&(d=k(e.method,e.params,u.token));const p=d;d?p.then?p.then((r=>{delete M[s],t(r,e.method,l)}),(t=>{delete M[s],t instanceof o.ResponseError?n(t,e.method,l):t&&i.string(t.message)?n(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,l):n(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,l)})):(delete M[s],t(d,e.method,l)):(delete M[s],function(t,n,i){void 0===t&&(t=null);const o={jsonrpc:x,id:e.id,result:t};ee(o,n,i),r.write(o)}(d,e.method,l))}catch(r){delete M[s],r instanceof o.ResponseError?t(r,e.method,l):r&&i.string(r.message)?n(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${r.message}`),e.method,l):n(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,l)}}else n(new o.ResponseError(o.ErrorCodes.MethodNotFound,`Unhandled method ${e.method}`),e.method,l)}(e):o.isNotificationMessage(e)?function(e){if(Y())return;let t,r;if(e.method===l.type.method)r=e=>{const t=e.id,r=M[String(t)];r&&r.cancel()};else{const n=P[e.method];n&&(r=n.handler,t=n.type)}if(r||A)try{!function(e){if(B!==p.Off&&O&&e.method!==g.type.method)if(F===h.Text){let t;B===p.Verbose&&(t=e.params?`Params: ${JSON.stringify(e.params,null,4)}\n\n`:"No parameters provided.\n\n"),O.log(`Received notification '${e.method}'.`,t)}else te("receive-notification",e)}(e),r?void 0===e.params?(void 0!==t&&0!==t.numberOfParams&&t.parameterStructures!==o.ParameterStructures.byName&&_.error(`Notification ${e.method} defines ${t.numberOfParams} params but recevied none.`),r()):Array.isArray(e.params)?(void 0!==t&&(t.parameterStructures===o.ParameterStructures.byName&&_.error(`Notification ${e.method} defines parameters by name but received parameters by position`),t.numberOfParams!==e.params.length&&_.error(`Notification ${e.method} defines ${t.numberOfParams} params but received ${e.params.length} argumennts`)),r(...e.params)):(void 0!==t&&t.parameterStructures===o.ParameterStructures.byPosition&&_.error(`Notification ${e.method} defines parameters by position but received parameters by name`),r(e.params)):A&&A(e.method,e.params)}catch(t){t.message?_.error(`Notification handler '${e.method}' failed with message: ${t.message}`):_.error(`Notification handler '${e.method}' failed unexpectedly.`)}else q.fire(e)}(e):o.isResponseMessage(e)?function(e){if(!Y())if(null===e.id)e.error?_.error(`Received response message without id: Error is: \n${JSON.stringify(e.error,void 0,4)}`):_.error("Received response message without id. No further error information provided.");else{const t=String(e.id),r=L[t];if(function(e,t){if(B!==p.Off&&O)if(F===h.Text){let r;if(B===p.Verbose&&(e.error&&e.error.data?r=`Error data: ${JSON.stringify(e.error.data,null,4)}\n\n`:e.result?r=`Result: ${JSON.stringify(e.result,null,4)}\n\n`:void 0===e.error&&(r="No result returned.\n\n")),t){const n=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:"";O.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${n}`,r)}else O.log(`Received response ${e.id} without active response promise.`,r)}else te("receive-response",e)}(e,r),r){delete L[t];try{if(e.error){const t=e.error;r.reject(new o.ResponseError(t.code,t.message,t.data))}else{if(void 0===e.result)throw new Error("Should never happen.");r.resolve(e.result)}}catch(e){e.message?_.error(`Response handler '${r.method}' failed with message: ${e.message}`):_.error(`Response handler '${r.method}' failed unexpectedly.`)}}}}(e):function(e){if(!e)return void _.error("Received empty message.");_.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(e,null,4)}`);const t=e;if(i.string(t.id)||i.number(t.id)){const e=String(t.id),r=L[e];r&&r.reject(new Error("The received response has neither a result nor an error property."))}}(e)}finally{X()}}()})))}e.onClose(J),e.onError((function(e){U.fire([e,void 0,void 0])})),r.onClose(J),r.onError((function(e){U.fire(e)}));const Z=e=>{try{if(o.isNotificationMessage(e)&&e.method===l.type.method){const t=K(e.params.id),n=D.get(t);if(o.isRequestMessage(n)){const i=null==v?void 0:v.connectionStrategy,o=i&&i.cancelUndispatched?i.cancelUndispatched(n,W):void 0;if(o&&(void 0!==o.error||void 0!==o.result))return D.delete(t),o.id=n.id,ee(o,e.method,Date.now()),void r.write(o)}}!function(e,t){var r;o.isRequestMessage(t)?e.set(K(t.id),t):o.isResponseMessage(t)?e.set(null===(r=t.id)?"res-unknown-"+(++S).toString():"res-"+r.toString(),t):e.set("not-"+(++T).toString(),t)}(D,e)}finally{X()}};function ee(e,t,r){if(B!==p.Off&&O)if(F===h.Text){let n;B===p.Verbose&&(e.error&&e.error.data?n=`Error data: ${JSON.stringify(e.error.data,null,4)}\n\n`:e.result?n=`Result: ${JSON.stringify(e.result,null,4)}\n\n`:void 0===e.error&&(n="No result returned.\n\n")),O.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-r}ms`,n)}else te("send-response",e)}function te(e,t){if(!O||B===p.Off)return;const r={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};O.log(r)}function re(){if(Q())throw new C(m.Closed,"Connection is closed.");if(Y())throw new C(m.Disposed,"Connection is disposed.")}function ne(e){return void 0===e?null:e}function ie(e){return null===e?void 0:e}function oe(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function se(e,t){switch(e){case o.ParameterStructures.auto:return oe(t)?ie(t):[ne(t)];case o.ParameterStructures.byName:if(!oe(t))throw new Error("Recevied parameters by name but param is not an object literal.");return ie(t);case o.ParameterStructures.byPosition:return[ne(t)];default:throw new Error(`Unknown parameter structure ${e.toString()}`)}}function ae(e,t){let r;const n=e.numberOfParams;switch(n){case 0:r=void 0;break;case 1:r=se(e.parameterStructures,t[0]);break;default:r=[];for(let e=0;e{let n,s;if(re(),i.string(e)){n=e;const r=t[0];let i=0,a=o.ParameterStructures.auto;o.ParameterStructures.is(r)&&(i=1,a=r);let c=t.length;const l=c-i;switch(l){case 0:s=void 0;break;case 1:s=se(a,t[i]);break;default:if(a===o.ParameterStructures.byName)throw new Error(`Recevied ${l} parameters for 'by Name' notification parameter structure.`);s=t.slice(i,c).map((e=>ne(e)))}}else{const r=t;n=e.method,s=ae(e,r)}const a={jsonrpc:x,method:n,params:s};!function(e){if(B!==p.Off&&O)if(F===h.Text){let t;B===p.Verbose&&(t=e.params?`Params: ${JSON.stringify(e.params,null,4)}\n\n`:"No parameters provided.\n\n"),O.log(`Sending notification '${e.method}'.`,t)}else te("send-notification",e)}(a),r.write(a)},onNotification:(e,t)=>{let r;return re(),i.func(e)?A=e:t&&(i.string(e)?(r=e,P[e]={type:void 0,handler:t}):(r=e.method,P[e.method]={type:e,handler:t})),{dispose:()=>{void 0!==r?delete P[r]:A=void 0}}},onProgress:(e,t,r)=>{if(R.has(t))throw new Error(`Progress handler for token ${t} already registered`);return R.set(t,r),{dispose:()=>{R.delete(t)}}},sendProgress:(e,t,r)=>{ce.sendNotification(u.type,{token:t,value:r})},onUnhandledProgress:H.event,sendRequest:(e,...t)=>{let n,s,a;if(re(),function(){if(!G())throw new Error("Call listen() first.")}(),i.string(e)){n=e;const r=t[0],i=t[t.length-1];let l=0,u=o.ParameterStructures.auto;o.ParameterStructures.is(r)&&(l=1,u=r);let d=t.length;c.CancellationToken.is(i)&&(d-=1,a=i);const p=d-l;switch(p){case 0:s=void 0;break;case 1:s=se(u,t[l]);break;default:if(u===o.ParameterStructures.byName)throw new Error(`Recevied ${p} parameters for 'by Name' request parameter structure.`);s=t.slice(l,d).map((e=>ne(e)))}}else{const r=t;n=e.method,s=ae(e,r);const i=e.numberOfParams;a=c.CancellationToken.is(r[i])?r[i]:void 0}const l=E++;let u;return a&&(u=a.onCancellationRequested((()=>{z.sender.sendCancellation(ce,l)}))),new Promise(((e,t)=>{const i={jsonrpc:x,id:l,method:n,params:s};let a={method:n,timerStart:Date.now(),resolve:t=>{e(t),z.sender.cleanup(l),null==u||u.dispose()},reject:e=>{t(e),z.sender.cleanup(l),null==u||u.dispose()}};!function(e){if(B!==p.Off&&O)if(F===h.Text){let t;B===p.Verbose&&e.params&&(t=`Params: ${JSON.stringify(e.params,null,4)}\n\n`),O.log(`Sending request '${e.method} - (${e.id})'.`,t)}else te("send-request",e)}(i);try{r.write(i)}catch(e){a.reject(new o.ResponseError(o.ErrorCodes.MessageWriteError,e.message?e.message:"Unknown reason")),a=null}a&&(L[String(l)]=a)}))},onRequest:(e,t)=>{re();let r=null;return d.is(e)?(r=void 0,k=e):i.string(e)?(r=null,void 0!==t&&(r=e,I[e]={handler:t,type:void 0})):void 0!==t&&(r=e.method,I[e.method]={type:e,handler:t}),{dispose:()=>{null!==r&&(void 0!==r?delete I[r]:k=void 0)}}},trace:(e,t,r)=>{let n=!1,o=h.Text;void 0!==r&&(i.boolean(r)?n=r:(n=r.sendNotification||!1,o=r.traceFormat||h.Text)),B=e,F=o,O=B===p.Off?void 0:t,!n||Q()||Y()||ce.sendNotification(f.type,{value:p.toString(e)})},onError:U.event,onClose:$.event,onUnhandledNotification:q.event,onDispose:V.event,end:()=>{r.end()},dispose:()=>{if(Y())return;j=w.Disposed,V.fire(void 0);const t=new Error("Connection got disposed.");Object.keys(L).forEach((e=>{L[e].reject(t)})),L=Object.create(null),M=Object.create(null),D=new s.LinkedMap,i.func(r.dispose)&&r.dispose(),i.func(e.dispose)&&e.dispose()},listen:()=>{re(),function(){if(G())throw new C(m.AlreadyListening,"Connection is already listening")}(),j=w.Listening,e.listen(Z)},inspect:()=>{n.default().console.log("inspect")}};return ce.onNotification(g.type,(e=>{B!==p.Off&&O&&O.log(e.message,B===p.Verbose?e.verbose:void 0)})),ce.onNotification(u.type,(e=>{const t=R.get(e.token);t?t(e.value):H.fire(e)})),ce}},83911:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Disposable=void 0,(t.Disposable||(t.Disposable={})).create=function(e){return{dispose:e}}},27135:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;const n=r(30147);!function(e){const t={dispose(){}};e.None=function(){return t}}(t.Event||(t.Event={}));class i{add(e,t=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(r)&&r.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let r=!1;for(let n=0,i=this._callbacks.length;n{this._callbacks||(this._callbacks=new i),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);const n={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),n.dispose=o._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(n),n}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}t.Emitter=o,o._noop=function(){}},67574:(e,t)=>{"use strict";function r(e){return"string"==typeof e||e instanceof String}function n(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=r,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=n,t.stringArray=function(e){return n(e)&&e.every((e=>r(e)))}},96184:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.LRUCache=t.LinkedMap=t.Touch=void 0,function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last}(r=t.Touch||(t.Touch={}));class n{constructor(){this[Symbol.toStringTag]="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(){var e;return null===(e=this._head)||void 0===e?void 0:e.value}get last(){var e;return null===(e=this._tail)||void 0===e?void 0:e.value}has(e){return this._map.has(e)}get(e,t=r.None){const n=this._map.get(e);if(n)return t!==r.None&&this.touch(n,t),n.value}set(e,t,n=r.None){let i=this._map.get(e);if(i)i.value=t,n!==r.None&&this.touch(i,n);else{switch(i={key:e,value:t,next:void 0,previous:void 0},n){case r.None:this.addItemLast(i);break;case r.First:this.addItemFirst(i);break;case r.Last:default:this.addItemLast(i)}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const r=this._state;let n=this._head;for(;n;){if(t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");n=n.next}}keys(){const e=this,t=this._state;let r=this._head;const n={[Symbol.iterator]:()=>n,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(r){const e={value:r.key,done:!1};return r=r.next,e}return{value:void 0,done:!0}}};return n}values(){const e=this,t=this._state;let r=this._head;const n={[Symbol.iterator]:()=>n,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(r){const e={value:r.value,done:!1};return r=r.next,e}return{value:void 0,done:!0}}};return n}entries(){const e=this,t=this._state;let r=this._head;const n={[Symbol.iterator]:()=>n,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(r){const e={value:[r.key,r.value],done:!1};return r=r.next,e}return{value:void 0,done:!0}}};return n}[Symbol.iterator](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,r=this.size;for(;t&&r>e;)this._map.delete(t.key),t=t.next,r--;this._head=t,this._size=r,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,r=e.previous;if(!t||!r)throw new Error("Invalid list");t.previous=r,r.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(t===r.First||t===r.Last)if(t===r.First){if(e===this._head)return;const t=e.next,r=e.previous;e===this._tail?(r.next=void 0,this._tail=r):(t.previous=r,r.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===r.Last){if(e===this._tail)return;const t=e.next,r=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=r,r.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach(((t,r)=>{e.push([r,t])})),e}fromJSON(e){this.clear();for(const[t,r]of e)this.set(t,r)}}t.LinkedMap=n,t.LRUCache=class extends n{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=r.AsNew){return super.get(e,t)}peek(e){return super.get(e,r.None)}set(e,t){return super.set(e,t,r.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}},75530:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractMessageBuffer=void 0,t.AbstractMessageBuffer=class{constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){const t="string"==typeof e?this.fromString(e,this._encoding):e;this._chunks.push(t),this._totalLength+=t.byteLength}tryReadHeaders(){if(0===this._chunks.length)return;let e=0,t=0,r=0,n=0;e:for(;tthis._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){const t=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(t)}if(this._chunks[0].byteLength>e){const t=this._chunks[0],r=this.asNative(t,e);return this._chunks[0]=t.slice(e),this._totalLength-=e,r}const t=this.allocNative(e);let r=0;for(;e>0;){const n=this._chunks[0];if(n.byteLength>e){const i=n.slice(0,e);t.set(i,r),r+=e,this._chunks[0]=n.slice(e),this._totalLength-=e,e-=e}else t.set(n,r),r+=n.byteLength,this._chunks.shift(),this._totalLength-=n.byteLength,e-=n.byteLength}return t}}},56525:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=void 0;const n=r(30147),i=r(67574),o=r(27135);var s;(t.MessageReader||(t.MessageReader={})).is=function(e){let t=e;return t&&i.func(t.listen)&&i.func(t.dispose)&&i.func(t.onError)&&i.func(t.onClose)&&i.func(t.onPartialMessage)};class a{constructor(){this.errorEmitter=new o.Emitter,this.closeEmitter=new o.Emitter,this.partialMessageEmitter=new o.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader received error. Reason: ${i.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageReader=a,function(e){e.fromOptions=function(e){var t;let r,i;const o=new Map;let s;const a=new Map;if(void 0===e||"string"==typeof e)r=null!=e?e:"utf-8";else{if(r=null!==(t=e.charset)&&void 0!==t?t:"utf-8",void 0!==e.contentDecoder&&(i=e.contentDecoder,o.set(i.name,i)),void 0!==e.contentDecoders)for(const t of e.contentDecoders)o.set(t.name,t);if(void 0!==e.contentTypeDecoder&&(s=e.contentTypeDecoder,a.set(s.name,s)),void 0!==e.contentTypeDecoders)for(const t of e.contentTypeDecoders)a.set(t.name,t)}return void 0===s&&(s=n.default().applicationJson.decoder,a.set(s.name,s)),{charset:r,contentDecoder:i,contentDecoders:o,contentTypeDecoder:s,contentTypeDecoders:a}}}(s||(s={})),t.ReadableStreamMessageReader=class extends a{constructor(e,t){super(),this.readable=e,this.options=s.fromOptions(t),this.buffer=n.default().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;const t=this.readable.onData((e=>{this.onData(e)}));return this.readable.onError((e=>this.fireError(e))),this.readable.onClose((()=>this.fireClose())),t}onData(e){for(this.buffer.append(e);;){if(-1===this.nextMessageLength){const e=this.buffer.tryReadHeaders();if(!e)return;const t=e.get("Content-Length");if(!t)throw new Error("Header must provide a Content-Length property.");const r=parseInt(t);if(isNaN(r))throw new Error("Content-Length value must be a number.");this.nextMessageLength=r}const e=this.buffer.tryReadBody(this.nextMessageLength);if(void 0===e)return void this.setPartialMessageTimer();let t;this.clearPartialMessageTimer(),this.nextMessageLength=-1,t=void 0!==this.options.contentDecoder?this.options.contentDecoder.decode(e):Promise.resolve(e),t.then((e=>{this.options.contentTypeDecoder.decode(e,this.options).then((e=>{this.callback(e)}),(e=>{this.fireError(e)}))}),(e=>{this.fireError(e)}))}}clearPartialMessageTimer(){this.partialMessageTimer&&(n.default().timer.clearTimeout(this.partialMessageTimer),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),this._partialMessageTimeout<=0||(this.partialMessageTimer=n.default().timer.setTimeout(((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())}),this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}}},96654:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=void 0;const n=r(30147),i=r(67574),o=r(80142),s=r(27135);var a;(t.MessageWriter||(t.MessageWriter={})).is=function(e){let t=e;return t&&i.func(t.dispose)&&i.func(t.onClose)&&i.func(t.onError)&&i.func(t.write)};class c{constructor(){this.errorEmitter=new s.Emitter,this.closeEmitter=new s.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,r){this.errorEmitter.fire([this.asError(e),t,r])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error(`Writer received error. Reason: ${i.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageWriter=c,function(e){e.fromOptions=function(e){var t,r;return void 0===e||"string"==typeof e?{charset:null!=e?e:"utf-8",contentTypeEncoder:n.default().applicationJson.encoder}:{charset:null!==(t=e.charset)&&void 0!==t?t:"utf-8",contentEncoder:e.contentEncoder,contentTypeEncoder:null!==(r=e.contentTypeEncoder)&&void 0!==r?r:n.default().applicationJson.encoder}}}(a||(a={})),t.WriteableStreamMessageWriter=class extends c{constructor(e,t){super(),this.writable=e,this.options=a.fromOptions(t),this.errorCount=0,this.writeSemaphore=new o.Semaphore(1),this.writable.onError((e=>this.fireError(e))),this.writable.onClose((()=>this.fireClose()))}async write(e){return this.writeSemaphore.lock((async()=>this.options.contentTypeEncoder.encode(e,this.options).then((e=>void 0!==this.options.contentEncoder?this.options.contentEncoder.encode(e):e)).then((t=>{const r=[];return r.push("Content-Length: ",t.byteLength.toString(),"\r\n"),r.push("\r\n"),this.doWrite(e,r,t)}),(e=>{throw this.fireError(e),e}))))}async doWrite(e,t,r){try{return await this.writable.write(t.join(""),"ascii"),this.writable.write(r)}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}}},20839:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isResponseMessage=t.isNotificationMessage=t.isRequestMessage=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType=t.RequestType0=t.AbstractMessageSignature=t.ParameterStructures=t.ResponseError=t.ErrorCodes=void 0;const n=r(67574);var i;!function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.jsonrpcReservedErrorRangeStart=-32099,e.serverErrorStart=e.jsonrpcReservedErrorRangeStart,e.MessageWriteError=-32099,e.MessageReadError=-32098,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.jsonrpcReservedErrorRangeEnd=-32e3,e.serverErrorEnd=e.jsonrpcReservedErrorRangeEnd}(i=t.ErrorCodes||(t.ErrorCodes={}));class o extends Error{constructor(e,t,r){super(t),this.code=n.number(e)?e:i.UnknownErrorCode,this.data=r,Object.setPrototypeOf(this,o.prototype)}toJson(){return{code:this.code,message:this.message,data:this.data}}}t.ResponseError=o;class s{constructor(e){this.kind=e}static is(e){return e===s.auto||e===s.byName||e===s.byPosition}toString(){return this.kind}}t.ParameterStructures=s,s.auto=new s("auto"),s.byPosition=new s("byPosition"),s.byName=new s("byName");class a{constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return s.auto}}t.AbstractMessageSignature=a,t.RequestType0=class extends a{constructor(e){super(e,0)}},t.RequestType=class extends a{constructor(e,t=s.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.RequestType1=class extends a{constructor(e,t=s.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.RequestType2=class extends a{constructor(e){super(e,2)}},t.RequestType3=class extends a{constructor(e){super(e,3)}},t.RequestType4=class extends a{constructor(e){super(e,4)}},t.RequestType5=class extends a{constructor(e){super(e,5)}},t.RequestType6=class extends a{constructor(e){super(e,6)}},t.RequestType7=class extends a{constructor(e){super(e,7)}},t.RequestType8=class extends a{constructor(e){super(e,8)}},t.RequestType9=class extends a{constructor(e){super(e,9)}},t.NotificationType=class extends a{constructor(e,t=s.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.NotificationType0=class extends a{constructor(e){super(e,0)}},t.NotificationType1=class extends a{constructor(e,t=s.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.NotificationType2=class extends a{constructor(e){super(e,2)}},t.NotificationType3=class extends a{constructor(e){super(e,3)}},t.NotificationType4=class extends a{constructor(e){super(e,4)}},t.NotificationType5=class extends a{constructor(e){super(e,5)}},t.NotificationType6=class extends a{constructor(e){super(e,6)}},t.NotificationType7=class extends a{constructor(e){super(e,7)}},t.NotificationType8=class extends a{constructor(e){super(e,8)}},t.NotificationType9=class extends a{constructor(e){super(e,9)}},t.isRequestMessage=function(e){const t=e;return t&&n.string(t.method)&&(n.string(t.id)||n.number(t.id))},t.isNotificationMessage=function(e){const t=e;return t&&n.string(t.method)&&void 0===e.id},t.isResponseMessage=function(e){const t=e;return t&&(void 0!==t.result||!!t.error)&&(n.string(t.id)||n.number(t.id)||null===t.id)}},30147:(e,t)=>{"use strict";let r;function n(){if(void 0===r)throw new Error("No runtime abstraction layer installed");return r}Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.install=function(e){if(void 0===e)throw new Error("No runtime abstraction layer provided");r=e}}(n||(n={})),t.default=n},80142:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Semaphore=void 0;const n=r(30147);t.Semaphore=class{constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise(((t,r)=>{this._waiting.push({thunk:e,resolve:t,reject:r}),this.runNext()}))}get active(){return this._active}runNext(){0!==this._waiting.length&&this._active!==this._capacity&&n.default().timer.setImmediate((()=>this.doRunNext()))}doRunNext(){if(0===this._waiting.length||this._active===this._capacity)return;const e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{const t=e.thunk();t instanceof Promise?t.then((t=>{this._active--,e.resolve(t),this.runNext()}),(t=>{this._active--,e.reject(t),this.runNext()})):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}}},74389:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.createServerSocketTransport=t.createClientSocketTransport=t.createServerPipeTransport=t.createClientPipeTransport=t.generateRandomPipeName=t.StreamMessageWriter=t.StreamMessageReader=t.SocketMessageWriter=t.SocketMessageReader=t.IPCMessageWriter=t.IPCMessageReader=void 0;const o=r(23034);o.default.install();const s=r(23870),a=r(71017),c=r(22037),l=r(6113),u=r(41808);i(r(23870),t);class d extends s.AbstractMessageReader{constructor(e){super(),this.process=e;let t=this.process;t.on("error",(e=>this.fireError(e))),t.on("close",(()=>this.fireClose()))}listen(e){return this.process.on("message",e),s.Disposable.create((()=>this.process.off("message",e)))}}t.IPCMessageReader=d;class p extends s.AbstractMessageWriter{constructor(e){super(),this.process=e,this.errorCount=0;let t=this.process;t.on("error",(e=>this.fireError(e))),t.on("close",(()=>this.fireClose))}write(e){try{return"function"==typeof this.process.send&&this.process.send(e,void 0,void 0,(t=>{t?(this.errorCount++,this.handleError(t,e)):this.errorCount=0})),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}}t.IPCMessageWriter=p;class h extends s.ReadableStreamMessageReader{constructor(e,t="utf-8"){super(o.default().stream.asReadableStream(e),t)}}t.SocketMessageReader=h;class f extends s.WriteableStreamMessageWriter{constructor(e,t){super(o.default().stream.asWritableStream(e),t),this.socket=e}dispose(){super.dispose(),this.socket.destroy()}}t.SocketMessageWriter=f;class g extends s.ReadableStreamMessageReader{constructor(e,t){super(o.default().stream.asReadableStream(e),t)}}t.StreamMessageReader=g;class m extends s.WriteableStreamMessageWriter{constructor(e,t){super(o.default().stream.asWritableStream(e),t)}}t.StreamMessageWriter=m;const y=process.env.XDG_RUNTIME_DIR,v=new Map([["linux",107],["darwin",103]]);t.generateRandomPipeName=function(){const e=l.randomBytes(21).toString("hex");if("win32"===process.platform)return`\\\\.\\pipe\\vscode-jsonrpc-${e}-sock`;let t;t=y?a.join(y,`vscode-ipc-${e}.sock`):a.join(c.tmpdir(),`vscode-${e}.sock`);const r=v.get(process.platform);return void 0!==r&&t.length>=r&&o.default().console.warn(`WARNING: IPC handle "${t}" is longer than ${r} characters.`),t},t.createClientPipeTransport=function(e,t="utf-8"){let r;const n=new Promise(((e,t)=>{r=e}));return new Promise(((i,o)=>{let s=u.createServer((e=>{s.close(),r([new h(e,t),new f(e,t)])}));s.on("error",o),s.listen(e,(()=>{s.removeListener("error",o),i({onConnected:()=>n})}))}))},t.createServerPipeTransport=function(e,t="utf-8"){const r=u.createConnection(e);return[new h(r,t),new f(r,t)]},t.createClientSocketTransport=function(e,t="utf-8"){let r;const n=new Promise(((e,t)=>{r=e}));return new Promise(((i,o)=>{const s=u.createServer((e=>{s.close(),r([new h(e,t),new f(e,t)])}));s.on("error",o),s.listen(e,"127.0.0.1",(()=>{s.removeListener("error",o),i({onConnected:()=>n})}))}))},t.createServerSocketTransport=function(e,t="utf-8"){const r=u.createConnection(e,"127.0.0.1");return[new h(r,t),new f(r,t)]},t.createMessageConnection=function(e,t,r,n){r||(r=s.NullLogger);const i=function(e){const t=e;return void 0!==t.read&&void 0!==t.addListener}(e)?new g(e):e,o=function(e){const t=e;return void 0!==t.write&&void 0!==t.addListener}(t)?new m(t):t;return s.ConnectionStrategy.is(n)&&(n={connectionStrategy:n}),s.createMessageConnection(i,o,r,n)}},23034:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(30147),i=r(73837),o=r(83911),s=r(75530);class a extends s.AbstractMessageBuffer{constructor(e="utf-8"){super(e)}emptyBuffer(){return a.emptyBuffer}fromString(e,t){return Buffer.from(e,t)}toString(e,t){return e instanceof Buffer?e.toString(t):new i.TextDecoder(t).decode(e)}asNative(e,t){return void 0===t?e instanceof Buffer?e:Buffer.from(e):e instanceof Buffer?e.slice(0,t):Buffer.from(e,0,t)}allocNative(e){return Buffer.allocUnsafe(e)}}a.emptyBuffer=Buffer.allocUnsafe(0);class c{constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),o.Disposable.create((()=>this.stream.off("close",e)))}onError(e){return this.stream.on("error",e),o.Disposable.create((()=>this.stream.off("error",e)))}onEnd(e){return this.stream.on("end",e),o.Disposable.create((()=>this.stream.off("end",e)))}onData(e){return this.stream.on("data",e),o.Disposable.create((()=>this.stream.off("data",e)))}}class l{constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),o.Disposable.create((()=>this.stream.off("close",e)))}onError(e){return this.stream.on("error",e),o.Disposable.create((()=>this.stream.off("error",e)))}onEnd(e){return this.stream.on("end",e),o.Disposable.create((()=>this.stream.off("end",e)))}write(e,t){return new Promise(((r,n)=>{const i=e=>{null==e?r():n(e)};"string"==typeof e?this.stream.write(e,t,i):this.stream.write(e,i)}))}end(){this.stream.end()}}const u=Object.freeze({messageBuffer:Object.freeze({create:e=>new a(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(e,void 0,0),t.charset))}catch(e){return Promise.reject(e)}}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{try{return e instanceof Buffer?Promise.resolve(JSON.parse(e.toString(t.charset))):Promise.resolve(JSON.parse(new i.TextDecoder(t.charset).decode(e)))}catch(e){return Promise.reject(e)}}})}),stream:Object.freeze({asReadableStream:e=>new c(e),asWritableStream:e=>new l(e)}),console,timer:Object.freeze({setTimeout:(e,t,...r)=>setTimeout(e,t,...r),clearTimeout(e){clearTimeout(e)},setImmediate:(e,...t)=>setImmediate(e,...t),clearImmediate(e){clearImmediate(e)}})});function d(){return u}!function(e){e.install=function(){n.default.install(u)}}(d||(d={})),t.default=d},95028:(e,t,r)=>{"use strict";e.exports=r(74389)},51661:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.LSPErrorCodes=t.createProtocolConnection=void 0,i(r(74389),t),i(r(91674),t),i(r(66140),t),i(r(10542),t);var o,s=r(73767);Object.defineProperty(t,"createProtocolConnection",{enumerable:!0,get:function(){return s.createProtocolConnection}}),(o=t.LSPErrorCodes||(t.LSPErrorCodes={})).lspReservedErrorRangeStart=-32899,o.ContentModified=-32801,o.RequestCancelled=-32800,o.lspReservedErrorRangeEnd=-32800},73767:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const n=r(74389);t.createProtocolConnection=function(e,t,r,i){return n.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),n.createMessageConnection(e,t,r,i)}},66140:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolNotificationType=t.ProtocolNotificationType0=t.ProtocolRequestType=t.ProtocolRequestType0=t.RegistrationType=void 0;const n=r(74389);t.RegistrationType=class{constructor(e){this.method=e}};class i extends n.RequestType0{constructor(e){super(e)}}t.ProtocolRequestType0=i;class o extends n.RequestType{constructor(e){super(e,n.ParameterStructures.byName)}}t.ProtocolRequestType=o;class s extends n.NotificationType0{constructor(e){super(e)}}t.ProtocolNotificationType0=s;class a extends n.NotificationType{constructor(e){super(e,n.ParameterStructures.byName)}}t.ProtocolNotificationType=a},82918:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.CallHierarchyPrepareRequest=void 0;const n=r(66140);var i,o,s;(s=t.CallHierarchyPrepareRequest||(t.CallHierarchyPrepareRequest={})).method="textDocument/prepareCallHierarchy",s.type=new n.ProtocolRequestType(s.method),(o=t.CallHierarchyIncomingCallsRequest||(t.CallHierarchyIncomingCallsRequest={})).method="callHierarchy/incomingCalls",o.type=new n.ProtocolRequestType(o.method),(i=t.CallHierarchyOutgoingCallsRequest||(t.CallHierarchyOutgoingCallsRequest={})).method="callHierarchy/outgoingCalls",i.type=new n.ProtocolRequestType(i.method)},79891:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorPresentationRequest=t.DocumentColorRequest=void 0;const n=r(66140);var i;(i=t.DocumentColorRequest||(t.DocumentColorRequest={})).method="textDocument/documentColor",i.type=new n.ProtocolRequestType(i.method),(t.ColorPresentationRequest||(t.ColorPresentationRequest={})).type=new n.ProtocolRequestType("textDocument/colorPresentation")},85934:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationRequest=void 0;const n=r(66140);(t.ConfigurationRequest||(t.ConfigurationRequest={})).type=new n.ProtocolRequestType("workspace/configuration")},40764:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeclarationRequest=void 0;const n=r(66140);var i;(i=t.DeclarationRequest||(t.DeclarationRequest={})).method="textDocument/declaration",i.type=new n.ProtocolRequestType(i.method)},37846:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.DidRenameFilesNotification=t.WillRenameFilesRequest=t.DidCreateFilesNotification=t.WillCreateFilesRequest=t.FileOperationPatternKind=void 0;const n=r(66140);var i,o,s,a,c,l,u;(u=t.FileOperationPatternKind||(t.FileOperationPatternKind={})).file="file",u.folder="folder",(l=t.WillCreateFilesRequest||(t.WillCreateFilesRequest={})).method="workspace/willCreateFiles",l.type=new n.ProtocolRequestType(l.method),(c=t.DidCreateFilesNotification||(t.DidCreateFilesNotification={})).method="workspace/didCreateFiles",c.type=new n.ProtocolNotificationType(c.method),(a=t.WillRenameFilesRequest||(t.WillRenameFilesRequest={})).method="workspace/willRenameFiles",a.type=new n.ProtocolRequestType(a.method),(s=t.DidRenameFilesNotification||(t.DidRenameFilesNotification={})).method="workspace/didRenameFiles",s.type=new n.ProtocolNotificationType(s.method),(o=t.DidDeleteFilesNotification||(t.DidDeleteFilesNotification={})).method="workspace/didDeleteFiles",o.type=new n.ProtocolNotificationType(o.method),(i=t.WillDeleteFilesRequest||(t.WillDeleteFilesRequest={})).method="workspace/willDeleteFiles",i.type=new n.ProtocolRequestType(i.method)},13394:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeRequest=t.FoldingRangeKind=void 0;const n=r(66140);var i,o;(o=t.FoldingRangeKind||(t.FoldingRangeKind={})).Comment="comment",o.Imports="imports",o.Region="region",(i=t.FoldingRangeRequest||(t.FoldingRangeRequest={})).method="textDocument/foldingRange",i.type=new n.ProtocolRequestType(i.method)},82122:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationRequest=void 0;const n=r(66140);var i;(i=t.ImplementationRequest||(t.ImplementationRequest={})).method="textDocument/implementation",i.type=new n.ProtocolRequestType(i.method)},10542:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentLinkRequest=t.CodeLensRefreshRequest=t.CodeLensResolveRequest=t.CodeLensRequest=t.WorkspaceSymbolRequest=t.CodeActionResolveRequest=t.CodeActionRequest=t.DocumentSymbolRequest=t.DocumentHighlightRequest=t.ReferencesRequest=t.DefinitionRequest=t.SignatureHelpRequest=t.SignatureHelpTriggerKind=t.HoverRequest=t.CompletionResolveRequest=t.CompletionRequest=t.CompletionTriggerKind=t.PublishDiagnosticsNotification=t.WatchKind=t.FileChangeType=t.DidChangeWatchedFilesNotification=t.WillSaveTextDocumentWaitUntilRequest=t.WillSaveTextDocumentNotification=t.TextDocumentSaveReason=t.DidSaveTextDocumentNotification=t.DidCloseTextDocumentNotification=t.DidChangeTextDocumentNotification=t.TextDocumentContentChangeEvent=t.DidOpenTextDocumentNotification=t.TextDocumentSyncKind=t.TelemetryEventNotification=t.LogMessageNotification=t.ShowMessageRequest=t.ShowMessageNotification=t.MessageType=t.DidChangeConfigurationNotification=t.ExitNotification=t.ShutdownRequest=t.InitializedNotification=t.InitializeError=t.InitializeRequest=t.WorkDoneProgressOptions=t.TextDocumentRegistrationOptions=t.StaticRegistrationOptions=t.FailureHandlingKind=t.ResourceOperationKind=t.UnregistrationRequest=t.RegistrationRequest=t.DocumentSelector=t.DocumentFilter=void 0,t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.WillRenameFilesRequest=t.DidRenameFilesNotification=t.WillCreateFilesRequest=t.DidCreateFilesNotification=t.FileOperationPatternKind=t.LinkedEditingRangeRequest=t.ShowDocumentRequest=t.SemanticTokensRegistrationType=t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.TokenFormat=t.SemanticTokens=t.SemanticTokenModifiers=t.SemanticTokenTypes=t.CallHierarchyPrepareRequest=t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=t.SelectionRangeRequest=t.DeclarationRequest=t.FoldingRangeRequest=t.ColorPresentationRequest=t.DocumentColorRequest=t.ConfigurationRequest=t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=t.TypeDefinitionRequest=t.ImplementationRequest=t.ApplyWorkspaceEditRequest=t.ExecuteCommandRequest=t.PrepareRenameRequest=t.RenameRequest=t.PrepareSupportDefaultBehavior=t.DocumentOnTypeFormattingRequest=t.DocumentRangeFormattingRequest=t.DocumentFormattingRequest=t.DocumentLinkResolveRequest=void 0;const n=r(69533),i=r(66140),o=r(82122);Object.defineProperty(t,"ImplementationRequest",{enumerable:!0,get:function(){return o.ImplementationRequest}});const s=r(71589);Object.defineProperty(t,"TypeDefinitionRequest",{enumerable:!0,get:function(){return s.TypeDefinitionRequest}});const a=r(79795);Object.defineProperty(t,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return a.WorkspaceFoldersRequest}}),Object.defineProperty(t,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return a.DidChangeWorkspaceFoldersNotification}});const c=r(85934);Object.defineProperty(t,"ConfigurationRequest",{enumerable:!0,get:function(){return c.ConfigurationRequest}});const l=r(79891);Object.defineProperty(t,"DocumentColorRequest",{enumerable:!0,get:function(){return l.DocumentColorRequest}}),Object.defineProperty(t,"ColorPresentationRequest",{enumerable:!0,get:function(){return l.ColorPresentationRequest}});const u=r(13394);Object.defineProperty(t,"FoldingRangeRequest",{enumerable:!0,get:function(){return u.FoldingRangeRequest}});const d=r(40764);Object.defineProperty(t,"DeclarationRequest",{enumerable:!0,get:function(){return d.DeclarationRequest}});const p=r(5206);Object.defineProperty(t,"SelectionRangeRequest",{enumerable:!0,get:function(){return p.SelectionRangeRequest}});const h=r(21862);Object.defineProperty(t,"WorkDoneProgress",{enumerable:!0,get:function(){return h.WorkDoneProgress}}),Object.defineProperty(t,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return h.WorkDoneProgressCreateRequest}}),Object.defineProperty(t,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return h.WorkDoneProgressCancelNotification}});const f=r(82918);Object.defineProperty(t,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return f.CallHierarchyIncomingCallsRequest}}),Object.defineProperty(t,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return f.CallHierarchyOutgoingCallsRequest}}),Object.defineProperty(t,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return f.CallHierarchyPrepareRequest}});const g=r(39434);Object.defineProperty(t,"SemanticTokenTypes",{enumerable:!0,get:function(){return g.SemanticTokenTypes}}),Object.defineProperty(t,"SemanticTokenModifiers",{enumerable:!0,get:function(){return g.SemanticTokenModifiers}}),Object.defineProperty(t,"SemanticTokens",{enumerable:!0,get:function(){return g.SemanticTokens}}),Object.defineProperty(t,"TokenFormat",{enumerable:!0,get:function(){return g.TokenFormat}}),Object.defineProperty(t,"SemanticTokensRequest",{enumerable:!0,get:function(){return g.SemanticTokensRequest}}),Object.defineProperty(t,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return g.SemanticTokensDeltaRequest}}),Object.defineProperty(t,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return g.SemanticTokensRangeRequest}}),Object.defineProperty(t,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return g.SemanticTokensRefreshRequest}}),Object.defineProperty(t,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return g.SemanticTokensRegistrationType}});const m=r(75726);Object.defineProperty(t,"ShowDocumentRequest",{enumerable:!0,get:function(){return m.ShowDocumentRequest}});const y=r(26305);Object.defineProperty(t,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return y.LinkedEditingRangeRequest}});const v=r(37846);Object.defineProperty(t,"FileOperationPatternKind",{enumerable:!0,get:function(){return v.FileOperationPatternKind}}),Object.defineProperty(t,"DidCreateFilesNotification",{enumerable:!0,get:function(){return v.DidCreateFilesNotification}}),Object.defineProperty(t,"WillCreateFilesRequest",{enumerable:!0,get:function(){return v.WillCreateFilesRequest}}),Object.defineProperty(t,"DidRenameFilesNotification",{enumerable:!0,get:function(){return v.DidRenameFilesNotification}}),Object.defineProperty(t,"WillRenameFilesRequest",{enumerable:!0,get:function(){return v.WillRenameFilesRequest}}),Object.defineProperty(t,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return v.DidDeleteFilesNotification}}),Object.defineProperty(t,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return v.WillDeleteFilesRequest}});const _=r(73443);var b,w,C,E,T,S,x,k,I,A,P,R,N,O,D,L,M,B,F,j,U,$,q,H,V,z,K,W,G,Q,Y,J,X,Z,ee,te,re,ne,ie,oe;Object.defineProperty(t,"UniquenessLevel",{enumerable:!0,get:function(){return _.UniquenessLevel}}),Object.defineProperty(t,"MonikerKind",{enumerable:!0,get:function(){return _.MonikerKind}}),Object.defineProperty(t,"MonikerRequest",{enumerable:!0,get:function(){return _.MonikerRequest}}),function(e){e.is=function(e){const t=e;return n.string(t.language)||n.string(t.scheme)||n.string(t.pattern)}}(b=t.DocumentFilter||(t.DocumentFilter={})),function(e){e.is=function(e){if(!Array.isArray(e))return!1;for(let t of e)if(!n.string(t)&&!b.is(t))return!1;return!0}}(w=t.DocumentSelector||(t.DocumentSelector={})),(t.RegistrationRequest||(t.RegistrationRequest={})).type=new i.ProtocolRequestType("client/registerCapability"),(t.UnregistrationRequest||(t.UnregistrationRequest={})).type=new i.ProtocolRequestType("client/unregisterCapability"),(oe=t.ResourceOperationKind||(t.ResourceOperationKind={})).Create="create",oe.Rename="rename",oe.Delete="delete",(ie=t.FailureHandlingKind||(t.FailureHandlingKind={})).Abort="abort",ie.Transactional="transactional",ie.TextOnlyTransactional="textOnlyTransactional",ie.Undo="undo",(t.StaticRegistrationOptions||(t.StaticRegistrationOptions={})).hasId=function(e){const t=e;return t&&n.string(t.id)&&t.id.length>0},(t.TextDocumentRegistrationOptions||(t.TextDocumentRegistrationOptions={})).is=function(e){const t=e;return t&&(null===t.documentSelector||w.is(t.documentSelector))},(ne=t.WorkDoneProgressOptions||(t.WorkDoneProgressOptions={})).is=function(e){const t=e;return n.objectLiteral(t)&&(void 0===t.workDoneProgress||n.boolean(t.workDoneProgress))},ne.hasWorkDoneProgress=function(e){const t=e;return t&&n.boolean(t.workDoneProgress)},(t.InitializeRequest||(t.InitializeRequest={})).type=new i.ProtocolRequestType("initialize"),(t.InitializeError||(t.InitializeError={})).unknownProtocolVersion=1,(t.InitializedNotification||(t.InitializedNotification={})).type=new i.ProtocolNotificationType("initialized"),(t.ShutdownRequest||(t.ShutdownRequest={})).type=new i.ProtocolRequestType0("shutdown"),(t.ExitNotification||(t.ExitNotification={})).type=new i.ProtocolNotificationType0("exit"),(t.DidChangeConfigurationNotification||(t.DidChangeConfigurationNotification={})).type=new i.ProtocolNotificationType("workspace/didChangeConfiguration"),(re=t.MessageType||(t.MessageType={})).Error=1,re.Warning=2,re.Info=3,re.Log=4,(t.ShowMessageNotification||(t.ShowMessageNotification={})).type=new i.ProtocolNotificationType("window/showMessage"),(t.ShowMessageRequest||(t.ShowMessageRequest={})).type=new i.ProtocolRequestType("window/showMessageRequest"),(t.LogMessageNotification||(t.LogMessageNotification={})).type=new i.ProtocolNotificationType("window/logMessage"),(t.TelemetryEventNotification||(t.TelemetryEventNotification={})).type=new i.ProtocolNotificationType("telemetry/event"),(te=t.TextDocumentSyncKind||(t.TextDocumentSyncKind={})).None=0,te.Full=1,te.Incremental=2,(ee=t.DidOpenTextDocumentNotification||(t.DidOpenTextDocumentNotification={})).method="textDocument/didOpen",ee.type=new i.ProtocolNotificationType(ee.method),(Z=t.TextDocumentContentChangeEvent||(t.TextDocumentContentChangeEvent={})).isIncremental=function(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)},Z.isFull=function(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength},(X=t.DidChangeTextDocumentNotification||(t.DidChangeTextDocumentNotification={})).method="textDocument/didChange",X.type=new i.ProtocolNotificationType(X.method),(J=t.DidCloseTextDocumentNotification||(t.DidCloseTextDocumentNotification={})).method="textDocument/didClose",J.type=new i.ProtocolNotificationType(J.method),(Y=t.DidSaveTextDocumentNotification||(t.DidSaveTextDocumentNotification={})).method="textDocument/didSave",Y.type=new i.ProtocolNotificationType(Y.method),(Q=t.TextDocumentSaveReason||(t.TextDocumentSaveReason={})).Manual=1,Q.AfterDelay=2,Q.FocusOut=3,(G=t.WillSaveTextDocumentNotification||(t.WillSaveTextDocumentNotification={})).method="textDocument/willSave",G.type=new i.ProtocolNotificationType(G.method),(W=t.WillSaveTextDocumentWaitUntilRequest||(t.WillSaveTextDocumentWaitUntilRequest={})).method="textDocument/willSaveWaitUntil",W.type=new i.ProtocolRequestType(W.method),(t.DidChangeWatchedFilesNotification||(t.DidChangeWatchedFilesNotification={})).type=new i.ProtocolNotificationType("workspace/didChangeWatchedFiles"),(K=t.FileChangeType||(t.FileChangeType={})).Created=1,K.Changed=2,K.Deleted=3,(z=t.WatchKind||(t.WatchKind={})).Create=1,z.Change=2,z.Delete=4,(t.PublishDiagnosticsNotification||(t.PublishDiagnosticsNotification={})).type=new i.ProtocolNotificationType("textDocument/publishDiagnostics"),(V=t.CompletionTriggerKind||(t.CompletionTriggerKind={})).Invoked=1,V.TriggerCharacter=2,V.TriggerForIncompleteCompletions=3,(H=t.CompletionRequest||(t.CompletionRequest={})).method="textDocument/completion",H.type=new i.ProtocolRequestType(H.method),(q=t.CompletionResolveRequest||(t.CompletionResolveRequest={})).method="completionItem/resolve",q.type=new i.ProtocolRequestType(q.method),($=t.HoverRequest||(t.HoverRequest={})).method="textDocument/hover",$.type=new i.ProtocolRequestType($.method),(U=t.SignatureHelpTriggerKind||(t.SignatureHelpTriggerKind={})).Invoked=1,U.TriggerCharacter=2,U.ContentChange=3,(j=t.SignatureHelpRequest||(t.SignatureHelpRequest={})).method="textDocument/signatureHelp",j.type=new i.ProtocolRequestType(j.method),(F=t.DefinitionRequest||(t.DefinitionRequest={})).method="textDocument/definition",F.type=new i.ProtocolRequestType(F.method),(B=t.ReferencesRequest||(t.ReferencesRequest={})).method="textDocument/references",B.type=new i.ProtocolRequestType(B.method),(M=t.DocumentHighlightRequest||(t.DocumentHighlightRequest={})).method="textDocument/documentHighlight",M.type=new i.ProtocolRequestType(M.method),(L=t.DocumentSymbolRequest||(t.DocumentSymbolRequest={})).method="textDocument/documentSymbol",L.type=new i.ProtocolRequestType(L.method),(D=t.CodeActionRequest||(t.CodeActionRequest={})).method="textDocument/codeAction",D.type=new i.ProtocolRequestType(D.method),(O=t.CodeActionResolveRequest||(t.CodeActionResolveRequest={})).method="codeAction/resolve",O.type=new i.ProtocolRequestType(O.method),(N=t.WorkspaceSymbolRequest||(t.WorkspaceSymbolRequest={})).method="workspace/symbol",N.type=new i.ProtocolRequestType(N.method),(R=t.CodeLensRequest||(t.CodeLensRequest={})).method="textDocument/codeLens",R.type=new i.ProtocolRequestType(R.method),(P=t.CodeLensResolveRequest||(t.CodeLensResolveRequest={})).method="codeLens/resolve",P.type=new i.ProtocolRequestType(P.method),(A=t.CodeLensRefreshRequest||(t.CodeLensRefreshRequest={})).method="workspace/codeLens/refresh",A.type=new i.ProtocolRequestType0(A.method),(I=t.DocumentLinkRequest||(t.DocumentLinkRequest={})).method="textDocument/documentLink",I.type=new i.ProtocolRequestType(I.method),(k=t.DocumentLinkResolveRequest||(t.DocumentLinkResolveRequest={})).method="documentLink/resolve",k.type=new i.ProtocolRequestType(k.method),(x=t.DocumentFormattingRequest||(t.DocumentFormattingRequest={})).method="textDocument/formatting",x.type=new i.ProtocolRequestType(x.method),(S=t.DocumentRangeFormattingRequest||(t.DocumentRangeFormattingRequest={})).method="textDocument/rangeFormatting",S.type=new i.ProtocolRequestType(S.method),(T=t.DocumentOnTypeFormattingRequest||(t.DocumentOnTypeFormattingRequest={})).method="textDocument/onTypeFormatting",T.type=new i.ProtocolRequestType(T.method),(t.PrepareSupportDefaultBehavior||(t.PrepareSupportDefaultBehavior={})).Identifier=1,(E=t.RenameRequest||(t.RenameRequest={})).method="textDocument/rename",E.type=new i.ProtocolRequestType(E.method),(C=t.PrepareRenameRequest||(t.PrepareRenameRequest={})).method="textDocument/prepareRename",C.type=new i.ProtocolRequestType(C.method),(t.ExecuteCommandRequest||(t.ExecuteCommandRequest={})).type=new i.ProtocolRequestType("workspace/executeCommand"),(t.ApplyWorkspaceEditRequest||(t.ApplyWorkspaceEditRequest={})).type=new i.ProtocolRequestType("workspace/applyEdit")},26305:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeRequest=void 0;const n=r(66140);var i;(i=t.LinkedEditingRangeRequest||(t.LinkedEditingRangeRequest={})).method="textDocument/linkedEditingRange",i.type=new n.ProtocolRequestType(i.method)},73443:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=void 0;const n=r(66140);var i,o,s;(s=t.UniquenessLevel||(t.UniquenessLevel={})).document="document",s.project="project",s.group="group",s.scheme="scheme",s.global="global",(o=t.MonikerKind||(t.MonikerKind={})).import="import",o.export="export",o.local="local",(i=t.MonikerRequest||(t.MonikerRequest={})).method="textDocument/moniker",i.type=new n.ProtocolRequestType(i.method)},21862:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=void 0;const n=r(74389),i=r(66140);var o;(o=t.WorkDoneProgress||(t.WorkDoneProgress={})).type=new n.ProgressType,o.is=function(e){return e===o.type},(t.WorkDoneProgressCreateRequest||(t.WorkDoneProgressCreateRequest={})).type=new i.ProtocolRequestType("window/workDoneProgress/create"),(t.WorkDoneProgressCancelNotification||(t.WorkDoneProgressCancelNotification={})).type=new i.ProtocolNotificationType("window/workDoneProgress/cancel")},5206:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeRequest=void 0;const n=r(66140);var i;(i=t.SelectionRangeRequest||(t.SelectionRangeRequest={})).method="textDocument/selectionRange",i.type=new n.ProtocolRequestType(i.method)},39434:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.SemanticTokensRegistrationType=t.TokenFormat=t.SemanticTokens=t.SemanticTokenModifiers=t.SemanticTokenTypes=void 0;const n=r(66140);var i,o,s,a,c,l,u;(u=t.SemanticTokenTypes||(t.SemanticTokenTypes={})).namespace="namespace",u.type="type",u.class="class",u.enum="enum",u.interface="interface",u.struct="struct",u.typeParameter="typeParameter",u.parameter="parameter",u.variable="variable",u.property="property",u.enumMember="enumMember",u.event="event",u.function="function",u.method="method",u.macro="macro",u.keyword="keyword",u.modifier="modifier",u.comment="comment",u.string="string",u.number="number",u.regexp="regexp",u.operator="operator",(l=t.SemanticTokenModifiers||(t.SemanticTokenModifiers={})).declaration="declaration",l.definition="definition",l.readonly="readonly",l.static="static",l.deprecated="deprecated",l.abstract="abstract",l.async="async",l.modification="modification",l.documentation="documentation",l.defaultLibrary="defaultLibrary",(t.SemanticTokens||(t.SemanticTokens={})).is=function(e){const t=e;return void 0!==t&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])},(t.TokenFormat||(t.TokenFormat={})).Relative="relative",(c=t.SemanticTokensRegistrationType||(t.SemanticTokensRegistrationType={})).method="textDocument/semanticTokens",c.type=new n.RegistrationType(c.method),(a=t.SemanticTokensRequest||(t.SemanticTokensRequest={})).method="textDocument/semanticTokens/full",a.type=new n.ProtocolRequestType(a.method),(s=t.SemanticTokensDeltaRequest||(t.SemanticTokensDeltaRequest={})).method="textDocument/semanticTokens/full/delta",s.type=new n.ProtocolRequestType(s.method),(o=t.SemanticTokensRangeRequest||(t.SemanticTokensRangeRequest={})).method="textDocument/semanticTokens/range",o.type=new n.ProtocolRequestType(o.method),(i=t.SemanticTokensRefreshRequest||(t.SemanticTokensRefreshRequest={})).method="workspace/semanticTokens/refresh",i.type=new n.ProtocolRequestType0(i.method)},75726:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentRequest=void 0;const n=r(66140);var i;(i=t.ShowDocumentRequest||(t.ShowDocumentRequest={})).method="window/showDocument",i.type=new n.ProtocolRequestType(i.method)},71589:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDefinitionRequest=void 0;const n=r(66140);var i;(i=t.TypeDefinitionRequest||(t.TypeDefinitionRequest={})).method="textDocument/typeDefinition",i.type=new n.ProtocolRequestType(i.method)},79795:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=void 0;const n=r(66140);(t.WorkspaceFoldersRequest||(t.WorkspaceFoldersRequest={})).type=new n.ProtocolRequestType0("workspace/workspaceFolders"),(t.DidChangeWorkspaceFoldersNotification||(t.DidChangeWorkspaceFoldersNotification={})).type=new n.ProtocolNotificationType("workspace/didChangeWorkspaceFolders")},69533:(e,t)=>{"use strict";function r(e){return"string"==typeof e||e instanceof String}function n(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.objectLiteral=t.typedArray=t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=r,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=n,t.stringArray=function(e){return n(e)&&e.every((e=>r(e)))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.objectLiteral=function(e){return null!==e&&"object"==typeof e}},40273:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const o=r(95028);i(r(95028),t),i(r(51661),t),t.createProtocolConnection=function(e,t,r,n){return o.createMessageConnection(e,t,r,n)}},96560:(e,t,r)=>{"use strict";e.exports=r(40273)},96813:(e,t,r)=>{"use strict";r.r(t),r.d(t,{TextDocument:()=>n});var n,i=function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;ie?n=i:r=i+1}var o=r-1;return{line:o,character:e-t[o]}},e.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var r=t[e.line],n=e.line+1r.line||t.line===r.line&&t.character>r.character?{start:r,end:t}:e}function l(e){var t=c(e.range);return t!==e.range?{newText:e.newText,range:t}:e}!function(e){e.create=function(e,t,r,n){return new o(e,t,r,n)},e.update=function(e,t,r){if(e instanceof o)return e.update(t,r),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")},e.applyEdits=function(e,t){for(var r=e.getText(),n=0,i=[],o=0,a=s(t.map(l),(function(e,t){var r=e.range.start.line-t.range.start.line;return 0===r?e.range.start.character-t.range.start.character:r}));on&&i.push(r.substring(n,u)),c.newText.length&&i.push(c.newText),n=e.offsetAt(c.range.end)}return i.push(r.substr(n)),i.join("")}}(n||(n={}))},91674:(e,t,r)=>{"use strict";var n,i,o,s,a,c,l,u,d,p,h,f,g,m,y,v,_,b,w,C,E,T,S,x,k,I;r.r(t),r.d(t,{integer:()=>n,uinteger:()=>i,Position:()=>o,Range:()=>s,Location:()=>a,LocationLink:()=>c,Color:()=>l,ColorInformation:()=>u,ColorPresentation:()=>d,FoldingRangeKind:()=>p,FoldingRange:()=>h,DiagnosticRelatedInformation:()=>f,DiagnosticSeverity:()=>g,DiagnosticTag:()=>m,CodeDescription:()=>y,Diagnostic:()=>v,Command:()=>_,TextEdit:()=>b,ChangeAnnotation:()=>w,ChangeAnnotationIdentifier:()=>C,AnnotatedTextEdit:()=>E,TextDocumentEdit:()=>T,CreateFile:()=>S,RenameFile:()=>x,DeleteFile:()=>k,WorkspaceEdit:()=>I,WorkspaceChange:()=>ae,TextDocumentIdentifier:()=>A,VersionedTextDocumentIdentifier:()=>P,OptionalVersionedTextDocumentIdentifier:()=>R,TextDocumentItem:()=>N,MarkupKind:()=>O,MarkupContent:()=>D,CompletionItemKind:()=>L,InsertTextFormat:()=>M,CompletionItemTag:()=>B,InsertReplaceEdit:()=>F,InsertTextMode:()=>j,CompletionItem:()=>U,CompletionList:()=>$,MarkedString:()=>q,Hover:()=>H,ParameterInformation:()=>V,SignatureInformation:()=>z,DocumentHighlightKind:()=>K,DocumentHighlight:()=>W,SymbolKind:()=>G,SymbolTag:()=>Q,SymbolInformation:()=>Y,DocumentSymbol:()=>J,CodeActionKind:()=>X,CodeActionContext:()=>Z,CodeAction:()=>ee,CodeLens:()=>te,FormattingOptions:()=>re,DocumentLink:()=>ne,SelectionRange:()=>ie,EOL:()=>le,TextDocument:()=>ce}),function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647}(n||(n={})),function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647}(i||(i={})),function(e){e.create=function(e,t){return e===Number.MAX_VALUE&&(e=i.MAX_VALUE),t===Number.MAX_VALUE&&(t=i.MAX_VALUE),{line:e,character:t}},e.is=function(e){var t=e;return ue.objectLiteral(t)&&ue.uinteger(t.line)&&ue.uinteger(t.character)}}(o||(o={})),function(e){e.create=function(e,t,r,n){if(ue.uinteger(e)&&ue.uinteger(t)&&ue.uinteger(r)&&ue.uinteger(n))return{start:o.create(e,t),end:o.create(r,n)};if(o.is(e)&&o.is(t))return{start:e,end:t};throw new Error("Range#create called with invalid arguments["+e+", "+t+", "+r+", "+n+"]")},e.is=function(e){var t=e;return ue.objectLiteral(t)&&o.is(t.start)&&o.is(t.end)}}(s||(s={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){var t=e;return ue.defined(t)&&s.is(t.range)&&(ue.string(t.uri)||ue.undefined(t.uri))}}(a||(a={})),function(e){e.create=function(e,t,r,n){return{targetUri:e,targetRange:t,targetSelectionRange:r,originSelectionRange:n}},e.is=function(e){var t=e;return ue.defined(t)&&s.is(t.targetRange)&&ue.string(t.targetUri)&&(s.is(t.targetSelectionRange)||ue.undefined(t.targetSelectionRange))&&(s.is(t.originSelectionRange)||ue.undefined(t.originSelectionRange))}}(c||(c={})),function(e){e.create=function(e,t,r,n){return{red:e,green:t,blue:r,alpha:n}},e.is=function(e){var t=e;return ue.numberRange(t.red,0,1)&&ue.numberRange(t.green,0,1)&&ue.numberRange(t.blue,0,1)&&ue.numberRange(t.alpha,0,1)}}(l||(l={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){var t=e;return s.is(t.range)&&l.is(t.color)}}(u||(u={})),function(e){e.create=function(e,t,r){return{label:e,textEdit:t,additionalTextEdits:r}},e.is=function(e){var t=e;return ue.string(t.label)&&(ue.undefined(t.textEdit)||b.is(t))&&(ue.undefined(t.additionalTextEdits)||ue.typedArray(t.additionalTextEdits,b.is))}}(d||(d={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(p||(p={})),function(e){e.create=function(e,t,r,n,i){var o={startLine:e,endLine:t};return ue.defined(r)&&(o.startCharacter=r),ue.defined(n)&&(o.endCharacter=n),ue.defined(i)&&(o.kind=i),o},e.is=function(e){var t=e;return ue.uinteger(t.startLine)&&ue.uinteger(t.startLine)&&(ue.undefined(t.startCharacter)||ue.uinteger(t.startCharacter))&&(ue.undefined(t.endCharacter)||ue.uinteger(t.endCharacter))&&(ue.undefined(t.kind)||ue.string(t.kind))}}(h||(h={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){var t=e;return ue.defined(t)&&a.is(t.location)&&ue.string(t.message)}}(f||(f={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(g||(g={})),function(e){e.Unnecessary=1,e.Deprecated=2}(m||(m={})),function(e){e.is=function(e){var t=e;return null!=t&&ue.string(t.href)}}(y||(y={})),function(e){e.create=function(e,t,r,n,i,o){var s={range:e,message:t};return ue.defined(r)&&(s.severity=r),ue.defined(n)&&(s.code=n),ue.defined(i)&&(s.source=i),ue.defined(o)&&(s.relatedInformation=o),s},e.is=function(e){var t,r=e;return ue.defined(r)&&s.is(r.range)&&ue.string(r.message)&&(ue.number(r.severity)||ue.undefined(r.severity))&&(ue.integer(r.code)||ue.string(r.code)||ue.undefined(r.code))&&(ue.undefined(r.codeDescription)||ue.string(null===(t=r.codeDescription)||void 0===t?void 0:t.href))&&(ue.string(r.source)||ue.undefined(r.source))&&(ue.undefined(r.relatedInformation)||ue.typedArray(r.relatedInformation,f.is))}}(v||(v={})),function(e){e.create=function(e,t){for(var r=[],n=2;n0&&(i.arguments=r),i},e.is=function(e){var t=e;return ue.defined(t)&&ue.string(t.title)&&ue.string(t.command)}}(_||(_={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){var t=e;return ue.objectLiteral(t)&&ue.string(t.newText)&&s.is(t.range)}}(b||(b={})),function(e){e.create=function(e,t,r){var n={label:e};return void 0!==t&&(n.needsConfirmation=t),void 0!==r&&(n.description=r),n},e.is=function(e){var t=e;return void 0!==t&&ue.objectLiteral(t)&&ue.string(t.label)&&(ue.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(ue.string(t.description)||void 0===t.description)}}(w||(w={})),function(e){e.is=function(e){return"string"==typeof e}}(C||(C={})),function(e){e.replace=function(e,t,r){return{range:e,newText:t,annotationId:r}},e.insert=function(e,t,r){return{range:{start:e,end:e},newText:t,annotationId:r}},e.del=function(e,t){return{range:e,newText:"",annotationId:t}},e.is=function(e){var t=e;return b.is(t)&&(w.is(t.annotationId)||C.is(t.annotationId))}}(E||(E={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){var t=e;return ue.defined(t)&&R.is(t.textDocument)&&Array.isArray(t.edits)}}(T||(T={})),function(e){e.create=function(e,t,r){var n={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(n.options=t),void 0!==r&&(n.annotationId=r),n},e.is=function(e){var t=e;return t&&"create"===t.kind&&ue.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||ue.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||ue.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||C.is(t.annotationId))}}(S||(S={})),function(e){e.create=function(e,t,r,n){var i={kind:"rename",oldUri:e,newUri:t};return void 0===r||void 0===r.overwrite&&void 0===r.ignoreIfExists||(i.options=r),void 0!==n&&(i.annotationId=n),i},e.is=function(e){var t=e;return t&&"rename"===t.kind&&ue.string(t.oldUri)&&ue.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||ue.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||ue.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||C.is(t.annotationId))}}(x||(x={})),function(e){e.create=function(e,t,r){var n={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(n.options=t),void 0!==r&&(n.annotationId=r),n},e.is=function(e){var t=e;return t&&"delete"===t.kind&&ue.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||ue.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||ue.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||C.is(t.annotationId))}}(k||(k={})),function(e){e.is=function(e){var t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((function(e){return ue.string(e.kind)?S.is(e)||x.is(e)||k.is(e):T.is(e)})))}}(I||(I={}));var A,P,R,N,O,D,L,M,B,F,j,U,$,q,H,V,z,K,W,G,Q,Y,J,X,Z,ee,te,re,ne,ie,oe=function(){function e(e,t){this.edits=e,this.changeAnnotations=t}return e.prototype.insert=function(e,t,r){var n,i;if(void 0===r?n=b.insert(e,t):C.is(r)?(i=r,n=E.insert(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),n=E.insert(e,t,i)),this.edits.push(n),void 0!==i)return i},e.prototype.replace=function(e,t,r){var n,i;if(void 0===r?n=b.replace(e,t):C.is(r)?(i=r,n=E.replace(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),n=E.replace(e,t,i)),this.edits.push(n),void 0!==i)return i},e.prototype.delete=function(e,t){var r,n;if(void 0===t?r=b.del(e):C.is(t)?(n=t,r=E.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(t),r=E.del(e,n)),this.edits.push(r),void 0!==n)return n},e.prototype.add=function(e){this.edits.push(e)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e.prototype.assertChangeAnnotations=function(e){if(void 0===e)throw new Error("Text edit change is not configured to manage change annotations.")},e}(),se=function(){function e(e){this._annotations=void 0===e?Object.create(null):e,this._counter=0,this._size=0}return e.prototype.all=function(){return this._annotations},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.manage=function(e,t){var r;if(C.is(e)?r=e:(r=this.nextId(),t=e),void 0!==this._annotations[r])throw new Error("Id "+r+" is already in use.");if(void 0===t)throw new Error("No annotation provided for id "+r);return this._annotations[r]=t,this._size++,r},e.prototype.nextId=function(){return this._counter++,this._counter.toString()},e}(),ae=function(){function e(e){var t=this;this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new se(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach((function(e){if(T.is(e)){var r=new oe(e.edits,t._changeAnnotations);t._textEditChanges[e.textDocument.uri]=r}}))):e.changes&&Object.keys(e.changes).forEach((function(r){var n=new oe(e.changes[r]);t._textEditChanges[r]=n}))):this._workspaceEdit={}}return Object.defineProperty(e.prototype,"edit",{get:function(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),e.prototype.getTextEditChange=function(e){if(R.is(e)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var t={uri:e.uri,version:e.version};if(!(n=this._textEditChanges[t.uri])){var r={textDocument:t,edits:i=[]};this._workspaceEdit.documentChanges.push(r),n=new oe(i,this._changeAnnotations),this._textEditChanges[t.uri]=n}return n}if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var n;if(!(n=this._textEditChanges[e])){var i=[];this._workspaceEdit.changes[e]=i,n=new oe(i),this._textEditChanges[e]=n}return n},e.prototype.initDocumentChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new se,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},e.prototype.initChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))},e.prototype.createFile=function(e,t,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var n,i,o;if(w.is(t)||C.is(t)?n=t:r=t,void 0===n?i=S.create(e,r):(o=C.is(n)?n:this._changeAnnotations.manage(n),i=S.create(e,r,o)),this._workspaceEdit.documentChanges.push(i),void 0!==o)return o},e.prototype.renameFile=function(e,t,r,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var i,o,s;if(w.is(r)||C.is(r)?i=r:n=r,void 0===i?o=x.create(e,t,n):(s=C.is(i)?i:this._changeAnnotations.manage(i),o=x.create(e,t,n,s)),this._workspaceEdit.documentChanges.push(o),void 0!==s)return s},e.prototype.deleteFile=function(e,t,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var n,i,o;if(w.is(t)||C.is(t)?n=t:r=t,void 0===n?i=k.create(e,r):(o=C.is(n)?n:this._changeAnnotations.manage(n),i=k.create(e,r,o)),this._workspaceEdit.documentChanges.push(i),void 0!==o)return o},e}();!function(e){e.create=function(e){return{uri:e}},e.is=function(e){var t=e;return ue.defined(t)&&ue.string(t.uri)}}(A||(A={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return ue.defined(t)&&ue.string(t.uri)&&ue.integer(t.version)}}(P||(P={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return ue.defined(t)&&ue.string(t.uri)&&(null===t.version||ue.integer(t.version))}}(R||(R={})),function(e){e.create=function(e,t,r,n){return{uri:e,languageId:t,version:r,text:n}},e.is=function(e){var t=e;return ue.defined(t)&&ue.string(t.uri)&&ue.string(t.languageId)&&ue.integer(t.version)&&ue.string(t.text)}}(N||(N={})),function(e){e.PlainText="plaintext",e.Markdown="markdown"}(O||(O={})),function(e){e.is=function(t){var r=t;return r===e.PlainText||r===e.Markdown}}(O||(O={})),function(e){e.is=function(e){var t=e;return ue.objectLiteral(e)&&O.is(t.kind)&&ue.string(t.value)}}(D||(D={})),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}(L||(L={})),function(e){e.PlainText=1,e.Snippet=2}(M||(M={})),function(e){e.Deprecated=1}(B||(B={})),function(e){e.create=function(e,t,r){return{newText:e,insert:t,replace:r}},e.is=function(e){var t=e;return t&&ue.string(t.newText)&&s.is(t.insert)&&s.is(t.replace)}}(F||(F={})),function(e){e.asIs=1,e.adjustIndentation=2}(j||(j={})),function(e){e.create=function(e){return{label:e}}}(U||(U={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}($||($={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){var t=e;return ue.string(t)||ue.objectLiteral(t)&&ue.string(t.language)&&ue.string(t.value)}}(q||(q={})),function(e){e.is=function(e){var t=e;return!!t&&ue.objectLiteral(t)&&(D.is(t.contents)||q.is(t.contents)||ue.typedArray(t.contents,q.is))&&(void 0===e.range||s.is(e.range))}}(H||(H={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(V||(V={})),function(e){e.create=function(e,t){for(var r=[],n=2;n=0;s--){var a=i[s],c=e.offsetAt(a.range.start),l=e.offsetAt(a.range.end);if(!(l<=o))throw new Error("Overlapping edit");n=n.substring(0,c)+a.newText+n.substring(l,n.length),o=c}return n}}(ce||(ce={}));var ue,de=function(){function e(e,t,r,n){this._uri=e,this._languageId=t,this._version=r,this._content=n,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),e.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(t,r)}return this._content},e.prototype.update=function(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0},e.prototype.getLineOffsets=function(){if(void 0===this._lineOffsets){for(var e=[],t=this._content,r=!0,n=0;n0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},e.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),r=0,n=t.length;if(0===n)return o.create(0,e);for(;re?n=i:r=i+1}var s=r-1;return o.create(s,e-t[s])},e.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var r=t[e.line],n=e.line+1{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyFeature=void 0;const n=r(40273);t.CallHierarchyFeature=e=>class extends e{get callHierarchy(){return{onPrepare:e=>{this.connection.onRequest(n.CallHierarchyPrepareRequest.type,((t,r)=>e(t,r,this.attachWorkDoneProgress(t),void 0)))},onIncomingCalls:e=>{const t=n.CallHierarchyIncomingCallsRequest.type;this.connection.onRequest(t,((r,n)=>e(r,n,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(t,r))))},onOutgoingCalls:e=>{const t=n.CallHierarchyOutgoingCallsRequest.type;this.connection.onRequest(t,((r,n)=>e(r,n,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(t,r))))}}}}},52507:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationFeature=void 0;const n=r(40273),i=r(40289);t.ConfigurationFeature=e=>class extends e{getConfiguration(e){return e?i.string(e)?this._getConfiguration({section:e}):this._getConfiguration(e):this._getConfiguration({})}_getConfiguration(e){let t={items:Array.isArray(e)?e:[e]};return this.connection.sendRequest(n.ConfigurationRequest.type,t).then((t=>Array.isArray(e)?t:t[0]))}}},50828:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileOperationsFeature=void 0;const n=r(40273);t.FileOperationsFeature=e=>class extends e{onDidCreateFiles(e){this.connection.onNotification(n.DidCreateFilesNotification.type,(t=>{e(t)}))}onDidRenameFiles(e){this.connection.onNotification(n.DidRenameFilesNotification.type,(t=>{e(t)}))}onDidDeleteFiles(e){this.connection.onNotification(n.DidDeleteFilesNotification.type,(t=>{e(t)}))}onWillCreateFiles(e){return this.connection.onRequest(n.WillCreateFilesRequest.type,((t,r)=>e(t,r)))}onWillRenameFiles(e){return this.connection.onRequest(n.WillRenameFilesRequest.type,((t,r)=>e(t,r)))}onWillDeleteFiles(e){return this.connection.onRequest(n.WillDeleteFilesRequest.type,((t,r)=>e(t,r)))}}},22776:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeFeature=void 0;const n=r(40273);t.LinkedEditingRangeFeature=e=>class extends e{onLinkedEditingRange(e){this.connection.onRequest(n.LinkedEditingRangeRequest.type,((t,r)=>e(t,r,this.attachWorkDoneProgress(t),void 0)))}}},8120:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerFeature=void 0;const n=r(40273);t.MonikerFeature=e=>class extends e{get moniker(){return{on:e=>{const t=n.MonikerRequest.type;this.connection.onRequest(t,((r,n)=>e(r,n,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(t,r))))}}}}},42731:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.attachPartialResult=t.ProgressFeature=t.attachWorkDone=void 0;const n=r(40273),i=r(37560);class o{constructor(e,t){this._connection=e,this._token=t,o.Instances.set(this._token,this)}begin(e,t,r,i){let o={kind:"begin",title:e,percentage:t,message:r,cancellable:i};this._connection.sendProgress(n.WorkDoneProgress.type,this._token,o)}report(e,t){let r={kind:"report"};"number"==typeof e?(r.percentage=e,void 0!==t&&(r.message=t)):r.message=e,this._connection.sendProgress(n.WorkDoneProgress.type,this._token,r)}done(){o.Instances.delete(this._token),this._connection.sendProgress(n.WorkDoneProgress.type,this._token,{kind:"end"})}}o.Instances=new Map;class s extends o{constructor(e,t){super(e,t),this._source=new n.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}}class a{constructor(){}begin(){}report(){}done(){}}class c extends a{constructor(){super(),this._source=new n.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}}var l;t.attachWorkDone=function(e,t){if(void 0===t||void 0===t.workDoneToken)return new a;const r=t.workDoneToken;return delete t.workDoneToken,new o(e,r)},t.ProgressFeature=e=>class extends e{constructor(){super(),this._progressSupported=!1}initialize(e){var t;!0===(null===(t=null==e?void 0:e.window)||void 0===t?void 0:t.workDoneProgress)&&(this._progressSupported=!0,this.connection.onNotification(n.WorkDoneProgressCancelNotification.type,(e=>{let t=o.Instances.get(e.token);(t instanceof s||t instanceof c)&&t.cancel()})))}attachWorkDoneProgress(e){return void 0===e?new a:new o(this.connection,e)}createWorkDoneProgress(){if(this._progressSupported){const e=i.generateUuid();return this.connection.sendRequest(n.WorkDoneProgressCreateRequest.type,{token:e}).then((()=>new s(this.connection,e)))}return Promise.resolve(new c)}},function(e){e.type=new n.ProgressType}(l||(l={}));class u{constructor(e,t){this._connection=e,this._token=t}report(e){this._connection.sendProgress(l.type,this._token,e)}}t.attachPartialResult=function(e,t){if(void 0===t||void 0===t.partialResultToken)return;const r=t.partialResultToken;return delete t.partialResultToken,new u(e,r)}},59817:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensBuilder=t.SemanticTokensFeature=void 0;const n=r(40273);t.SemanticTokensFeature=e=>class extends e{get semanticTokens(){return{on:e=>{const t=n.SemanticTokensRequest.type;this.connection.onRequest(t,((r,n)=>e(r,n,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(t,r))))},onDelta:e=>{const t=n.SemanticTokensDeltaRequest.type;this.connection.onRequest(t,((r,n)=>e(r,n,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(t,r))))},onRange:e=>{const t=n.SemanticTokensRangeRequest.type;this.connection.onRequest(t,((r,n)=>e(r,n,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(t,r))))}}}},t.SemanticTokensBuilder=class{constructor(){this._prevData=void 0,this.initialize()}initialize(){this._id=Date.now(),this._prevLine=0,this._prevChar=0,this._data=[],this._dataLen=0}push(e,t,r,n,i){let o=e,s=t;this._dataLen>0&&(o-=this._prevLine,0===o&&(s-=this._prevChar)),this._data[this._dataLen++]=o,this._data[this._dataLen++]=s,this._data[this._dataLen++]=r,this._data[this._dataLen++]=n,this._data[this._dataLen++]=i,this._prevLine=e,this._prevChar=t}get id(){return this._id.toString()}previousResult(e){this.id===e&&(this._prevData=this._data),this.initialize()}build(){return this._prevData=void 0,{resultId:this.id,data:this._data}}canBuildEdits(){return void 0!==this._prevData}buildEdits(){if(void 0!==this._prevData){const e=this._prevData.length,t=this._data.length;let r=0;for(;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createConnection=t.combineFeatures=t.combineLanguagesFeatures=t.combineWorkspaceFeatures=t.combineWindowFeatures=t.combineClientFeatures=t.combineTracerFeatures=t.combineTelemetryFeatures=t.combineConsoleFeatures=t._LanguagesImpl=t.BulkUnregistration=t.BulkRegistration=t.ErrorMessageTracker=t.TextDocuments=void 0;const n=r(40273),i=r(40289),o=r(37560),s=r(42731),a=r(52507),c=r(28634),l=r(47985),u=r(59817),d=r(85421),p=r(50828),h=r(22776),f=r(8120);function g(e){if(null!==e)return e}t.TextDocuments=class{constructor(e){this._documents=Object.create(null),this._configuration=e,this._onDidChangeContent=new n.Emitter,this._onDidOpen=new n.Emitter,this._onDidClose=new n.Emitter,this._onDidSave=new n.Emitter,this._onWillSave=new n.Emitter}get onDidChangeContent(){return this._onDidChangeContent.event}get onDidOpen(){return this._onDidOpen.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(e){this._willSaveWaitUntil=e}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(e){return this._documents[e]}all(){return Object.keys(this._documents).map((e=>this._documents[e]))}keys(){return Object.keys(this._documents)}listen(e){e.__textDocumentSync=n.TextDocumentSyncKind.Full,e.onDidOpenTextDocument((e=>{let t=e.textDocument,r=this._configuration.create(t.uri,t.languageId,t.version,t.text);this._documents[t.uri]=r;let n=Object.freeze({document:r});this._onDidOpen.fire(n),this._onDidChangeContent.fire(n)})),e.onDidChangeTextDocument((e=>{let t=e.textDocument,r=e.contentChanges;if(0===r.length)return;let n=this._documents[t.uri];const{version:i}=t;if(null==i)throw new Error(`Received document change event for ${t.uri} without valid version identifier`);n=this._configuration.update(n,r,i),this._documents[t.uri]=n,this._onDidChangeContent.fire(Object.freeze({document:n}))})),e.onDidCloseTextDocument((e=>{let t=this._documents[e.textDocument.uri];t&&(delete this._documents[e.textDocument.uri],this._onDidClose.fire(Object.freeze({document:t})))})),e.onWillSaveTextDocument((e=>{let t=this._documents[e.textDocument.uri];t&&this._onWillSave.fire(Object.freeze({document:t,reason:e.reason}))})),e.onWillSaveTextDocumentWaitUntil(((e,t)=>{let r=this._documents[e.textDocument.uri];return r&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:r,reason:e.reason}),t):[]})),e.onDidSaveTextDocument((e=>{let t=this._documents[e.textDocument.uri];t&&this._onDidSave.fire(Object.freeze({document:t}))}))}},t.ErrorMessageTracker=class{constructor(){this._messages=Object.create(null)}add(e){let t=this._messages[e];t||(t=0),t++,this._messages[e]=t}sendErrors(e){Object.keys(this._messages).forEach((t=>{e.window.showErrorMessage(t)}))}};class m{constructor(){}rawAttach(e){this._rawConnection=e}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(e){}initialize(e){}error(e){this.send(n.MessageType.Error,e)}warn(e){this.send(n.MessageType.Warning,e)}info(e){this.send(n.MessageType.Info,e)}log(e){this.send(n.MessageType.Log,e)}send(e,t){this._rawConnection&&this._rawConnection.sendNotification(n.LogMessageNotification.type,{type:e,message:t})}}const y=d.ShowDocumentFeature(s.ProgressFeature(class{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}showErrorMessage(e,...t){let r={type:n.MessageType.Error,message:e,actions:t};return this.connection.sendRequest(n.ShowMessageRequest.type,r).then(g)}showWarningMessage(e,...t){let r={type:n.MessageType.Warning,message:e,actions:t};return this.connection.sendRequest(n.ShowMessageRequest.type,r).then(g)}showInformationMessage(e,...t){let r={type:n.MessageType.Info,message:e,actions:t};return this.connection.sendRequest(n.ShowMessageRequest.type,r).then(g)}}));(t.BulkRegistration||(t.BulkRegistration={})).create=function(){return new v};class v{constructor(){this._registrations=[],this._registered=new Set}add(e,t){const r=i.string(e)?e:e.method;if(this._registered.has(r))throw new Error(`${r} is already added to this registration`);const n=o.generateUuid();this._registrations.push({id:n,method:r,registerOptions:t||{}}),this._registered.add(r)}asRegistrationParams(){return{registrations:this._registrations}}}(t.BulkUnregistration||(t.BulkUnregistration={})).create=function(){return new _(void 0,[])};class _{constructor(e,t){this._connection=e,this._unregistrations=new Map,t.forEach((e=>{this._unregistrations.set(e.method,e)}))}get isAttached(){return!!this._connection}attach(e){this._connection=e}add(e){this._unregistrations.set(e.method,e)}dispose(){let e=[];for(let t of this._unregistrations.values())e.push(t);let t={unregisterations:e};this._connection.sendRequest(n.UnregistrationRequest.type,t).then(void 0,(e=>{this._connection.console.info("Bulk unregistration failed.")}))}disposeSingle(e){const t=i.string(e)?e:e.method,r=this._unregistrations.get(t);if(!r)return!1;let o={unregisterations:[r]};return this._connection.sendRequest(n.UnregistrationRequest.type,o).then((()=>{this._unregistrations.delete(t)}),(e=>{this._connection.console.info(`Un-registering request handler for ${r.id} failed.`)})),!0}}class b{attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}register(e,t,r){return e instanceof v?this.registerMany(e):e instanceof _?this.registerSingle1(e,t,r):this.registerSingle2(e,t)}registerSingle1(e,t,r){const s=i.string(t)?t:t.method,a=o.generateUuid();let c={registrations:[{id:a,method:s,registerOptions:r||{}}]};return e.isAttached||e.attach(this.connection),this.connection.sendRequest(n.RegistrationRequest.type,c).then((t=>(e.add({id:a,method:s}),e)),(e=>(this.connection.console.info(`Registering request handler for ${s} failed.`),Promise.reject(e))))}registerSingle2(e,t){const r=i.string(e)?e:e.method,s=o.generateUuid();let a={registrations:[{id:s,method:r,registerOptions:t||{}}]};return this.connection.sendRequest(n.RegistrationRequest.type,a).then((e=>n.Disposable.create((()=>{this.unregisterSingle(s,r)}))),(e=>(this.connection.console.info(`Registering request handler for ${r} failed.`),Promise.reject(e))))}unregisterSingle(e,t){let r={unregisterations:[{id:e,method:t}]};return this.connection.sendRequest(n.UnregistrationRequest.type,r).then(void 0,(t=>{this.connection.console.info(`Un-registering request handler for ${e} failed.`)}))}registerMany(e){let t=e.asRegistrationParams();return this.connection.sendRequest(n.RegistrationRequest.type,t).then((()=>new _(this._connection,t.registrations.map((e=>({id:e.id,method:e.method}))))),(e=>(this.connection.console.info("Bulk registration failed."),Promise.reject(e))))}}const w=p.FileOperationsFeature(c.WorkspaceFoldersFeature(a.ConfigurationFeature(class{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}applyEdit(e){let t=(r=e)&&r.edit?e:{edit:e};var r;return this.connection.sendRequest(n.ApplyWorkspaceEditRequest.type,t)}})));class C{constructor(){this._trace=n.Trace.Off}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}set trace(e){this._trace=e}log(e,t){this._trace!==n.Trace.Off&&this.connection.sendNotification(n.LogTraceNotification.type,{message:e,verbose:this._trace===n.Trace.Verbose?t:void 0})}}class E{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}logEvent(e){this.connection.sendNotification(n.TelemetryEventNotification.type,e)}}class T{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}attachWorkDoneProgress(e){return s.attachWorkDone(this.connection,e)}attachPartialResultProgress(e,t){return s.attachPartialResult(this.connection,t)}}t._LanguagesImpl=T;const S=f.MonikerFeature(h.LinkedEditingRangeFeature(u.SemanticTokensFeature(l.CallHierarchyFeature(T))));function x(e,t){return function(r){return t(e(r))}}function k(e,t){return function(r){return t(e(r))}}function I(e,t){return function(r){return t(e(r))}}function A(e,t){return function(r){return t(e(r))}}function P(e,t){return function(r){return t(e(r))}}function R(e,t){return function(r){return t(e(r))}}t.combineConsoleFeatures=x,t.combineTelemetryFeatures=k,t.combineTracerFeatures=I,t.combineClientFeatures=A,t.combineWindowFeatures=P,t.combineWorkspaceFeatures=R,t.combineLanguagesFeatures=function(e,t){return function(r){return t(e(r))}},t.combineFeatures=function(e,t){function r(e,t,r){return e&&t?r(e,t):e||t}return{__brand:"features",console:r(e.console,t.console,x),tracer:r(e.tracer,t.tracer,I),telemetry:r(e.telemetry,t.telemetry,k),client:r(e.client,t.client,A),window:r(e.window,t.window,P),workspace:r(e.workspace,t.workspace,R)}},t.createConnection=function(e,t,r){const o=r&&r.console?new(r.console(m)):new m,a=e(o);o.rawAttach(a);const c=r&&r.tracer?new(r.tracer(C)):new C,l=r&&r.telemetry?new(r.telemetry(E)):new E,u=r&&r.client?new(r.client(b)):new b,d=r&&r.window?new(r.window(y)):new y,p=r&&r.workspace?new(r.workspace(w)):new w,h=r&&r.languages?new(r.languages(S)):new S,f=[o,c,l,u,d,p,h];function g(e){return e instanceof Promise?e:i.thenable(e)?new Promise(((t,r)=>{e.then((e=>t(e)),(e=>r(e)))})):Promise.resolve(e)}let v,_,T,x={listen:()=>a.listen(),sendRequest:(e,...t)=>a.sendRequest(i.string(e)?e:e.method,...t),onRequest:(e,t)=>a.onRequest(e,t),sendNotification:(e,t)=>{const r=i.string(e)?e:e.method;1===arguments.length?a.sendNotification(r):a.sendNotification(r,t)},onNotification:(e,t)=>a.onNotification(e,t),onProgress:a.onProgress,sendProgress:a.sendProgress,onInitialize:e=>_=e,onInitialized:e=>a.onNotification(n.InitializedNotification.type,e),onShutdown:e=>v=e,onExit:e=>T=e,get console(){return o},get telemetry(){return l},get tracer(){return c},get client(){return u},get window(){return d},get workspace(){return p},get languages(){return h},onDidChangeConfiguration:e=>a.onNotification(n.DidChangeConfigurationNotification.type,e),onDidChangeWatchedFiles:e=>a.onNotification(n.DidChangeWatchedFilesNotification.type,e),__textDocumentSync:void 0,onDidOpenTextDocument:e=>a.onNotification(n.DidOpenTextDocumentNotification.type,e),onDidChangeTextDocument:e=>a.onNotification(n.DidChangeTextDocumentNotification.type,e),onDidCloseTextDocument:e=>a.onNotification(n.DidCloseTextDocumentNotification.type,e),onWillSaveTextDocument:e=>a.onNotification(n.WillSaveTextDocumentNotification.type,e),onWillSaveTextDocumentWaitUntil:e=>a.onRequest(n.WillSaveTextDocumentWaitUntilRequest.type,e),onDidSaveTextDocument:e=>a.onNotification(n.DidSaveTextDocumentNotification.type,e),sendDiagnostics:e=>a.sendNotification(n.PublishDiagnosticsNotification.type,e),onHover:e=>a.onRequest(n.HoverRequest.type,((t,r)=>e(t,r,s.attachWorkDone(a,t),void 0))),onCompletion:e=>a.onRequest(n.CompletionRequest.type,((t,r)=>e(t,r,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onCompletionResolve:e=>a.onRequest(n.CompletionResolveRequest.type,e),onSignatureHelp:e=>a.onRequest(n.SignatureHelpRequest.type,((t,r)=>e(t,r,s.attachWorkDone(a,t),void 0))),onDeclaration:e=>a.onRequest(n.DeclarationRequest.type,((t,r)=>e(t,r,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onDefinition:e=>a.onRequest(n.DefinitionRequest.type,((t,r)=>e(t,r,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onTypeDefinition:e=>a.onRequest(n.TypeDefinitionRequest.type,((t,r)=>e(t,r,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onImplementation:e=>a.onRequest(n.ImplementationRequest.type,((t,r)=>e(t,r,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onReferences:e=>a.onRequest(n.ReferencesRequest.type,((t,r)=>e(t,r,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onDocumentHighlight:e=>a.onRequest(n.DocumentHighlightRequest.type,((t,r)=>e(t,r,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onDocumentSymbol:e=>a.onRequest(n.DocumentSymbolRequest.type,((t,r)=>e(t,r,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onWorkspaceSymbol:e=>a.onRequest(n.WorkspaceSymbolRequest.type,((t,r)=>e(t,r,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onCodeAction:e=>a.onRequest(n.CodeActionRequest.type,((t,r)=>e(t,r,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onCodeActionResolve:e=>a.onRequest(n.CodeActionResolveRequest.type,((t,r)=>e(t,r))),onCodeLens:e=>a.onRequest(n.CodeLensRequest.type,((t,r)=>e(t,r,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onCodeLensResolve:e=>a.onRequest(n.CodeLensResolveRequest.type,((t,r)=>e(t,r))),onDocumentFormatting:e=>a.onRequest(n.DocumentFormattingRequest.type,((t,r)=>e(t,r,s.attachWorkDone(a,t),void 0))),onDocumentRangeFormatting:e=>a.onRequest(n.DocumentRangeFormattingRequest.type,((t,r)=>e(t,r,s.attachWorkDone(a,t),void 0))),onDocumentOnTypeFormatting:e=>a.onRequest(n.DocumentOnTypeFormattingRequest.type,((t,r)=>e(t,r))),onRenameRequest:e=>a.onRequest(n.RenameRequest.type,((t,r)=>e(t,r,s.attachWorkDone(a,t),void 0))),onPrepareRename:e=>a.onRequest(n.PrepareRenameRequest.type,((t,r)=>e(t,r))),onDocumentLinks:e=>a.onRequest(n.DocumentLinkRequest.type,((t,r)=>e(t,r,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onDocumentLinkResolve:e=>a.onRequest(n.DocumentLinkResolveRequest.type,((t,r)=>e(t,r))),onDocumentColor:e=>a.onRequest(n.DocumentColorRequest.type,((t,r)=>e(t,r,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onColorPresentation:e=>a.onRequest(n.ColorPresentationRequest.type,((t,r)=>e(t,r,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onFoldingRanges:e=>a.onRequest(n.FoldingRangeRequest.type,((t,r)=>e(t,r,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onSelectionRanges:e=>a.onRequest(n.SelectionRangeRequest.type,((t,r)=>e(t,r,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onExecuteCommand:e=>a.onRequest(n.ExecuteCommandRequest.type,((t,r)=>e(t,r,s.attachWorkDone(a,t),void 0))),dispose:()=>a.dispose()};for(let e of f)e.attach(x);return a.onRequest(n.InitializeRequest.type,(e=>{t.initialize(e),i.string(e.trace)&&(c.trace=n.Trace.fromString(e.trace));for(let t of f)t.initialize(e.capabilities);if(_)return g(_(e,(new n.CancellationTokenSource).token,s.attachWorkDone(a,e),void 0)).then((e=>{if(e instanceof n.ResponseError)return e;let t=e;t||(t={capabilities:{}});let r=t.capabilities;r||(r={},t.capabilities=r),void 0===r.textDocumentSync||null===r.textDocumentSync?r.textDocumentSync=i.number(x.__textDocumentSync)?x.__textDocumentSync:n.TextDocumentSyncKind.None:i.number(r.textDocumentSync)||i.number(r.textDocumentSync.change)||(r.textDocumentSync.change=i.number(x.__textDocumentSync)?x.__textDocumentSync:n.TextDocumentSyncKind.None);for(let e of f)e.fillServerCapabilities(r);return t}));{let e={capabilities:{textDocumentSync:n.TextDocumentSyncKind.None}};for(let t of f)t.fillServerCapabilities(e.capabilities);return e}})),a.onRequest(n.ShutdownRequest.type,(()=>(t.shutdownReceived=!0,v?v((new n.CancellationTokenSource).token):void 0))),a.onNotification(n.ExitNotification.type,(()=>{try{T&&T()}finally{t.shutdownReceived?t.exit(0):t.exit(1)}})),a.onNotification(n.SetTraceNotification.type,(e=>{c.trace=n.Trace.fromString(e.value)})),x}},85421:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentFeature=void 0;const n=r(40273);t.ShowDocumentFeature=e=>class extends e{showDocument(e){return this.connection.sendRequest(n.ShowDocumentRequest.type,e)}}},40289:(e,t)=>{"use strict";function r(e){return"string"==typeof e||e instanceof String}function n(e){return"function"==typeof e}function i(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.thenable=t.typedArray=t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=r,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=n,t.array=i,t.stringArray=function(e){return i(e)&&e.every((e=>r(e)))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.thenable=function(e){return e&&n(e.then)}},37560:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateUuid=t.parse=t.isUUID=t.v4=t.empty=void 0;class r{constructor(e){this._value=e}asHex(){return this._value}equals(e){return this.asHex()===e.asHex()}}class n extends r{constructor(){super([n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),"-",n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),"-","4",n._randomHex(),n._randomHex(),n._randomHex(),"-",n._oneOf(n._timeHighBits),n._randomHex(),n._randomHex(),n._randomHex(),"-",n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex()].join(""))}static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return n._oneOf(n._chars)}}function i(){return new n}n._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"],n._timeHighBits=["8","9","a","b"],t.empty=new r("00000000-0000-0000-0000-000000000000"),t.v4=i;const o=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function s(e){return o.test(e)}t.isUUID=s,t.parse=function(e){if(!s(e))throw new Error("invalid uuid");return new r(e)},t.generateUuid=function(){return i().asHex()}},28634:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceFoldersFeature=void 0;const n=r(40273);t.WorkspaceFoldersFeature=e=>class extends e{initialize(e){let t=e.workspace;t&&t.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new n.Emitter,this.connection.onNotification(n.DidChangeWorkspaceFoldersNotification.type,(e=>{this._onDidChangeWorkspaceFolders.fire(e.event)})))}getWorkspaceFolders(){return this.connection.sendRequest(n.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return this._unregistration||(this._unregistration=this.connection.client.register(n.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}}},87613:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveModulePath=t.FileSystem=t.resolveGlobalYarnPath=t.resolveGlobalNodePath=t.resolve=t.uriToFilePath=void 0;const n=r(57310),i=r(71017),o=r(57147),s=r(32081);function a(){return"win32"===process.platform}function c(e,t,r,n){const a="NODE_PATH",c=["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(((l,u)=>{let d=process.env,p=Object.create(null);Object.keys(d).forEach((e=>p[e]=d[e])),t&&o.existsSync(t)&&(p[a]?p[a]=t+i.delimiter+p[a]:p[a]=t,n&&n(`NODE_PATH value is: ${p[a]}`)),p.ELECTRON_RUN_AS_NODE="1";try{let t=s.fork("",[],{cwd:r,env:p,execArgv:["-e",c]});if(void 0===t.pid)return void u(new Error(`Starting process to resolve node module ${e} failed`));t.on("error",(e=>{u(e)})),t.on("message",(r=>{"r"===r.c&&(t.send({c:"e"}),r.s?l(r.r):u(new Error(`Failed to resolve module: ${e}`)))}));let n={c:"rs",a:e};t.send(n)}catch(e){u(e)}}))}function l(e){let t="npm";const r=Object.create(null);Object.keys(process.env).forEach((e=>r[e]=process.env[e])),r.NO_UPDATE_NOTIFIER="true";const n={encoding:"utf8",env:r};a()&&(t="npm.cmd",n.shell=!0);let o=()=>{};try{process.on("SIGPIPE",o);let r=s.spawnSync(t,["config","get","prefix"],n).stdout;if(!r)return void(e&&e("'npm config get prefix' didn't return a value."));let c=r.trim();return e&&e(`'npm config get prefix' value is: ${c}`),c.length>0?a()?i.join(c,"node_modules"):i.join(c,"lib","node_modules"):void 0}catch(e){return}finally{process.removeListener("SIGPIPE",o)}}var u;t.uriToFilePath=function(e){let t=n.parse(e);if("file:"!==t.protocol||!t.path)return;let r=t.path.split("/");for(var o=0,s=r.length;o1){let e=r[0],t=r[1];0===e.length&&t.length>1&&":"===t[1]&&r.shift()}return i.normalize(r.join("/"))},t.resolve=c,t.resolveGlobalNodePath=l,t.resolveGlobalYarnPath=function(e){let t="yarn",r={encoding:"utf8"};a()&&(t="yarn.cmd",r.shell=!0);let n=()=>{};try{process.on("SIGPIPE",n);let o=s.spawnSync(t,["global","dir","--json"],r),a=o.stdout;if(!a)return void(e&&(e("'yarn global dir' didn't return a value."),o.stderr&&e(o.stderr)));let c=a.trim().split(/\r?\n/);for(let e of c)try{let t=JSON.parse(e);if("log"===t.type)return i.join(t.data,"node_modules")}catch(e){}return}catch(e){return}finally{process.removeListener("SIGPIPE",n)}},function(e){let t;function r(){return void 0!==t||(t=!("win32"===process.platform||o.existsSync(__filename.toUpperCase())&&o.existsSync(__filename.toLowerCase()))),t}e.isCaseSensitive=r,e.isParent=function(e,t){return r()?0===i.normalize(t).indexOf(i.normalize(e)):0===i.normalize(t).toLowerCase().indexOf(i.normalize(e).toLowerCase())}}(u=t.FileSystem||(t.FileSystem={})),t.resolveModulePath=function(e,t,r,n){return r?(i.isAbsolute(r)||(r=i.join(e,r)),c(t,r,r,n).then((e=>u.isParent(r,e)?e:Promise.reject(new Error(`Failed to load ${t} from node path location.`)))).then(void 0,(r=>c(t,l(n),e,n)))):c(t,l(n),e,n)}},35809:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.createConnection=t.Files=void 0;const o=r(40289),s=r(49891),a=r(87613),c=r(96560);var l;i(r(96560),t),i(r(76265),t),(l=t.Files||(t.Files={})).uriToFilePath=a.uriToFilePath,l.resolveGlobalNodePath=a.resolveGlobalNodePath,l.resolveGlobalYarnPath=a.resolveGlobalYarnPath,l.resolve=a.resolve,l.resolveModulePath=a.resolveModulePath;let u,d=!1;!function(){const e="--clientProcessId";function t(e){try{let t=parseInt(e);isNaN(t)||(u=setInterval((()=>{try{process.kill(t,0)}catch(e){process.exit(d?0:1)}}),3e3))}catch(e){}}for(let r=2;r{const t=e.processId;o.number(t)&&void 0===u&&setInterval((()=>{try{process.kill(t,0)}catch(e){process.exit(d?0:1)}}),3e3)},get shutdownReceived(){return d},set shutdownReceived(e){d=e},exit:e=>{process.exit(e)}};t.createConnection=function(e,t,r,n){let i,a,l,u;return void 0!==e&&"features"===e.__brand&&(i=e,e=t,t=r,r=n),c.ConnectionStrategy.is(e)||c.ConnectionOptions.is(e)?u=e:(a=e,l=t,u=r),function(e,t,r,n){if(!e&&!t&&process.argv.length>2){let r,n,o=process.argv.slice(2);for(let s=0;s{process.exit(d?0:1)})),t.on("close",(()=>{process.exit(d?0:1)}))}return s.createConnection((n=>c.createProtocolConnection(e,t,n,r)),p,n)}(a,l,u,i)}},68212:(e,t,r)=>{"use strict";e.exports=r(35809)},54086:(e,t,r)=>{"use strict";r.r(t),r.d(t,{TextDocument:()=>i});class n{constructor(e,t,r,n){this._uri=e,this._languageId=t,this._version=r,this._content=n,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const t=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(t,r)}return this._content}update(e,t){for(let t of e)if(n.isIncremental(t)){const e=a(t.range),r=this.offsetAt(e.start),n=this.offsetAt(e.end);this._content=this._content.substring(0,r)+t.text+this._content.substring(n,this._content.length);const i=Math.max(e.start.line,0),o=Math.max(e.end.line,0);let c=this._lineOffsets;const l=s(t.text,!1,r);if(o-i===l.length)for(let e=0,t=l.length;ee?n=i:r=i+1}let i=r-1;return{line:i,character:e-t[i]}}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let r=t[e.line],n=e.line+1r.line||t.line===r.line&&t.character>r.character?{start:r,end:t}:e}function c(e){const t=a(e.range);return t!==e.range?{newText:e.newText,range:t}:e}!function(e){e.create=function(e,t,r,i){return new n(e,t,r,i)},e.update=function(e,t,r){if(e instanceof n)return e.update(t,r),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")},e.applyEdits=function(e,t){let r=e.getText(),n=o(t.map(c),((e,t)=>{let r=e.range.start.line-t.range.start.line;return 0===r?e.range.start.character-t.range.start.character:r})),i=0;const s=[];for(const t of n){let n=e.offsetAt(t.range.start);if(ni&&s.push(r.substring(i,n)),t.newText.length&&s.push(t.newText),i=e.offsetAt(t.range.end)}return s.push(r.substr(i)),s.join("")}}(i||(i={}))},39941:e=>{const t="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,r="function"==typeof AbortController?AbortController:class{constructor(){this.signal=new o}abort(){this.signal.dispatchEvent("abort")}},n="function"==typeof AbortSignal,i="function"==typeof r.AbortSignal,o=n?AbortSignal:i?r.AbortController:class{constructor(){this.aborted=!1,this._listeners=[]}dispatchEvent(e){if("abort"===e){this.aborted=!0;const t={type:e,target:this};this.onabort(t),this._listeners.forEach((e=>e(t)),this)}}onabort(){}addEventListener(e,t){"abort"===e&&this._listeners.push(t)}removeEventListener(e,t){"abort"===e&&(this._listeners=this._listeners.filter((e=>e!==t)))}},s=new Set,a=(e,t)=>{const r=`LRU_CACHE_OPTION_${e}`;u(r)&&d(r,`${e} option`,`options.${t}`,m)},c=(e,t)=>{const r=`LRU_CACHE_METHOD_${e}`;if(u(r)){const{prototype:n}=m,{get:i}=Object.getOwnPropertyDescriptor(n,e);d(r,`${e} method`,`cache.${t}()`,i)}},l=(...e)=>{"object"==typeof process&&process&&"function"==typeof process.emitWarning?process.emitWarning(...e):console.error(...e)},u=e=>!s.has(e),d=(e,t,r,n)=>{s.add(e),l(`The ${t} is deprecated. Please use ${r} instead.`,"DeprecationWarning",e,n)},p=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),h=e=>p(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?f:null:null;class f extends Array{constructor(e){super(e),this.fill(0)}}class g{constructor(e){if(0===e)return[];const t=h(e);this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}}class m{constructor(e={}){const{max:t=0,ttl:r,ttlResolution:n=1,ttlAutopurge:i,updateAgeOnGet:o,updateAgeOnHas:c,allowStale:d,dispose:f,disposeAfter:y,noDisposeOnSet:v,noUpdateTTL:_,maxSize:b=0,sizeCalculation:w,fetchMethod:C,fetchContext:E,noDeleteOnFetchRejection:T,noDeleteOnStaleGet:S}=e,{length:x,maxAge:k,stale:I}=e instanceof m?{}:e;if(0!==t&&!p(t))throw new TypeError("max option must be a nonnegative integer");const A=t?h(t):Array;if(!A)throw new Error("invalid max value: "+t);if(this.max=t,this.maxSize=b,this.sizeCalculation=w||x,this.sizeCalculation){if(!this.maxSize)throw new TypeError("cannot set sizeCalculation without setting maxSize");if("function"!=typeof this.sizeCalculation)throw new TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=C||null,this.fetchMethod&&"function"!=typeof this.fetchMethod)throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=E,!this.fetchMethod&&void 0!==E)throw new TypeError("cannot set fetchContext without fetchMethod");if(this.keyMap=new Map,this.keyList=new Array(t).fill(null),this.valList=new Array(t).fill(null),this.next=new A(t),this.prev=new A(t),this.head=0,this.tail=0,this.free=new g(t),this.initialFill=1,this.size=0,"function"==typeof f&&(this.dispose=f),"function"==typeof y?(this.disposeAfter=y,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!v,this.noUpdateTTL=!!_,this.noDeleteOnFetchRejection=!!T,0!==this.maxSize){if(!p(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!d||!!I,this.noDeleteOnStaleGet=!!S,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!c,this.ttlResolution=p(n)||0===n?n:1,this.ttlAutopurge=!!i,this.ttl=r||k||0,this.ttl){if(!p(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.initializeTTLTracking()}if(0===this.max&&0===this.ttl&&0===this.maxSize)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.max&&!this.maxSize){const e="LRU_CACHE_UNBOUNDED";u(e)&&(s.add(e),l("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",e,m))}I&&a("stale","allowStale"),k&&a("maxAge","ttl"),x&&a("length","sizeCalculation")}getRemainingTTL(e){return this.has(e,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new f(this.max),this.starts=new f(this.max),this.setItemTTL=(e,r,n=t.now())=>{if(this.starts[e]=0!==r?n:0,this.ttls[e]=r,0!==r&&this.ttlAutopurge){const t=setTimeout((()=>{this.isStale(e)&&this.delete(this.keyList[e])}),r+1);t.unref&&t.unref()}},this.updateItemAge=e=>{this.starts[e]=0!==this.ttls[e]?t.now():0};let e=0;const r=()=>{const r=t.now();if(this.ttlResolution>0){e=r;const t=setTimeout((()=>e=0),this.ttlResolution);t.unref&&t.unref()}return r};this.getRemainingTTL=t=>{const n=this.keyMap.get(t);return void 0===n?0:0===this.ttls[n]||0===this.starts[n]?1/0:this.starts[n]+this.ttls[n]-(e||r())},this.isStale=t=>0!==this.ttls[t]&&0!==this.starts[t]&&(e||r())-this.starts[t]>this.ttls[t]}updateItemAge(e){}setItemTTL(e,t,r){}isStale(e){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new f(this.max),this.removeItemSize=e=>{this.calculatedSize-=this.sizes[e],this.sizes[e]=0},this.requireSize=(e,t,r,n)=>{if(!p(r)){if(!n)throw new TypeError("invalid size value (must be positive integer)");if("function"!=typeof n)throw new TypeError("sizeCalculation must be a function");if(r=n(t,e),!p(r))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}return r},this.addItemSize=(e,t)=>{this.sizes[e]=t;const r=this.maxSize-this.sizes[e];for(;this.calculatedSize>r;)this.evict(!0);this.calculatedSize+=this.sizes[e]}}removeItemSize(e){}addItemSize(e,t){}requireSize(e,t,r,n){if(r||n)throw new TypeError("cannot set size without setting maxSize on cache")}*indexes({allowStale:e=this.allowStale}={}){if(this.size)for(let t=this.tail;this.isValidIndex(t)&&(!e&&this.isStale(t)||(yield t),t!==this.head);)t=this.prev[t]}*rindexes({allowStale:e=this.allowStale}={}){if(this.size)for(let t=this.head;this.isValidIndex(t)&&(!e&&this.isStale(t)||(yield t),t!==this.tail);)t=this.next[t]}isValidIndex(e){return this.keyMap.get(this.keyList[e])===e}*entries(){for(const e of this.indexes())yield[this.keyList[e],this.valList[e]]}*rentries(){for(const e of this.rindexes())yield[this.keyList[e],this.valList[e]]}*keys(){for(const e of this.indexes())yield this.keyList[e]}*rkeys(){for(const e of this.rindexes())yield this.keyList[e]}*values(){for(const e of this.indexes())yield this.valList[e]}*rvalues(){for(const e of this.rindexes())yield this.valList[e]}[Symbol.iterator](){return this.entries()}find(e,t={}){for(const r of this.indexes())if(e(this.valList[r],this.keyList[r],this))return this.get(this.keyList[r],t)}forEach(e,t=this){for(const r of this.indexes())e.call(t,this.valList[r],this.keyList[r],this)}rforEach(e,t=this){for(const r of this.rindexes())e.call(t,this.valList[r],this.keyList[r],this)}get prune(){return c("prune","purgeStale"),this.purgeStale}purgeStale(){let e=!1;for(const t of this.rindexes({allowStale:!0}))this.isStale(t)&&(this.delete(this.keyList[t]),e=!0);return e}dump(){const e=[];for(const r of this.indexes({allowStale:!0})){const n=this.keyList[r],i=this.valList[r],o={value:this.isBackgroundFetch(i)?i.__staleWhileFetching:i};if(this.ttls){o.ttl=this.ttls[r];const e=t.now()-this.starts[r];o.start=Math.floor(Date.now()-e)}this.sizes&&(o.size=this.sizes[r]),e.unshift([n,o])}return e}load(e){this.clear();for(const[r,n]of e){if(n.start){const e=Date.now()-n.start;n.start=t.now()-e}this.set(r,n.value,n)}}dispose(e,t,r){}set(e,t,{ttl:r=this.ttl,start:n,noDisposeOnSet:i=this.noDisposeOnSet,size:o=0,sizeCalculation:s=this.sizeCalculation,noUpdateTTL:a=this.noUpdateTTL}={}){if(o=this.requireSize(e,t,o,s),this.maxSize&&o>this.maxSize)return this;let c=0===this.size?void 0:this.keyMap.get(e);if(void 0===c)c=this.newIndex(),this.keyList[c]=e,this.valList[c]=t,this.keyMap.set(e,c),this.next[this.tail]=c,this.prev[c]=this.tail,this.tail=c,this.size++,this.addItemSize(c,o),a=!1;else{const r=this.valList[c];t!==r&&(this.isBackgroundFetch(r)?r.__abortController.abort():i||(this.dispose(r,e,"set"),this.disposeAfter&&this.disposed.push([r,e,"set"])),this.removeItemSize(c),this.valList[c]=t,this.addItemSize(c,o)),this.moveToTail(c)}if(0===r||0!==this.ttl||this.ttls||this.initializeTTLTracking(),a||this.setItemTTL(c,r,n),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return 0===this.size?this.tail:this.size===this.max&&0!==this.max?this.evict(!1):0!==this.free.length?this.free.pop():this.initialFill++}pop(){if(this.size){const e=this.valList[this.head];return this.evict(!0),e}}evict(e){const t=this.head,r=this.keyList[t],n=this.valList[t];return this.isBackgroundFetch(n)?n.__abortController.abort():(this.dispose(n,r,"evict"),this.disposeAfter&&this.disposed.push([n,r,"evict"])),this.removeItemSize(t),e&&(this.keyList[t]=null,this.valList[t]=null,this.free.push(t)),this.head=this.next[t],this.keyMap.delete(r),this.size--,t}has(e,{updateAgeOnHas:t=this.updateAgeOnHas}={}){const r=this.keyMap.get(e);return void 0!==r&&!this.isStale(r)&&(t&&this.updateItemAge(r),!0)}peek(e,{allowStale:t=this.allowStale}={}){const r=this.keyMap.get(e);if(void 0!==r&&(t||!this.isStale(r))){const e=this.valList[r];return this.isBackgroundFetch(e)?e.__staleWhileFetching:e}}backgroundFetch(e,t,n,i){const o=void 0===t?void 0:this.valList[t];if(this.isBackgroundFetch(o))return o;const s=new r,a={signal:s.signal,options:n,context:i},c=new Promise((t=>t(this.fetchMethod(e,o,a)))).then((t=>(s.signal.aborted||this.set(e,t,a.options),t)),(r=>{if(this.valList[t]===c&&(n.noDeleteOnFetchRejection&&void 0!==c.__staleWhileFetching?this.valList[t]=c.__staleWhileFetching:this.delete(e)),c.__returned===c)throw r}));return c.__abortController=s,c.__staleWhileFetching=o,c.__returned=null,void 0===t?(this.set(e,c,a.options),t=this.keyMap.get(e)):this.valList[t]=c,c}isBackgroundFetch(e){return e&&"object"==typeof e&&"function"==typeof e.then&&Object.prototype.hasOwnProperty.call(e,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(e,"__returned")&&(e.__returned===e||null===e.__returned)}async fetch(e,{allowStale:t=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:i=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:s=0,sizeCalculation:a=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,noDeleteOnFetchRejection:l=this.noDeleteOnFetchRejection,fetchContext:u=this.fetchContext,forceRefresh:d=!1}={}){if(!this.fetchMethod)return this.get(e,{allowStale:t,updateAgeOnGet:r,noDeleteOnStaleGet:n});const p={allowStale:t,updateAgeOnGet:r,noDeleteOnStaleGet:n,ttl:i,noDisposeOnSet:o,size:s,sizeCalculation:a,noUpdateTTL:c,noDeleteOnFetchRejection:l};let h=this.keyMap.get(e);if(void 0===h){const t=this.backgroundFetch(e,h,p,u);return t.__returned=t}{const n=this.valList[h];if(this.isBackgroundFetch(n))return t&&void 0!==n.__staleWhileFetching?n.__staleWhileFetching:n.__returned=n;if(!d&&!this.isStale(h))return this.moveToTail(h),r&&this.updateItemAge(h),n;const i=this.backgroundFetch(e,h,p,u);return t&&void 0!==i.__staleWhileFetching?i.__staleWhileFetching:i.__returned=i}}get(e,{allowStale:t=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet}={}){const i=this.keyMap.get(e);if(void 0!==i){const o=this.valList[i],s=this.isBackgroundFetch(o);if(this.isStale(i))return s?t?o.__staleWhileFetching:void 0:(n||this.delete(e),t?o:void 0);if(s)return;return this.moveToTail(i),r&&this.updateItemAge(i),o}}connect(e,t){this.prev[t]=e,this.next[e]=t}moveToTail(e){e!==this.tail&&(e===this.head?this.head=this.next[e]:this.connect(this.prev[e],this.next[e]),this.connect(this.tail,e),this.tail=e)}get del(){return c("del","delete"),this.delete}delete(e){let t=!1;if(0!==this.size){const r=this.keyMap.get(e);if(void 0!==r)if(t=!0,1===this.size)this.clear();else{this.removeItemSize(r);const t=this.valList[r];this.isBackgroundFetch(t)?t.__abortController.abort():(this.dispose(t,e,"delete"),this.disposeAfter&&this.disposed.push([t,e,"delete"])),this.keyMap.delete(e),this.keyList[r]=null,this.valList[r]=null,r===this.tail?this.tail=this.prev[r]:r===this.head?this.head=this.next[r]:(this.next[this.prev[r]]=this.next[r],this.prev[this.next[r]]=this.prev[r]),this.size--,this.free.push(r)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return t}clear(){for(const e of this.rindexes({allowStale:!0})){const t=this.valList[e];if(this.isBackgroundFetch(t))t.__abortController.abort();else{const r=this.keyList[e];this.dispose(t,r,"delete"),this.disposeAfter&&this.disposed.push([t,r,"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 c("reset","clear"),this.clear}get length(){return((e,t)=>{const r=`LRU_CACHE_PROPERTY_${e}`;if(u(r)){const{prototype:t}=m,{get:n}=Object.getOwnPropertyDescriptor(t,e);d(r,`${e} property`,"cache.size",n)}})("length"),this.size}static get AbortController(){return r}static get AbortSignal(){return o}}e.exports=m},86029:(e,t,r)=>{"use strict";const{randomBytes:n}=r(6113),{Readable:i}=r(12781),o=e=>"object"==typeof e&&0===["arrayBuffer","stream","text","slice","constructor"].map((t=>typeof e[t])).filter((e=>"function"!==e)).length&&"string"==typeof e.type&&"number"==typeof e.size&&/^(Blob|File)$/.test(e[Symbol.toStringTag]),s=e=>`--${e}--\r\n\r\n`,a=(e,t,r)=>{let n="";return n+=`--${e}\r\n`,n+=`Content-Disposition: form-data; name="${t}"`,o(r)&&(n+=`; filename="${r.name}"\r\n`,n+=`Content-Type: ${r.type||"application/octet-stream"}`),`${n}\r\n\r\n`};e.exports={isFormData:e=>null!=e&&"object"==typeof e&&0===["append","delete","get","getAll","has","set","keys","values","entries","constructor"].map((t=>typeof e[t])).filter((e=>"function"!==e)).length&&"FormData"===e[Symbol.toStringTag],FormDataSerializer:class{constructor(e){this.fd=e,this.boundary=n(8).toString("hex")}length(){return void 0===this._length&&(this._length=((e,t)=>{let r=0;for(const[n,i]of e)r+=Buffer.byteLength(a(t,n,i)),r+=o(i)?i.size:Buffer.byteLength(String(i)),r+=Buffer.byteLength("\r\n");return r+=Buffer.byteLength(s(t)),r})(this.fd,this.boundary)),this._length}contentType(){return`multipart/form-data; boundary=${this.boundary}`}stream(){return i.from(async function*(e,t){for(const[r,n]of e)yield a(t,r,n),o(n)?yield*n.stream():yield n,yield"\r\n";yield s(t)}(this.fd,this.boundary))}}}},45591:(e,t,r)=>{"use strict";const{constants:{MAX_LENGTH:n}}=r(14300),{pipeline:i,PassThrough:o}=r(12781),{promisify:s}=r(73837),{createGunzip:a,createInflate:c,createBrotliDecompress:l,constants:{Z_SYNC_FLUSH:u}}=r(59796),d=r(41241)("helix-fetch:utils"),p=s(i),h=(e,t)=>{if(Buffer.isBuffer(e))return e.length;switch(typeof e){case"string":return 2*e.length;case"boolean":return 4;case"number":return 8;case"symbol":return Symbol.keyFor(e)?2*Symbol.keyFor(e).length:2*(e.toString().length-8);case"object":return Array.isArray(e)?f(e,t):g(e,t);default:return 0}},f=(e,t)=>(t.add(e),e.map((e=>t.has(e)?0:h(e,t))).reduce(((e,t)=>e+t),0)),g=(e,t)=>{if(null==e)return 0;t.add(e);let r=0;const n=[];for(const t in e)n.push(t);return n.push(...Object.getOwnPropertySymbols(e)),n.forEach((n=>{if(r+=h(n,t),"object"==typeof e[n]&&null!==e[n]){if(t.has(e[n]))return;t.add(e[n])}r+=h(e[n],t)})),r};e.exports={decodeStream:(e,t,r,n)=>{if(!((e,t)=>204!==e&&304!==e&&0!=+t["content-length"]&&/^\s*(?:(x-)?deflate|(x-)?gzip|br)\s*$/.test(t["content-encoding"]))(e,t))return r;const o=e=>{e&&(d(`encountered error while decoding stream: ${e}`),n(e))};switch(t["content-encoding"].trim()){case"gzip":case"x-gzip":return i(r,a({flush:u,finishFlush:u}),o);case"deflate":case"x-deflate":return i(r,c(),o);case"br":return i(r,l(),o);default:return r}},isPlainObject:e=>{if(!e||"object"!=typeof e)return!1;if("[object Object]"!==Object.prototype.toString.call(e))return!1;if(null===Object.getPrototypeOf(e))return!0;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t},sizeof:e=>h(e,new WeakSet),streamToBuffer:async e=>{const t=new o;let r=0;const i=[];return t.on("data",(e=>{if(r+e.length>n)throw new Error("Buffer.constants.MAX_SIZE exceeded");i.push(e),r+=e.length})),await p(e,t),Buffer.concat(i,r)}}},75899:e=>{"use strict";class t extends Error{get name(){return this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}}e.exports={RequestAbortedError:t}},84751:(e,t,r)=>{"use strict";const n=r(13685),i=r(95687),{Readable:o}=r(12781),s=r(41241)("helix-fetch:h1"),{RequestAbortedError:a}=r(75899),{decodeStream:c}=r(45591);e.exports={request:async(e,t,r)=>{const{request:l}="https:"===t.protocol?i:n,u=((e,t)=>{const{h1:r,options:{h1:o,rejectUnauthorized:s}}=e;return"https:"===t?r.httpsAgent?r.httpsAgent:o||"boolean"==typeof s?(r.httpsAgent=new i.Agent("boolean"==typeof s?{...o||{},rejectUnauthorized:s}:o),r.httpsAgent):void 0:r.httpAgent?r.httpAgent:o?(r.httpAgent=new n.Agent(o),r.httpAgent):void 0})(e,t.protocol),d={...r,agent:u},{socket:p,body:h}=d;return p&&(delete d.socket,p.assigned||(p.assigned=!0,u?d.agent=new Proxy(u,{get:(e,t)=>"createConnection"!==t||p.inUse?e[t]:(e,t)=>{s(`agent reusing socket #${p.id} (${p.servername})`),p.inUse=!0,t(null,p)}}):d.createConnection=(e,t)=>{s(`reusing socket #${p.id} (${p.servername})`),p.inUse=!0,t(null,p)})),new Promise(((e,r)=>{let n;s(`${d.method} ${t.href}`);const{signal:i}=d,u=()=>{i.removeEventListener("abort",u),p&&!p.inUse&&(s(`discarding redundant socket used for ALPN: #${p.id} ${p.servername}`),p.destroy()),r(new a),n&&n.abort()};if(i){if(i.aborted)return void r(new a);i.addEventListener("abort",u)}n=l(t,d),n.once("response",(t=>{i&&i.removeEventListener("abort",u),p&&!p.inUse&&(s(`discarding redundant socket used for ALPN: #${p.id} ${p.servername}`),p.destroy()),e(((e,t,r)=>{const{statusCode:n,statusMessage:i,httpVersion:o,httpVersionMajor:s,httpVersionMinor:a,headers:l}=e,u=t?c(n,l,e,r):e;return{statusCode:n,statusText:i,httpVersion:o,httpVersionMajor:s,httpVersionMinor:a,headers:l,readable:u,decoded:!(!t||u===e)}})(t,d.decode,r))})),n.once("error",(e=>{i&&i.removeEventListener("abort",u),p&&!p.inUse&&(s(`discarding redundant socket used for ALPN: #${p.id} ${p.servername}`),p.destroy()),n.aborted||(s(`${d.method} ${t.href} failed with: ${e.message}`),n.abort(),r(e))})),h instanceof o?h.pipe(n):(h&&n.write(h),n.end())}))},setupContext:e=>{e.h1={}},resetContext:async({h1:e})=>{e.httpAgent&&(s("resetContext: destroying httpAgent"),e.httpAgent.destroy(),delete e.httpAgent),e.httpsAgent&&(s("resetContext: destroying httpsAgent"),e.httpsAgent.destroy(),delete e.httpsAgent)}}},57652:(e,t,r)=>{"use strict";const{connect:n,constants:i}=r(85158),{Readable:o}=r(12781),s=r(41241)("helix-fetch:h2"),{RequestAbortedError:a}=r(75899),{decodeStream:c}=r(45591),{NGHTTP2_CANCEL:l}=i,u=3e5,d=5e3,p=(e,t,r,n=(()=>{}))=>{const i={...e},o=i[":status"];delete i[":status"];const s=r?c(o,e,t,n):t;return{statusCode:o,statusText:"",httpVersion:"2.0",httpVersionMajor:2,httpVersionMinor:0,headers:i,readable:s,decoded:!(!r||s===t)}};e.exports={request:async(e,t,r)=>{const{origin:i,pathname:c,search:h,hash:f}=t,g=`${c}${h}${f}`,{options:{h2:m={}},h2:{sessionCache:y}}=e,{idleSessionTimeout:v=u,pushPromiseHandler:_,pushHandler:b}=m,w={...r},{method:C,headers:E,socket:T,body:S,decode:x}=w;return T&&delete w.socket,E.host&&(E[":authority"]=E.host,delete E.host),new Promise(((r,c)=>{let u,h=y[i];if(!h||h.closed||h.destroyed){const t=!(!1===e.options.rejectUnauthorized||!1===m.rejectUnauthorized),r={...m,rejectUnauthorized:t};T&&!T.inUse&&(r.createConnection=()=>(s(`reusing socket #${T.id} (${T.servername})`),T.inUse=!0,T));const o=!(!_&&!b);h=n(i,{...r,settings:{enablePush:o}}),h.setMaxListeners(1e3),h.setTimeout(v,(()=>{s(`closing session ${i} after ${v} ms of inactivity`),h.close()})),h.once("connect",(()=>{s(`session ${i} established`),s(`caching session ${i}`),y[i]=h})),h.on("localSettings",(e=>{s(`session ${i} localSettings: ${JSON.stringify(e)}`)})),h.on("remoteSettings",(e=>{s(`session ${i} remoteSettings: ${JSON.stringify(e)}`)})),h.once("close",(()=>{s(`session ${i} closed`),y[i]===h&&(s(`discarding cached session ${i}`),delete y[i])})),h.once("error",(e=>{s(`session ${i} encountered error: ${e}`),y[i]===h&&(s(`discarding cached session ${i}`),delete y[i])})),h.on("frameError",((e,t,r)=>{s(`session ${i} encountered frameError: type: ${e}, code: ${t}, id: ${r}`)})),h.once("goaway",((e,t,r)=>{s(`session ${i} received GOAWAY frame: errorCode: ${e}, lastStreamID: ${t}, opaqueData: ${r?r.toString():void 0}`)})),h.on("stream",((t,r,n)=>{((e,t,r,n,i,o)=>{const{options:{h2:{pushPromiseHandler:a,pushHandler:c,pushedStreamIdleTimeout:u=d}}}=e,h=i[":path"],f=`${t}${h}`;s(`received PUSH_PROMISE: ${f}, stream #${n.id}, headers: ${JSON.stringify(i)}, flags: ${o}`),a&&a(f,i,(()=>{n.close(l)})),n.on("push",((e,o)=>{s(`received push headers for ${t}${h}, stream #${n.id}, headers: ${JSON.stringify(e)}, flags: ${o}`),n.setTimeout(u,(()=>{s(`closing pushed stream #${n.id} after ${u} ms of inactivity`),n.close(l)})),c&&c(f,i,p(e,n,r))})),n.on("aborted",(()=>{s(`pushed stream #${n.id} aborted`)})),n.on("error",(e=>{s(`pushed stream #${n.id} encountered error: ${e}`)})),n.on("frameError",((e,t,r)=>{s(`pushed stream #${n.id} encountered frameError: type: ${e}, code: ${t}, id: ${r}`)}))})(e,i,x,t,r,n)}))}else T&&T.id!==h.socket.id&&!T.inUse&&(s(`discarding redundant socket used for ALPN: #${T.id} ${T.servername}`),T.destroy());s(`${C} ${t.host}${g}`);const{signal:f}=w,k=()=>{f.removeEventListener("abort",k),c(new a),u&&u.close(l)};if(f){if(f.aborted)return void c(new a);f.addEventListener("abort",k)}const I=e=>{s(`session ${i} encountered error during ${w.method} ${t.href}: ${e}`),c(e)};h.once("error",I),u=h.request({":method":C,":path":g,...E}),u.once("response",(e=>{h.off("error",I),f&&f.removeEventListener("abort",k),r(p(e,u,w.decode,c))})),u.once("error",(e=>{h.off("error",I),f&&f.removeEventListener("abort",k),u.rstCode!==l&&(s(`${w.method} ${t.href} failed with: ${e.message}`),u.close(l),c(e))})),u.once("frameError",((e,r,n)=>{h.off("error",I),s(`encountered frameError during ${w.method} ${t.href}: type: ${e}, code: ${r}, id: ${n}`)})),u.on("push",((e,t)=>{s(`received 'push' event: headers: ${JSON.stringify(e)}, flags: ${t}`)})),S instanceof o?S.pipe(u):(S&&u.write(S),u.end())}))},setupContext:e=>{e.h2={sessionCache:{}}},resetContext:async({h2:e})=>Promise.all(Object.values(e.sessionCache).map((e=>new Promise((t=>{e.on("close",t),s(`resetContext: destroying session (socket #${e.socket&&e.socket.id}, ${e.socket&&e.socket.servername})`),e.destroy()})))))}},44673:(e,t,r)=>{"use strict";const n=r(41241)("helix-fetch:core"),{request:i,setupContext:o,resetContext:s,RequestAbortedError:a,ALPN_HTTP2:c,ALPN_HTTP2C:l,ALPN_HTTP1_1:u,ALPN_HTTP1_0:d}=r(56633);class p{constructor(e){this.options={...e||{}},o(this)}api(){return{request:async(e,t)=>this.request(e,t),context:(e={})=>new p(e).api(),reset:async()=>this.reset(),RequestAbortedError:a,ALPN_HTTP2:c,ALPN_HTTP2C:l,ALPN_HTTP1_1:u,ALPN_HTTP1_0:d}}async request(e,t){return i(this,e,t)}async reset(){return n("resetting context"),s(this)}}e.exports=(new p).api()},93430:(e,t,r)=>{"use strict";const{EventEmitter:n}=r(82361);e.exports=()=>{const e={},t=new n;return t.setMaxListeners(0),{acquire:r=>new Promise((n=>{if(!e[r])return e[r]=!0,void n();const i=o=>{e[r]||(e[r]=!0,t.removeListener(r,i),n(o))};t.on(r,i)})),release:(r,n)=>{Reflect.deleteProperty(e,r),setImmediate((()=>t.emit(r,n)))}}}},56633:(e,t,r)=>{"use strict";const{Readable:n}=r(12781),i=r(24404),{types:{isAnyArrayBuffer:o}}=r(73837),s=r(39941),a=r(41241)("helix-fetch:core"),{RequestAbortedError:c}=r(75899),l=r(84751),u=r(57652),d=r(93430),{isPlainObject:p}=r(45591),{isFormData:h,FormDataSerializer:f}=r(86029),{version:g}=r(93180),m="h2",y="h2c",v="http/1.0",_="http/1.1",b=100,w=36e5,C=[m,_,v],E=`helix-fetch/${g}`,T={method:"GET",compress:!0,decode:!0};let S=0;const x=d(),k=(e,t)=>new Promise(((r,n)=>{const{signal:o}=t;let s;const l=()=>{o.removeEventListener("abort",l);const e=new c;n(e),s&&s.destroy(e)};if(o){if(o.aborted)return void n(new c);o.addEventListener("abort",l)}const u=+e.port||443,d=t=>{o&&o.removeEventListener("abort",l),t instanceof c||(a(`connecting to ${e.hostname}:${u} failed with: ${t.message}`),n(t))};s=i.connect(u,e.hostname,t),s.once("secureConnect",(()=>{o&&o.removeEventListener("abort",l),s.off("error",d),S+=1,s.id=S,s.secureConnecting=!1,a(`established TLS connection: #${s.id} (${s.servername})`),r(s)})),s.once("error",d)}));e.exports={request:async(e,t,r)=>{const i=new URL(t),s={...T,...r||{}};let c;if("string"==typeof s.method&&(s.method=s.method.toUpperCase()),s.headers=(e=>{const t={};return Object.keys(e).forEach((r=>{t[r.toLowerCase()]=e[r]})),t})(s.headers||{}),void 0===s.headers.host&&(s.headers.host=i.host),e.userAgent&&void 0===s.headers["user-agent"]&&(s.headers["user-agent"]=e.userAgent),s.body instanceof URLSearchParams)c="application/x-www-form-urlencoded; charset=utf-8",s.body=s.body.toString();else if(h(s.body)){const e=new f(s.body);c=e.contentType(),s.body=e.stream(),void 0===s.headers["transfer-encoding"]&&void 0===s.headers["content-length"]&&(s.headers["content-length"]=String(e.length()))}else"string"==typeof s.body||s.body instanceof String?c="text/plain; charset=utf-8":p(s.body)?(s.body=JSON.stringify(s.body),c="application/json"):o(s.body)&&(s.body=Buffer.from(s.body));void 0===s.headers["content-type"]&&void 0!==c&&(s.headers["content-type"]=c),null!=s.body&&(s.body instanceof n||("string"==typeof s.body||s.body instanceof String||Buffer.isBuffer(s.body)||(s.body=String(s.body)),void 0===s.headers["transfer-encoding"]&&void 0===s.headers["content-length"]&&(s.headers["content-length"]=String(Buffer.isBuffer(s.body)?s.body.length:Buffer.byteLength(s.body,"utf-8"))))),void 0===s.headers.accept&&(s.headers.accept="*/*"),null==s.body&&["POST","PUT"].includes(s.method)&&(s.headers["content-length"]="0"),s.compress&&void 0===s.headers["accept-encoding"]&&(s.headers["accept-encoding"]="gzip,deflate,br");const{signal:d}=s,{protocol:g,socket:b=null}=e.socketFactory?await(async(e,t,r,n)=>{const i="https:"===t.protocol;let o;o=t.port?t.port:i?443:80;const s={...r,host:t.host,port:o},a=await e(s);if(i){const e={...s,ALPNProtocols:n};e.socket=a;const r=await k(t,e);return{protocol:r.alpnProtocol||_,socket:r}}return{protocol:a.alpnProtocol||_,socket:a}})(e.socketFactory,i,s,e.alpnProtocols):await(async(e,t,r)=>{const n=`${t.protocol}//${t.host}`;let i=e.alpnCache.get(n);if(i)return{protocol:i};switch(t.protocol){case"http:":return i=_,e.alpnCache.set(n,i),{protocol:i};case"http2:":return i=y,e.alpnCache.set(n,i),{protocol:i};case"https:":break;default:throw new TypeError(`unsupported protocol: ${t.protocol}`)}const{options:{rejectUnauthorized:o,h1:s={},h2:a={}}}=e,c=!(!1===o||!1===s.rejectUnauthorized||!1===a.rejectUnauthorized),l={servername:t.hostname,ALPNProtocols:e.alpnProtocols,signal:r,rejectUnauthorized:c},u=await(async(e,t)=>{let r=await x.acquire(e.origin);try{return r||(r=await k(e,t)),r}finally{x.release(e.origin,r)}})(t,l);return i=u.alpnProtocol,i||(i=_),e.alpnCache.set(n,i),{protocol:i,socket:u}})(e,i,d);switch(a(`${i.host} -> ${g}`),g){case m:try{return await u.request(e,i,b?{...s,socket:b}:s)}catch(t){const{code:r,message:n}=t;throw"ERR_HTTP2_ERROR"===r&&"Protocol error"===n&&e.alpnCache.delete(`${i.protocol}//${i.host}`),t}case y:return u.request(e,new URL(`http://${i.host}${i.pathname}${i.hash}${i.search}`),b?{...s,socket:b}:s);case v:case _:return l.request(e,i,b?{...s,socket:b}:s);default:throw new TypeError(`unsupported protocol: ${g}`)}},setupContext:e=>{const{options:{alpnProtocols:t=C,alpnCacheTTL:r=w,alpnCacheSize:n=b,userAgent:i=E,socketFactory:o}}=e;e.alpnProtocols=t,e.alpnCache=new s({max:n,ttl:r}),e.userAgent=i,e.socketFactory=o,l.setupContext(e),u.setupContext(e)},resetContext:async e=>(e.alpnCache.clear(),Promise.all([l.resetContext(e),u.resetContext(e)])),RequestAbortedError:c,ALPN_HTTP2:m,ALPN_HTTP2C:y,ALPN_HTTP1_1:_,ALPN_HTTP1_0:v}},64346:(e,t,r)=>{"use strict";const{EventEmitter:n}=r(82361),i=Symbol("AbortSignal internals");class o{constructor(){this[i]={eventEmitter:new n,onabort:null,aborted:!1}}get aborted(){return this[i].aborted}get onabort(){return this[i].onabort}set onabort(e){this[i].onabort=e}get[Symbol.toStringTag](){return this.constructor.name}removeEventListener(e,t){this[i].eventEmitter.removeListener(e,t)}addEventListener(e,t){this[i].eventEmitter.on(e,t)}dispatchEvent(e){const t={type:e,target:this},r=`on${e}`;"function"==typeof this[i][r]&&this[r](t),this[i].eventEmitter.emit(e,t)}fire(){this[i].aborted=!0,this.dispatchEvent("abort")}}Object.defineProperties(o.prototype,{addEventListener:{enumerable:!0},removeEventListener:{enumerable:!0},dispatchEvent:{enumerable:!0},aborted:{enumerable:!0},onabort:{enumerable:!0}});class s extends o{constructor(e){if(!Number.isInteger(e))throw new TypeError("Expected an integer, got "+typeof e);super(),this[i].timerId=setTimeout((()=>{this.fire()}),e)}clear(){clearTimeout(this[i].timerId)}}Object.defineProperties(s.prototype,{clear:{enumerable:!0}});const a=Symbol("AbortController internals");class c{constructor(){this[a]={signal:new o}}get signal(){return this[a].signal}get[Symbol.toStringTag](){return this.constructor.name}abort(){this[a].signal.aborted||this[a].signal.fire()}}Object.defineProperties(c.prototype,{signal:{enumerable:!0},abort:{enumerable:!0}}),e.exports={AbortController:c,AbortSignal:o,TimeoutSignal:s}},54214:(e,t,r)=>{"use strict";const{PassThrough:n,Readable:i}=r(12781),{types:{isAnyArrayBuffer:o}}=r(73837),{FetchError:s,FetchBaseError:a}=r(2501),{streamToBuffer:c}=r(45591),l=Buffer.alloc(0),u=Symbol("Body internals"),d=async e=>{if(e[u].disturbed)throw new TypeError("Already read");if(e[u].error)throw new TypeError(`Stream had error: ${e[u].error.message}`);e[u].disturbed=!0;const{stream:t}=e[u];return null===t?l:c(t)};class p{constructor(e){let t;t=null==e?null:e instanceof URLSearchParams?i.from(e.toString()):e instanceof i?e:Buffer.isBuffer(e)?i.from(e):o(e)?i.from(Buffer.from(e)):"string"==typeof e||e instanceof String?i.from(e):i.from(String(e)),this[u]={stream:t,disturbed:!1,error:null},e instanceof i&&t.on("error",(e=>{const t=e instanceof a?e:new s(`Invalid response body while trying to fetch ${this.url}: ${e.message}`,"system",e);this[u].error=t}))}get body(){return this[u].stream}get bodyUsed(){return this[u].disturbed}async buffer(){return d(this)}async arrayBuffer(){return(e=await this.buffer()).buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);var e}async text(){return(await d(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}}),e.exports={Body:p,cloneStream:e=>{if(e[u].disturbed)throw new TypeError("Cannot clone: already read");const{stream:t}=e[u];let r=t;if(t instanceof i){r=new n;const i=new n;t.pipe(r),t.pipe(i),e[u].stream=i}return r},guessContentType:e=>null===e?null:"string"==typeof e?"text/plain; charset=utf-8":e instanceof URLSearchParams?"application/x-www-form-urlencoded; charset=utf-8":Buffer.isBuffer(e)||o(e)||e instanceof i?null:"text/plain; charset=utf-8"}},98941:(e,t,r)=>{"use strict";const{Readable:n}=r(12781),{Headers:i}=r(48226),{Response:o}=r(28327),s=Symbol("CacheableResponse internals");class a extends o{constructor(e,t){super(e,t);const r=new i(t.headers);this[s]={headers:r,bufferedBody:e}}get headers(){return this[s].headers}set headers(e){if(!(e instanceof i))throw new TypeError("instance of Headers expected");this[s].headers=e}get body(){return n.from(this[s].bufferedBody)}get bodyUsed(){return!1}async buffer(){return this[s].bufferedBody}async arrayBuffer(){return(e=this[s].bufferedBody).buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);var e}async text(){return this[s].bufferedBody.toString()}async json(){return JSON.parse(await this.text())}clone(){const{url:e,status:t,statusText:r,headers:n,httpVersion:i,decoded:o,counter:c}=this;return new a(this[s].bufferedBody,{url:e,status:t,statusText:r,headers:n,httpVersion:i,decoded:o,counter:c})}get[Symbol.toStringTag](){return this.constructor.name}}e.exports={cacheableResponse:async e=>{const t=await e.buffer(),{url:r,status:n,statusText:i,headers:o,httpVersion:s,decoded:c,counter:l}=e;return new a(t,{url:r,status:n,statusText:i,headers:o,httpVersion:s,decoded:c,counter:l})}}},2501:e=>{"use strict";class t extends Error{constructor(e,t){super(e),this.type=t}get name(){return this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}}e.exports={FetchBaseError:t,FetchError:class extends t{constructor(e,t,r){super(e,t),r&&(this.code=this.errno=r.code,this.erroredSysCall=r.syscall)}},AbortError:class extends t{constructor(e,t="aborted"){super(e,t)}}}},48226:(e,t,r)=>{"use strict";const{validateHeaderName:n,validateHeaderValue:i}=r(13685),{isPlainObject:o}=r(45591),s=Symbol("Headers internals"),a=e=>{const t="string"!=typeof e?String(e):e;if("function"==typeof n)n(t);else if(!/^[\^`\-\w!#$%&'*+.|~]+$/.test(t)){const e=new TypeError(`Header name must be a valid HTTP token [${t}]`);throw Object.defineProperty(e,"code",{value:"ERR_INVALID_HTTP_TOKEN"}),e}return t.toLowerCase()},c=(e,t)=>{const r="string"!=typeof e?String(e):e;if("function"==typeof i)i(t,r);else if(/[^\t\u0020-\u007E\u0080-\u00FF]/.test(r)){const e=new TypeError(`Invalid character in header content ["${t}"]`);throw Object.defineProperty(e,"code",{value:"ERR_INVALID_CHAR"}),e}return r};class l{constructor(e={}){if(this[s]={map:new Map},e instanceof l)e.forEach(((e,t)=>{this.append(t,e)}));else if(Array.isArray(e))e.forEach((([e,t])=>{this.append(e,t)}));else if(o(e))for(const[t,r]of Object.entries(e))this.append(t,r)}set(e,t){this[s].map.set(a(e),c(t,e))}has(e){return this[s].map.has(a(e))}get(e){const t=this[s].map.get(a(e));return void 0===t?null:t}append(e,t){const r=a(e),n=c(t,e),i=this[s].map.get(r);this[s].map.set(r,i?`${i}, ${n}`:n)}delete(e){this[s].map.delete(a(e))}forEach(e,t){for(const r of this.keys())e.call(t,this.get(r),r)}keys(){return Array.from(this[s].map.keys()).sort()}*values(){for(const e of this.keys())yield this.get(e)}*entries(){for(const e of this.keys())yield[e,this.get(e)]}[Symbol.iterator](){return this.entries()}get[Symbol.toStringTag](){return this.constructor.name}plain(){return Object.fromEntries(this[s].map)}}Object.defineProperties(l.prototype,["append","delete","entries","forEach","get","has","keys","set","values"].reduce(((e,t)=>(e[t]={enumerable:!0},e)),{})),e.exports={Headers:l}},14735:(e,t,r)=>{"use strict";const{EventEmitter:n}=r(82361),{Readable:i}=r(12781),o=r(41241)("helix-fetch"),s=r(39941),{Body:a}=r(54214),{Headers:c}=r(48226),{Request:l}=r(93505),{Response:u}=r(28327),{FetchBaseError:d,FetchError:p,AbortError:h}=r(2501),{AbortController:f,AbortSignal:g,TimeoutSignal:m}=r(64346),y=r(7619),{cacheableResponse:v}=r(98941),{sizeof:_}=r(45591),{isFormData:b}=r(86029),{context:w,RequestAbortedError:C}=r(44673),E=["GET","HEAD"],T="push",S=async(e,t,r)=>{const{request:n}=e.context,o=t instanceof l&&void 0===r?t:new l(t,r),{method:s,body:a,signal:d,compress:f,decode:g,follow:m,redirect:y,init:{body:v}}=o;let _;if(d&&d.aborted){const e=new h("The operation was aborted.");throw o.init.body instanceof i&&o.init.body.destroy(e),e}try{_=await n(o.url,{...r,method:s,headers:o.headers.plain(),body:!v||v instanceof i||b(v)?a:v,compress:f,decode:g,follow:m,redirect:y,signal:d})}catch(e){if(v instanceof i&&v.destroy(e),e instanceof TypeError)throw e;if(e instanceof C)throw new h("The operation was aborted.");throw new p(e.message,"system",e)}const w=()=>{d.removeEventListener("abort",w);const e=new h("The operation was aborted.");o.init.body instanceof i&&o.init.body.destroy(e),_.readable.emit("error",e)};d&&d.addEventListener("abort",w);const{statusCode:E,statusText:T,httpVersion:x,headers:k,readable:I,decoded:A}=_;if([301,302,303,307,308].includes(E)){const{location:t}=k,r=null==t?null:new URL(t,o.url);switch(o.redirect){case"manual":break;case"error":throw d&&d.removeEventListener("abort",w),new p(`uri requested responds with a redirect, redirect mode is set to 'error': ${o.url}`,"no-redirect");case"follow":{if(null===r)break;if(o.counter>=o.follow)throw d&&d.removeEventListener("abort",w),new p(`maximum redirect reached at: ${o.url}`,"max-redirect");const t={headers:new c(o.headers),follow:o.follow,compress:o.compress,decode:o.decode,counter:o.counter+1,method:o.method,body:o.body,signal:o.signal};if(303!==E&&o.body&&o.init.body instanceof i)throw d&&d.removeEventListener("abort",w),new p("Cannot follow redirect with body being a readable stream","unsupported-redirect");return 303!==E&&(301!==E&&302!==E||"POST"!==o.method)||(t.method="GET",t.body=void 0,t.headers.delete("content-length")),d&&d.removeEventListener("abort",w),S(e,new l(r,t))}}}return d&&(I.once("end",(()=>{d.removeEventListener("abort",w)})),I.once("error",(()=>{d.removeEventListener("abort",w)}))),new u(I,{url:o.url,status:E,statusText:T,headers:k,httpVersion:x,decoded:A,counter:o.counter})},x=async(e,t,r)=>{if(0===e.options.maxCacheSize)return r;if(!E.includes(t.method))return r;const n=new y(t,r,{shared:!1});if(n.storable()){const i=await v(r);return e.cache.set(t.url,{policy:n,response:i},n.timeToLive()),i}return r},k=(e,t={})=>{const r=new URL(e);if("object"!=typeof t||Array.isArray(t))throw new TypeError("qs: object expected");return Object.entries(t).forEach((([e,t])=>{Array.isArray(t)?t.forEach((t=>r.searchParams.append(e,t))):r.searchParams.append(e,t)})),r.href},I=e=>new m(e);class A{constructor(e){this.options={...e};const{maxCacheSize:t}=this.options;let r="number"==typeof t&&t>=0?t:104857600,i=500;0===r&&(r=1,i=1),this.cache=new s({max:i,maxSize:r,sizeCalculation:({response:e},t)=>_(e)}),this.eventEmitter=new n,this.options.h2=this.options.h2||{},void 0===this.options.h2.enablePush&&(this.options.h2.enablePush=!0);const{enablePush:o}=this.options.h2;o&&(this.options.h2.pushPromiseHandler=(e,t,r)=>{const n={...t};Object.keys(n).filter((e=>e.startsWith(":"))).forEach((e=>delete n[e])),this.pushPromiseHandler(e,n,r)},this.options.h2.pushHandler=(e,t,r)=>{const n={...t};Object.keys(n).filter((e=>e.startsWith(":"))).forEach((e=>delete n[e]));const{statusCode:i,statusText:o,httpVersion:s,headers:a,readable:c,decoded:l}=r;this.pushHandler(e,n,new u(c,{url:e,status:i,statusText:o,headers:a,httpVersion:s,decoded:l}))}),this.context=w(this.options)}api(){return{fetch:async(e,t)=>this.fetch(e,t),Body:a,Headers:c,Request:l,Response:u,AbortController:f,AbortSignal:g,FetchBaseError:d,FetchError:p,AbortError:h,context:(e={})=>new A(e).api(),noCache:(e={})=>new A({...e,maxCacheSize:0}).api(),h1:(e={})=>new A({...e,alpnProtocols:[this.context.ALPN_HTTP1_1]}).api(),keepAlive:(e={})=>new A({...e,alpnProtocols:[this.context.ALPN_HTTP1_1],h1:{keepAlive:!0}}).api(),h1NoCache:(e={})=>new A({...e,maxCacheSize:0,alpnProtocols:[this.context.ALPN_HTTP1_1]}).api(),keepAliveNoCache:(e={})=>new A({...e,maxCacheSize:0,alpnProtocols:[this.context.ALPN_HTTP1_1],h1:{keepAlive:!0}}).api(),reset:async()=>this.context.reset(),onPush:e=>this.onPush(e),offPush:e=>this.offPush(e),createUrl:k,timeoutSignal:I,clearCache:()=>this.clearCache(),cacheStats:()=>this.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(e,t){return(async(e,t,r)=>{const n=new l(t,r);if(0!==e.options.maxCacheSize&&E.includes(n.method)&&!["no-store","reload"].includes(n.cache)){const{policy:t,response:r}=e.cache.get(n.url)||{};if(t&&t.satisfiesWithoutRevalidation(n)){r.headers=new c(t.responseHeaders(r));const e=r.clone();return e.fromCache=!0,e}}const i=await S(e,n);return"no-store"!==n.cache?x(e,n,i):i})(this,e,t)}onPush(e){return this.eventEmitter.on(T,e)}offPush(e){return this.eventEmitter.off(T,e)}clearCache(){this.cache.clear()}cacheStats(){return{size:this.cache.calculatedSize,count:this.cache.size}}pushPromiseHandler(e,t,r){o(`received server push promise: ${e}, headers: ${JSON.stringify(t)}`);const n=new l(e,{headers:t}),{policy:i}=this.cache.get(e)||{};i&&i.satisfiesWithoutRevalidation(n)&&(o(`already cached, reject push promise: ${e}, headers: ${JSON.stringify(t)}`),r())}async pushHandler(e,t,r){o(`caching resource pushed by server: ${e}, reqHeaders: ${JSON.stringify(t)}, status: ${r.status}, respHeaders: ${JSON.stringify(r.headers)}`);const n=await x(this,new l(e,{headers:t}),r);this.eventEmitter.emit(T,e,n)}}e.exports=(new A).api()},7619:(e,t,r)=>{"use strict";const n=r(13573),{Headers:i}=r(48226),o=e=>({url:e.url,method:e.method,headers:e.headers.plain()}),s=e=>({status:e.status,headers:e.headers.plain()});e.exports=class{constructor(e,t,r){this.policy=new n(o(e),s(t),r)}storable(){return this.policy.storable()}satisfiesWithoutRevalidation(e){return this.policy.satisfiesWithoutRevalidation(o(e))}responseHeaders(e){return new i(this.policy.responseHeaders(s(e)))}timeToLive(){return this.policy.timeToLive()}}},93505:(e,t,r)=>{"use strict";const{AbortSignal:n}=r(64346),{Body:i,cloneStream:o,guessContentType:s}=r(54214),{Headers:a}=r(48226),{isPlainObject:c}=r(45591),{isFormData:l,FormDataSerializer:u}=r(86029),d=Symbol("Request internals");class p extends i{constructor(e,t={}){const r=e instanceof p?e:null,i=r?new URL(r.url):new URL(e);let h=t.method||r&&r.method||"GET";if(h=h.toUpperCase(),(null!=t.body||r&&null!==r.body)&&["GET","HEAD"].includes(h))throw new TypeError("Request with GET/HEAD method cannot have body");let f=t.body||(r&&r.body?o(r):null);const g=new a(t.headers||r&&r.headers||{});if(l(f)&&!g.has("content-type")){const e=new u(f);f=e.stream(),g.set("content-type",e.contentType()),g.has("transfer-encoding")||g.has("content-length")||g.set("content-length",e.length())}if(!g.has("content-type"))if(c(f))f=JSON.stringify(f),g.set("content-type","application/json");else{const e=s(f);e&&g.set("content-type",e)}super(f);let m=r?r.signal:null;if("signal"in t&&(m=t.signal),m&&!(m instanceof n))throw new TypeError("signal needs to be an instance of AbortSignal");const y=t.redirect||r&&r.redirect||"follow";if(!["follow","error","manual"].includes(y))throw new TypeError(`'${y}' is not a valid redirect option`);const v=t.cache||r&&r.cache||"default";if(!["default","no-store","reload","no-cache","force-cache","only-if-cached"].includes(v))throw new TypeError(`'${v}' is not a valid cache option`);this[d]={init:{...t},method:h,redirect:y,cache:v,headers:g,parsedURL:i,signal:m},void 0===t.follow?r&&void 0!==r.follow?this.follow=r.follow:this.follow=20:this.follow=t.follow,this.counter=t.counter||r&&r.counter||0,void 0===t.compress?r&&void 0!==r.compress?this.compress=r.compress:this.compress=!0:this.compress=t.compress,void 0===t.decode?r&&void 0!==r.decode?this.decode=r.decode:this.decode=!0:this.decode=t.decode}get method(){return this[d].method}get url(){return this[d].parsedURL.toString()}get headers(){return this[d].headers}get redirect(){return this[d].redirect}get cache(){return this[d].cache}get signal(){return this[d].signal}clone(){return new p(this)}get init(){return this[d].init}get[Symbol.toStringTag](){return this.constructor.name}}Object.defineProperties(p.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},cache:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0}}),e.exports={Request:p}},28327:(e,t,r)=>{"use strict";const{Body:n,cloneStream:i,guessContentType:o}=r(54214),{Headers:s}=r(48226),{isPlainObject:a}=r(45591),{isFormData:c,FormDataSerializer:l}=r(86029),u=Symbol("Response internals");class d extends n{constructor(e=null,t={}){const r=new s(t.headers);let n=e;if(c(n)&&!r.has("content-type")){const e=new l(n);n=e.stream(),r.set("content-type",e.contentType()),r.has("transfer-encoding")||r.has("content-length")||r.set("content-length",e.length())}if(null!==n&&!r.has("content-type"))if(a(n))n=JSON.stringify(n),r.set("content-type","application/json");else{const e=o(n);e&&r.set("content-type",e)}super(n),this[u]={url:t.url,status:t.status||200,statusText:t.statusText||"",headers:r,httpVersion:t.httpVersion,decoded:t.decoded,counter:t.counter}}get url(){return this[u].url||""}get status(){return this[u].status}get statusText(){return this[u].statusText}get ok(){return this[u].status>=200&&this[u].status<300}get redirected(){return this[u].counter>0}get headers(){return this[u].headers}get httpVersion(){return this[u].httpVersion}get decoded(){return this[u].decoded}static redirect(e,t=302){if(![301,302,303,307,308].includes(t))throw new RangeError("Invalid status code");return new d(null,{headers:{location:new URL(e).toString()},status:t})}clone(){if(this.bodyUsed)throw new TypeError("Cannot clone: already read");return new d(i(this),{...this[u]})}get[Symbol.toStringTag](){return this.constructor.name}}Object.defineProperties(d.prototype,{url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}}),e.exports={Response:d}},98606:(e,t,r)=>{"use strict";e.exports=r(14735)},11240:(e,t,r)=>{const n=r(95687),i=r(60325);if("darwin"!==process.platform)e.exports.all=()=>[],e.exports.each=()=>{};else{const t=r(32081),o=/(?=-----BEGIN\sCERTIFICATE-----)/g,s="/System/Library/Keychains/SystemRootCertificates.keychain",a=["find-certificate","-a","-p"],c=t.spawnSync("/usr/bin/security",a).stdout.toString().split(o),l=t.spawnSync("/usr/bin/security",a.concat(s)).stdout.toString().split(o);n.globalAgent.options.ca=n.globalAgent.options.ca||[];const u=n.globalAgent.options.ca,d=c.concat(l);d.filter((function(e,t,r){return r.indexOf(e)===t})).forEach((e=>u.push(e))),e.exports.der2=i.validFormats,e.exports.all=function(e){return d.map(i.transform(e)).filter((e=>e))},e.exports.each=function(e,t){return"function"==typeof e&&(t=e,e=void 0),d.map(i.transform(e)).filter((e=>e)).forEach(t)}}},60325:(e,t,r)=>{const n=r(35758),i=r(84821);var o=e.exports.validFormats={der:0,pem:1,txt:2,asn1:3};function s(e){const t=n.pki.pemToDer(e),r=n.asn1,i=r.fromDer(t.data.toString("binary")).value[0].value,o=i[0],s=o.tagClass===r.Class.CONTEXT_SPECIFIC&&0===o.type&&o.constructed,a=i.slice(s);return{serial:a[0],issuer:a[2],valid:a[3],subject:a[4]}}e.exports.transform=function(e){return function(t){try{switch(e){case o.der:return n.pki.pemToDer(t);case o.pem:return t;case o.txt:return function(e){const t=s(e),r=new Date,n=t.subject.value.map((e=>e.value[0].value[1].value)).join("/"),o=t.valid.value.map((e=>e.value)).join(" - "),a=r.toTimeString().replace(/\s*\(.*\)\s*/,"");return[`Subject\t${n}`,`Valid\t${o}`,`Saved\t${r.toLocaleDateString()} ${a} by ${i.name}@${i.version}`,String(e)].join("\n")}(t);case o.asn1:return s(t);default:return n.pki.certificateFromPem(t)}}catch(e){return}}}},892:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Type=t.TypeBuilder=t.Modifier=t.Hint=t.Kind=void 0,t.Kind=Symbol.for("TypeBox.Kind"),t.Hint=Symbol.for("TypeBox.Hint"),t.Modifier=Symbol.for("TypeBox.Modifier");let r=0;class n{ReadonlyOptional(e){return{[t.Modifier]:"ReadonlyOptional",...e}}Readonly(e){return{[t.Modifier]:"Readonly",...e}}Optional(e){return{[t.Modifier]:"Optional",...e}}Any(e={}){return this.Create({...e,[t.Kind]:"Any"})}Array(e,r={}){return this.Create({...r,[t.Kind]:"Array",type:"array",items:e})}Boolean(e={}){return this.Create({...e,[t.Kind]:"Boolean",type:"boolean"})}ConstructorParameters(e,t={}){return this.Tuple([...e.parameters],{...t})}Constructor(e,r,n={}){if("Tuple"===e[t.Kind]){const i=void 0===e.items?[]:e.items;return this.Create({...n,[t.Kind]:"Constructor",type:"object",instanceOf:"Constructor",parameters:i,returns:r})}if(globalThis.Array.isArray(e))return this.Create({...n,[t.Kind]:"Constructor",type:"object",instanceOf:"Constructor",parameters:e,returns:r});throw new Error("TypeBuilder.Constructor: Invalid parameters")}Date(e={}){return this.Create({...e,[t.Kind]:"Date",type:"object",instanceOf:"Date"})}Enum(e,r={}){const n=Object.keys(e).filter((e=>isNaN(e))).map((t=>e[t])).map((e=>"string"==typeof e?{[t.Kind]:"Literal",type:"string",const:e}:{[t.Kind]:"Literal",type:"number",const:e}));return this.Create({...r,[t.Kind]:"Union",[t.Hint]:"Enum",anyOf:n})}Function(e,r,n={}){if("Tuple"===e[t.Kind]){const i=void 0===e.items?[]:e.items;return this.Create({...n,[t.Kind]:"Function",type:"object",instanceOf:"Function",parameters:i,returns:r})}if(globalThis.Array.isArray(e))return this.Create({...n,[t.Kind]:"Function",type:"object",instanceOf:"Function",parameters:e,returns:r});throw new Error("TypeBuilder.Function: Invalid parameters")}InstanceType(e,t={}){return{...t,...this.Clone(e.returns)}}Integer(e={}){return this.Create({...e,[t.Kind]:"Integer",type:"integer"})}Intersect(e,r={}){const n=e=>e[t.Modifier]&&"Optional"===e[t.Modifier]||"ReadonlyOptional"===e[t.Modifier],[i,o]=[new Set,new Set];for(const t of e)for(const[e,r]of Object.entries(t.properties))n(r)&&o.add(e);for(const t of e)for(const e of Object.keys(t.properties))o.has(e)||i.add(e);const s={};for(const r of e)for(const[e,n]of Object.entries(r.properties))s[e]=void 0===s[e]?n:{[t.Kind]:"Union",anyOf:[s[e],{...n}]};return i.size>0?this.Create({...r,[t.Kind]:"Object",type:"object",properties:s,required:[...i]}):this.Create({...r,[t.Kind]:"Object",type:"object",properties:s})}KeyOf(e,r={}){const n=Object.keys(e.properties).map((e=>this.Create({...r,[t.Kind]:"Literal",type:"string",const:e})));return this.Create({...r,[t.Kind]:"Union",[t.Hint]:"KeyOf",anyOf:n})}Literal(e,r={}){return this.Create({...r,[t.Kind]:"Literal",const:e,type:typeof e})}Never(e={}){return this.Create({...e,[t.Kind]:"Never",allOf:[{type:"boolean",const:!1},{type:"boolean",const:!0}]})}Null(e={}){return this.Create({...e,[t.Kind]:"Null",type:"null"})}Number(e={}){return this.Create({...e,[t.Kind]:"Number",type:"number"})}Object(e,r={}){const n=Object.keys(e),i=n.filter((r=>{const n=e[r][t.Modifier];return n&&("Optional"===n||"ReadonlyOptional"===n)})),o=n.filter((e=>!i.includes(e)));return o.length>0?this.Create({...r,[t.Kind]:"Object",type:"object",properties:e,required:o}):this.Create({...r,[t.Kind]:"Object",type:"object",properties:e})}Omit(e,r,n={}){const i="Union"===r[t.Kind]?r.anyOf.map((e=>e.const)):r,o={...this.Clone(e),...n,[t.Hint]:"Omit"};o.required&&(o.required=o.required.filter((e=>!i.includes(e))),0===o.required.length&&delete o.required);for(const e of Object.keys(o.properties))i.includes(e)&&delete o.properties[e];return this.Create(o)}Parameters(e,r={}){return t.Type.Tuple(e.parameters,{...r})}Partial(e,r={}){const n={...this.Clone(e),...r,[t.Hint]:"Partial"};delete n.required;for(const e of Object.keys(n.properties)){const r=n.properties[e];switch(r[t.Modifier]){case"ReadonlyOptional":case"Readonly":r[t.Modifier]="ReadonlyOptional";break;default:r[t.Modifier]="Optional"}}return this.Create(n)}Pick(e,r,n={}){const i="Union"===r[t.Kind]?r.anyOf.map((e=>e.const)):r,o={...this.Clone(e),...n,[t.Hint]:"Pick"};o.required&&(o.required=o.required.filter((e=>i.includes(e))),0===o.required.length&&delete o.required);for(const e of Object.keys(o.properties))i.includes(e)||delete o.properties[e];return this.Create(o)}Promise(e,r={}){return this.Create({...r,[t.Kind]:"Promise",type:"object",instanceOf:"Promise",item:e})}Record(e,r,n={}){if("Union"===e[t.Kind])return this.Object(e.anyOf.reduce(((e,t)=>({...e,[t.const]:r})),{}),{...n,[t.Hint]:"Record"});const i=["Integer","Number"].includes(e[t.Kind])?"^(0|[1-9][0-9]*)$":"String"===e[t.Kind]&&e.pattern?e.pattern:"^.*$";return this.Create({...n,[t.Kind]:"Record",type:"object",patternProperties:{[i]:r},additionalProperties:!1})}Recursive(e,n={}){void 0===n.$id&&(n.$id="T"+r++);const i=e({[t.Kind]:"Self",$ref:`${n.$id}`});return i.$id=n.$id,this.Create({...n,...i})}Ref(e,r={}){if(void 0===e.$id)throw Error("TypeBuilder.Ref: Referenced schema must specify an $id");return this.Create({...r,[t.Kind]:"Ref",$ref:e.$id})}RegEx(e,r={}){return this.Create({...r,[t.Kind]:"String",type:"string",pattern:e.source})}Required(e,r={}){const n={...this.Clone(e),...r,[t.Hint]:"Required"};n.required=Object.keys(n.properties);for(const e of Object.keys(n.properties)){const r=n.properties[e];switch(r[t.Modifier]){case"ReadonlyOptional":case"Readonly":r[t.Modifier]="Readonly";break;default:delete r[t.Modifier]}}return this.Create(n)}ReturnType(e,t={}){return{...t,...this.Clone(e.returns)}}Strict(e){return JSON.parse(JSON.stringify(e))}String(e={}){return this.Create({...e,[t.Kind]:"String",type:"string"})}Tuple(e,r={}){const n=e.length,i=e.length,o=e.length>0?{...r,[t.Kind]:"Tuple",type:"array",items:e,additionalItems:!1,minItems:n,maxItems:i}:{...r,[t.Kind]:"Tuple",type:"array",minItems:n,maxItems:i};return this.Create(o)}Undefined(e={}){return this.Create({...e,[t.Kind]:"Undefined",type:"null",typeOf:"Undefined"})}Union(e,r={}){return 0===e.length?t.Type.Never({...r}):this.Create({...r,[t.Kind]:"Union",anyOf:e})}Uint8Array(e={}){return this.Create({...e,[t.Kind]:"Uint8Array",type:"object",instanceOf:"Uint8Array"})}Unknown(e={}){return this.Create({...e,[t.Kind]:"Unknown"})}Unsafe(e={}){return this.Create({...e,[t.Kind]:e[t.Kind]||"Unsafe"})}Void(e={}){return this.Create({...e,[t.Kind]:"Void",type:"null",typeOf:"Void"})}Create(e){return e}Clone(e){return"object"!=typeof(t=e)||null===t||Array.isArray(t)?(e=>"object"==typeof e&&null!==e&&Array.isArray(e))(e)?e.map((e=>this.Clone(e))):e:Object.keys(e).reduce(((t,r)=>({...t,[r]:this.Clone(e[r])})),Object.getOwnPropertySymbols(e).reduce(((t,r)=>({...t,[r]:this.Clone(e[r])})),{}));var t}}t.TypeBuilder=n,t.Type=new n},86236:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const n=r(38355),i=r(35671),o=r(30002),s=r(31512),a=["/properties"],c="http://json-schema.org/draft-07/schema";class l extends n.default{_addVocabularies(){super._addVocabularies(),i.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(s,a):s;this.addMetaSchema(e,c,!1),this.refs["http://json-schema.org/schema"]=c}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}}e.exports=t=l,Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var u=r(91686);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var d=r(15669);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return d._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return d.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return d.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return d.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return d.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return d.CodeGen}})},66545:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class r{}t._CodeOrName=r,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends r{constructor(e){if(super(),!t.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=n;class i extends r{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce(((e,t)=>`${e}${t}`),"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce(((e,t)=>(t instanceof n&&(e[t.str]=(e[t.str]||0)+1),e)),{})}}function o(e,...t){const r=[e[0]];let n=0;for(;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const n=r(66545),i=r(59187);var o=r(66545);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return o._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return o.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return o.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return o.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return o.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return o.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return o.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return o.Name}});var s=r(59187);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return s.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return s.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return s.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return s.varKinds}}),t.operators={GT:new n._Code(">"),GTE:new n._Code(">="),LT:new n._Code("<"),LTE:new n._Code("<="),EQ:new n._Code("==="),NEQ:new n._Code("!=="),NOT:new n._Code("!"),OR:new n._Code("||"),AND:new n._Code("&&"),ADD:new n._Code("+")};class a{optimizeNodes(){return this}optimizeNames(e,t){return this}}class c extends a{constructor(e,t,r){super(),this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){const r=e?i.varKinds.var:this.varKind,n=void 0===this.rhs?"":` = ${this.rhs}`;return`${r} ${this.name}${n};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=R(this.rhs,e,t)),this}get names(){return this.rhs instanceof n._CodeOrName?this.rhs.names:{}}}class l extends a{constructor(e,t,r){super(),this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof n.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=R(this.rhs,e,t),this}get names(){return P(this.lhs instanceof n.Name?{}:{...this.lhs.names},this.rhs)}}class u extends l{constructor(e,t,r,n){super(e,r,n),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class d extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class p extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class h extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class f extends a{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=R(this.code,e,t),this}get names(){return this.code instanceof n._CodeOrName?this.code.names:{}}}class g extends a{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce(((t,r)=>t+r.render(e)),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;for(;t--;){const r=e[t].optimizeNodes();Array.isArray(r)?e.splice(t,1,...r):r?e[t]=r:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){const{nodes:r}=this;let n=r.length;for(;n--;){const i=r[n];i.optimizeNames(e,t)||(N(e,i.names),r.splice(n,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce(((e,t)=>A(e,t.names)),{})}}class m extends g{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class y extends g{}class v extends m{}v.kind="else";class _ extends m{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new v(e):e}return t?!1===e?t instanceof _?t:t.nodes:this.nodes.length?this:new _(O(e),t instanceof _?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var r;if(this.else=null===(r=this.else)||void 0===r?void 0:r.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=R(this.condition,e,t),this}get names(){const e=super.names;return P(e,this.condition),this.else&&A(e,this.else.names),e}}_.kind="if";class b extends m{}b.kind="for";class w extends b{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=R(this.iteration,e,t),this}get names(){return A(super.names,this.iteration.names)}}class C extends b{constructor(e,t,r,n){super(),this.varKind=e,this.name=t,this.from=r,this.to=n}render(e){const t=e.es5?i.varKinds.var:this.varKind,{name:r,from:n,to:o}=this;return`for(${t} ${r}=${n}; ${r}<${o}; ${r}++)`+super.render(e)}get names(){const e=P(super.names,this.from);return P(e,this.to)}}class E extends b{constructor(e,t,r,n){super(),this.loop=e,this.varKind=t,this.name=r,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=R(this.iterable,e,t),this}get names(){return A(super.names,this.iterable.names)}}class T extends m{constructor(e,t,r){super(),this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}T.kind="func";class S extends g{render(e){return"return "+super.render(e)}}S.kind="return";class x extends m{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(e,t){var r,n;return super.optimizeNames(e,t),null===(r=this.catch)||void 0===r||r.optimizeNames(e,t),null===(n=this.finally)||void 0===n||n.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&A(e,this.catch.names),this.finally&&A(e,this.finally.names),e}}class k extends m{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}k.kind="catch";class I extends m{render(e){return"finally"+super.render(e)}}function A(e,t){for(const r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function P(e,t){return t instanceof n._CodeOrName?A(e,t.names):e}function R(e,t,r){return e instanceof n.Name?o(e):(i=e)instanceof n._Code&&i._items.some((e=>e instanceof n.Name&&1===t[e.str]&&void 0!==r[e.str]))?new n._Code(e._items.reduce(((e,t)=>(t instanceof n.Name&&(t=o(t)),t instanceof n._Code?e.push(...t._items):e.push(t),e)),[])):e;var i;function o(e){const n=r[e.str];return void 0===n||1!==t[e.str]?e:(delete t[e.str],n)}}function N(e,t){for(const r in t)e[r]=(e[r]||0)-(t[r]||0)}function O(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:n._`!${B(e)}`}I.kind="finally",t.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new i.Scope({parent:e}),this._nodes=[new y]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,n){const i=this._scope.toName(t);return void 0!==r&&n&&(this._constants[i.str]=r),this._leafNode(new c(e,i,r)),i}const(e,t,r){return this._def(i.varKinds.const,e,t,r)}let(e,t,r){return this._def(i.varKinds.let,e,t,r)}var(e,t,r){return this._def(i.varKinds.var,e,t,r)}assign(e,t,r){return this._leafNode(new l(e,t,r))}add(e,r){return this._leafNode(new u(e,t.operators.ADD,r))}code(e){return"function"==typeof e?e():e!==n.nil&&this._leafNode(new f(e)),this}object(...e){const t=["{"];for(const[r,i]of e)t.length>1&&t.push(","),t.push(r),(r!==i||this.opts.es5)&&(t.push(":"),(0,n.addCodeArg)(t,i));return t.push("}"),new n._Code(t)}if(e,t,r){if(this._blockNode(new _(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new _(e))}else(){return this._elseNode(new v)}endIf(){return this._endBlockNode(_,v)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new w(e),t)}forRange(e,t,r,n,o=(this.opts.es5?i.varKinds.var:i.varKinds.let)){const s=this._scope.toName(e);return this._for(new C(o,s,t,r),(()=>n(s)))}forOf(e,t,r,o=i.varKinds.const){const s=this._scope.toName(e);if(this.opts.es5){const e=t instanceof n.Name?t:this.var("_arr",t);return this.forRange("_i",0,n._`${e}.length`,(t=>{this.var(s,n._`${e}[${t}]`),r(s)}))}return this._for(new E("of",o,s,t),(()=>r(s)))}forIn(e,t,r,o=(this.opts.es5?i.varKinds.var:i.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,n._`Object.keys(${t})`,r);const s=this._scope.toName(e);return this._for(new E("in",o,s,t),(()=>r(s)))}endFor(){return this._endBlockNode(b)}label(e){return this._leafNode(new d(e))}break(e){return this._leafNode(new p(e))}return(e){const t=new S;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(S)}try(e,t,r){if(!t&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');const n=new x;if(this._blockNode(n),this.code(e),t){const e=this.name("e");this._currNode=n.catch=new k(e),t(e)}return r&&(this._currNode=n.finally=new I,this.code(r)),this._endBlockNode(k,I)}throw(e){return this._leafNode(new h(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){const t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");const r=this._nodes.length-t;if(r<0||void 0!==e&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=n.nil,r,i){return this._blockNode(new T(e,t,r)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(T)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){const r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof _))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},t.not=O;const D=M(t.operators.AND);t.and=function(...e){return e.reduce(D)};const L=M(t.operators.OR);function M(e){return(t,r)=>t===n.nil?r:r===n.nil?t:n._`${B(t)} ${e} ${B(r)}`}function B(e){return e instanceof n.Name?e:n._`(${e})`}t.or=function(...e){return e.reduce(L)}},59187:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const n=r(66545);class i extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var o;!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(o=t.UsedValueState||(t.UsedValueState={})),t.varKinds={const:new n.Name("const"),let:new n.Name("let"),var:new n.Name("var")};class s{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof n.Name?e:this.name(e)}name(e){return new n.Name(this._newName(e))}_newName(e){return`${e}${(this._names[e]||this._nameGroup(e)).index++}`}_nameGroup(e){var t,r;if((null===(r=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===r?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}t.Scope=s;class a extends n.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:r}){this.value=e,this.scopePath=n._`.${new n.Name(t)}[${r}]`}}t.ValueScopeName=a;const c=n._`\n`;t.ValueScope=class extends s{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?c:n.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){var r;if(void 0===t.ref)throw new Error("CodeGen: ref must be passed in value");const n=this.toName(e),{prefix:i}=n,o=null!==(r=t.key)&&void 0!==r?r:t.ref;let s=this._values[i];if(s){const e=s.get(o);if(e)return e}else s=this._values[i]=new Map;s.set(o,n);const a=this._scope[i]||(this._scope[i]=[]),c=a.length;return a[c]=t.ref,n.setValue(t,{property:i,itemIndex:c}),n}getValue(e,t){const r=this._values[e];if(r)return r.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(t=>{if(void 0===t.scopePath)throw new Error(`CodeGen: name "${t}" has no value`);return n._`${e}${t.scopePath}`}))}scopeCode(e=this._values,t,r){return this._reduceValues(e,(e=>{if(void 0===e.value)throw new Error(`CodeGen: name "${e}" has no value`);return e.value.code}),t,r)}_reduceValues(e,r,s={},a){let c=n.nil;for(const l in e){const u=e[l];if(!u)continue;const d=s[l]=s[l]||new Map;u.forEach((e=>{if(d.has(e))return;d.set(e,o.Started);let s=r(e);if(s){const r=this.opts.es5?t.varKinds.var:t.varKinds.const;c=n._`${c}${r} ${e} = ${s};${this.opts._n}`}else{if(!(s=null==a?void 0:a(e)))throw new i(e);c=n._`${c}${s}${this.opts._n}`}d.set(e,o.Completed)}))}return c}}},6930:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const n=r(15669),i=r(88936),o=r(17250);function s(e,t){const r=e.const("err",t);e.if(n._`${o.default.vErrors} === null`,(()=>e.assign(o.default.vErrors,n._`[${r}]`)),n._`${o.default.vErrors}.push(${r})`),e.code(n._`${o.default.errors}++`)}function a(e,t){const{gen:r,validateName:i,schemaEnv:o}=e;o.$async?r.throw(n._`new ${e.ValidationError}(${t})`):(r.assign(n._`${i}.errors`,t),r.return(!1))}t.keywordError={message:({keyword:e})=>n.str`must pass "${e}" keyword validation`},t.keyword$DataError={message:({keyword:e,schemaType:t})=>t?n.str`"${e}" keyword must be ${t} ($data)`:n.str`"${e}" keyword is invalid ($data)`},t.reportError=function(e,r=t.keywordError,i,o){const{it:c}=e,{gen:u,compositeRule:d,allErrors:p}=c,h=l(e,r,i);(null!=o?o:d||p)?s(u,h):a(c,n._`[${h}]`)},t.reportExtraError=function(e,r=t.keywordError,n){const{it:i}=e,{gen:c,compositeRule:u,allErrors:d}=i;s(c,l(e,r,n)),u||d||a(i,o.default.vErrors)},t.resetErrorsCount=function(e,t){e.assign(o.default.errors,t),e.if(n._`${o.default.vErrors} !== null`,(()=>e.if(t,(()=>e.assign(n._`${o.default.vErrors}.length`,t)),(()=>e.assign(o.default.vErrors,null)))))},t.extendErrors=function({gen:e,keyword:t,schemaValue:r,data:i,errsCount:s,it:a}){if(void 0===s)throw new Error("ajv implementation error");const c=e.name("err");e.forRange("i",s,o.default.errors,(s=>{e.const(c,n._`${o.default.vErrors}[${s}]`),e.if(n._`${c}.instancePath === undefined`,(()=>e.assign(n._`${c}.instancePath`,(0,n.strConcat)(o.default.instancePath,a.errorPath)))),e.assign(n._`${c}.schemaPath`,n.str`${a.errSchemaPath}/${t}`),a.opts.verbose&&(e.assign(n._`${c}.schema`,r),e.assign(n._`${c}.data`,i))}))};const c={keyword:new n.Name("keyword"),schemaPath:new n.Name("schemaPath"),params:new n.Name("params"),propertyName:new n.Name("propertyName"),message:new n.Name("message"),schema:new n.Name("schema"),parentSchema:new n.Name("parentSchema")};function l(e,t,r){const{createErrors:i}=e.it;return!1===i?n._`{}`:function(e,t,r={}){const{gen:i,it:s}=e,a=[u(s,r),d(e,r)];return function(e,{params:t,message:r},i){const{keyword:s,data:a,schemaValue:l,it:u}=e,{opts:d,propertyName:p,topSchemaRef:h,schemaPath:f}=u;i.push([c.keyword,s],[c.params,"function"==typeof t?t(e):t||n._`{}`]),d.messages&&i.push([c.message,"function"==typeof r?r(e):r]),d.verbose&&i.push([c.schema,l],[c.parentSchema,n._`${h}${f}`],[o.default.data,a]),p&&i.push([c.propertyName,p])}(e,t,a),i.object(...a)}(e,t,r)}function u({errorPath:e},{instancePath:t}){const r=t?n.str`${e}${(0,i.getErrorPath)(t,i.Type.Str)}`:e;return[o.default.instancePath,(0,n.strConcat)(o.default.instancePath,r)]}function d({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:o}){let s=o?t:n.str`${t}/${e}`;return r&&(s=n.str`${s}${(0,i.getErrorPath)(r,i.Type.Str)}`),[c.schemaPath,s]}},87382:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;const n=r(15669),i=r(46448),o=r(17250),s=r(96696),a=r(88936),c=r(91686);class l{constructor(e){var t;let r;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!==(t=e.baseId)&&void 0!==t?t:(0,s.normalizeId)(null==r?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==r?void 0:r.$async,this.refs={}}}function u(e){const t=p.call(this,e);if(t)return t;const r=(0,s.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:a,lines:l}=this.opts.code,{ownProperties:u}=this.opts,d=new n.CodeGen(this.scope,{es5:a,lines:l,ownProperties:u});let h;e.$async&&(h=d.scopeValue("Error",{ref:i.default,code:n._`require("ajv/dist/runtime/validation_error").default`}));const f=d.scopeName("validate");e.validateName=f;const g={gen:d,allErrors:this.opts.allErrors,data:o.default.data,parentData:o.default.parentData,parentDataProperty:o.default.parentDataProperty,dataNames:[o.default.data],dataPathArr:[n.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:d.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,n.stringify)(e.schema)}:{ref:e.schema}),validateName:f,ValidationError:h,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:n.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:n._`""`,opts:this.opts,self:this};let m;try{this._compilations.add(e),(0,c.validateFunctionCode)(g),d.optimize(this.opts.code.optimize);const t=d.toString();m=`${d.scopeRefs(o.default.scope)}return ${t}`,this.opts.code.process&&(m=this.opts.code.process(m,e));const r=new Function(`${o.default.self}`,`${o.default.scope}`,m)(this,this.scope.get());if(this.scope.value(f,{ref:r}),r.errors=null,r.schema=e.schema,r.schemaEnv=e,e.$async&&(r.$async=!0),!0===this.opts.code.source&&(r.source={validateName:f,validateCode:t,scopeValues:d._values}),this.opts.unevaluated){const{props:e,items:t}=g;r.evaluated={props:e instanceof n.Name?void 0:e,items:t instanceof n.Name?void 0:t,dynamicProps:e instanceof n.Name,dynamicItems:t instanceof n.Name},r.source&&(r.source.evaluated=(0,n.stringify)(r.evaluated))}return e.validate=r,e}catch(t){throw delete e.validate,delete e.validateName,m&&this.logger.error("Error compiling schema, function code:",m),t}finally{this._compilations.delete(e)}}function d(e){return(0,s.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:u.call(this,e)}function p(e){for(const n of this._compilations)if(r=e,(t=n).schema===r.schema&&t.root===r.root&&t.baseId===r.baseId)return n;var t,r}function h(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||f.call(this,e,t)}function f(e,t){const r=this.opts.uriResolver.parse(t),n=(0,s._getFullPath)(this.opts.uriResolver,r);let i=(0,s.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===i)return m.call(this,r,e);const o=(0,s.normalizeId)(n),a=this.refs[o]||this.schemas[o];if("string"==typeof a){const t=f.call(this,e,a);if("object"!=typeof(null==t?void 0:t.schema))return;return m.call(this,r,t)}if("object"==typeof(null==a?void 0:a.schema)){if(a.validate||u.call(this,a),o===(0,s.normalizeId)(t)){const{schema:t}=a,{schemaId:r}=this.opts,n=t[r];return n&&(i=(0,s.resolveUrl)(this.opts.uriResolver,i,n)),new l({schema:t,schemaId:r,root:e,baseId:i})}return m.call(this,r,a)}}t.SchemaEnv=l,t.compileSchema=u,t.resolveRef=function(e,t,r){var n;r=(0,s.resolveUrl)(this.opts.uriResolver,t,r);const i=e.refs[r];if(i)return i;let o=h.call(this,e,r);if(void 0===o){const i=null===(n=e.localRefs)||void 0===n?void 0:n[r],{schemaId:s}=this.opts;i&&(o=new l({schema:i,schemaId:s,root:e,baseId:t}))}return void 0!==o?e.refs[r]=d.call(this,o):void 0},t.getCompilingSchema=p,t.resolveSchema=f;const g=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function m(e,{baseId:t,schema:r,root:n}){var i;if("/"!==(null===(i=e.fragment)||void 0===i?void 0:i[0]))return;for(const n of e.fragment.slice(1).split("/")){if("boolean"==typeof r)return;const e=r[(0,a.unescapeFragment)(n)];if(void 0===e)return;const i="object"==typeof(r=e)&&r[this.opts.schemaId];!g.has(n)&&i&&(t=(0,s.resolveUrl)(this.opts.uriResolver,t,i))}let o;if("boolean"!=typeof r&&r.$ref&&!(0,a.schemaHasRulesButRef)(r,this.RULES)){const e=(0,s.resolveUrl)(this.opts.uriResolver,t,r.$ref);o=f.call(this,n,e)}const{schemaId:c}=this.opts;return o=o||new l({schema:r,schemaId:c,root:n,baseId:t}),o.schema!==o.root.schema?o:void 0}},17250:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(15669),i={data:new n.Name("data"),valCxt:new n.Name("valCxt"),instancePath:new n.Name("instancePath"),parentData:new n.Name("parentData"),parentDataProperty:new n.Name("parentDataProperty"),rootData:new n.Name("rootData"),dynamicAnchors:new n.Name("dynamicAnchors"),vErrors:new n.Name("vErrors"),errors:new n.Name("errors"),this:new n.Name("this"),self:new n.Name("self"),scope:new n.Name("scope"),json:new n.Name("json"),jsonPos:new n.Name("jsonPos"),jsonLen:new n.Name("jsonLen"),jsonPart:new n.Name("jsonPart")};t.default=i},91578:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(96696);class i extends Error{constructor(e,t,r,i){super(i||`can't resolve reference ${r} from id ${t}`),this.missingRef=(0,n.resolveUrl)(e,t,r),this.missingSchema=(0,n.normalizeId)((0,n.getFullPath)(e,this.missingRef))}}t.default=i},96696:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;const n=r(88936),i=r(66471),o=r(25127),s=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);t.inlineRef=function(e,t=!0){return"boolean"==typeof e||(!0===t?!c(e):!!t&&l(e)<=t)};const a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function c(e){for(const t in e){if(a.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(c))return!0;if("object"==typeof r&&c(r))return!0}return!1}function l(e){let t=0;for(const r in e){if("$ref"===r)return 1/0;if(t++,!s.has(r)&&("object"==typeof e[r]&&(0,n.eachItem)(e[r],(e=>t+=l(e))),t===1/0))return 1/0}return t}function u(e,t="",r){!1!==r&&(t=h(t));const n=e.parse(t);return d(e,n)}function d(e,t){return e.serialize(t).split("#")[0]+"#"}t.getFullPath=u,t._getFullPath=d;const p=/#\/?$/;function h(e){return e?e.replace(p,""):""}t.normalizeId=h,t.resolveUrl=function(e,t,r){return r=h(r),e.resolve(t,r)};const f=/^[a-z_][-a-z0-9._]*$/i;t.getSchemaRefs=function(e,t){if("boolean"==typeof e)return{};const{schemaId:r,uriResolver:n}=this.opts,s=h(e[r]||t),a={"":s},c=u(n,s,!1),l={},d=new Set;return o(e,{allKeys:!0},((e,t,n,i)=>{if(void 0===i)return;const o=c+t;let s=a[i];function u(t){const r=this.opts.uriResolver.resolve;if(t=h(s?r(s,t):t),d.has(t))throw g(t);d.add(t);let n=this.refs[t];return"string"==typeof n&&(n=this.refs[n]),"object"==typeof n?p(e,n.schema,t):t!==h(o)&&("#"===t[0]?(p(e,l[t],t),l[t]=e):this.refs[t]=o),t}function m(e){if("string"==typeof e){if(!f.test(e))throw new Error(`invalid anchor "${e}"`);u.call(this,`#${e}`)}}"string"==typeof e[r]&&(s=u.call(this,e[r])),m.call(this,e.$anchor),m.call(this,e.$dynamicAnchor),a[t]=s})),l;function p(e,t,r){if(void 0!==t&&!i(e,t))throw g(r)}function g(e){return new Error(`reference "${e}" resolves to more than one schema`)}}},82881:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;const r=new Set(["string","number","integer","boolean","null","object","array"]);t.isJSONType=function(e){return"string"==typeof e&&r.has(e)},t.getRules=function(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}},88936:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;const n=r(15669),i=r(66545);function o(e,t=e.schema){const{opts:r,self:n}=e;if(!r.strictSchema)return;if("boolean"==typeof t)return;const i=n.RULES.keywords;for(const r in t)i[r]||f(e,`unknown keyword: "${r}"`)}function s(e,t){if("boolean"==typeof e)return!e;for(const r in e)if(t[r])return!0;return!1}function a(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function c(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function l({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:i}){return(o,s,a,c)=>{const l=void 0===a?s:a instanceof n.Name?(s instanceof n.Name?e(o,s,a):t(o,s,a),a):s instanceof n.Name?(t(o,a,s),s):r(s,a);return c!==n.Name||l instanceof n.Name?l:i(o,l)}}function u(e,t){if(!0===t)return e.var("props",!0);const r=e.var("props",n._`{}`);return void 0!==t&&d(e,r,t),r}function d(e,t,r){Object.keys(r).forEach((r=>e.assign(n._`${t}${(0,n.getProperty)(r)}`,!0)))}t.toHash=function(e){const t={};for(const r of e)t[r]=!0;return t},t.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(o(e,t),!s(t,e.self.RULES.all))},t.checkUnknownRules=o,t.schemaHasRules=s,t.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(const r in e)if("$ref"!==r&&t.all[r])return!0;return!1},t.schemaRefOrVal=function({topSchemaRef:e,schemaPath:t},r,i,o){if(!o){if("number"==typeof r||"boolean"==typeof r)return r;if("string"==typeof r)return n._`${r}`}return n._`${e}${t}${(0,n.getProperty)(i)}`},t.unescapeFragment=function(e){return c(decodeURIComponent(e))},t.escapeFragment=function(e){return encodeURIComponent(a(e))},t.escapeJsonPointer=a,t.unescapeJsonPointer=c,t.eachItem=function(e,t){if(Array.isArray(e))for(const r of e)t(r);else t(e)},t.mergeEvaluated={props:l({mergeNames:(e,t,r)=>e.if(n._`${r} !== true && ${t} !== undefined`,(()=>{e.if(n._`${t} === true`,(()=>e.assign(r,!0)),(()=>e.assign(r,n._`${r} || {}`).code(n._`Object.assign(${r}, ${t})`)))})),mergeToName:(e,t,r)=>e.if(n._`${r} !== true`,(()=>{!0===t?e.assign(r,!0):(e.assign(r,n._`${r} || {}`),d(e,r,t))})),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:u}),items:l({mergeNames:(e,t,r)=>e.if(n._`${r} !== true && ${t} !== undefined`,(()=>e.assign(r,n._`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`))),mergeToName:(e,t,r)=>e.if(n._`${r} !== true`,(()=>e.assign(r,!0===t||n._`${r} > ${t} ? ${r} : ${t}`))),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},t.evaluatedPropsToName=u,t.setEvaluated=d;const p={};var h;function f(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,!0===r)throw new Error(t);e.self.logger.warn(t)}}t.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:p[t.code]||(p[t.code]=new i._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(h=t.Type||(t.Type={})),t.getErrorPath=function(e,t,r){if(e instanceof n.Name){const i=t===h.Num;return r?i?n._`"[" + ${e} + "]"`:n._`"['" + ${e} + "']"`:i?n._`"/" + ${e}`:n._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,n.getProperty)(e).toString():"/"+a(e)},t.checkStrictMode=f},89073:(e,t)=>{"use strict";function r(e,t){return t.rules.some((t=>n(e,t)))}function n(e,t){var r;return void 0!==e[t.keyword]||(null===(r=t.definition.implements)||void 0===r?void 0:r.some((t=>void 0!==e[t])))}Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0,t.schemaHasRulesForType=function({schema:e,self:t},n){const i=t.RULES.types[n];return i&&!0!==i&&r(e,i)},t.shouldUseGroup=r,t.shouldUseRule=n},12171:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;const n=r(6930),i=r(15669),o=r(17250),s={message:"boolean schema is false"};function a(e,t){const{gen:r,data:i}=e,o={gen:r,keyword:"false schema",data:i,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,n.reportError)(o,s,void 0,t)}t.topBoolOrEmptySchema=function(e){const{gen:t,schema:r,validateName:n}=e;!1===r?a(e,!1):"object"==typeof r&&!0===r.$async?t.return(o.default.data):(t.assign(i._`${n}.errors`,null),t.return(!0))},t.boolOrEmptySchema=function(e,t){const{gen:r,schema:n}=e;!1===n?(r.var(t,!1),a(e)):r.var(t,!0)}},97332:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;const n=r(82881),i=r(89073),o=r(6930),s=r(15669),a=r(88936);var c;function l(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(n.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}!function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"}(c=t.DataType||(t.DataType={})),t.getSchemaTypes=function(e){const t=l(e.type);if(t.includes("null")){if(!1===e.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw new Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},t.getJSONTypes=l,t.coerceAndCheckDataType=function(e,t){const{gen:r,data:n,opts:o}=e,a=function(e,t){return t?e.filter((e=>u.has(e)||"array"===t&&"array"===e)):[]}(t,o.coerceTypes),l=t.length>0&&!(0===a.length&&1===t.length&&(0,i.schemaHasRulesForType)(e,t[0]));if(l){const i=p(t,n,o.strictNumbers,c.Wrong);r.if(i,(()=>{a.length?function(e,t,r){const{gen:n,data:i,opts:o}=e,a=n.let("dataType",s._`typeof ${i}`),c=n.let("coerced",s._`undefined`);"array"===o.coerceTypes&&n.if(s._`${a} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,(()=>n.assign(i,s._`${i}[0]`).assign(a,s._`typeof ${i}`).if(p(t,i,o.strictNumbers),(()=>n.assign(c,i))))),n.if(s._`${c} !== undefined`);for(const e of r)(u.has(e)||"array"===e&&"array"===o.coerceTypes)&&l(e);function l(e){switch(e){case"string":return void n.elseIf(s._`${a} == "number" || ${a} == "boolean"`).assign(c,s._`"" + ${i}`).elseIf(s._`${i} === null`).assign(c,s._`""`);case"number":return void n.elseIf(s._`${a} == "boolean" || ${i} === null +(()=>{var e={23870:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.Trace=t.ProgressType=t.createMessageConnection=t.NullLogger=t.ConnectionOptions=t.ConnectionStrategy=t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=t.CancellationToken=t.CancellationTokenSource=t.Emitter=t.Event=t.Disposable=t.ParameterStructures=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.ErrorCodes=t.ResponseError=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType0=t.RequestType=t.RAL=void 0,t.CancellationStrategy=void 0;const n=r(20839);Object.defineProperty(t,"RequestType",{enumerable:!0,get:function(){return n.RequestType}}),Object.defineProperty(t,"RequestType0",{enumerable:!0,get:function(){return n.RequestType0}}),Object.defineProperty(t,"RequestType1",{enumerable:!0,get:function(){return n.RequestType1}}),Object.defineProperty(t,"RequestType2",{enumerable:!0,get:function(){return n.RequestType2}}),Object.defineProperty(t,"RequestType3",{enumerable:!0,get:function(){return n.RequestType3}}),Object.defineProperty(t,"RequestType4",{enumerable:!0,get:function(){return n.RequestType4}}),Object.defineProperty(t,"RequestType5",{enumerable:!0,get:function(){return n.RequestType5}}),Object.defineProperty(t,"RequestType6",{enumerable:!0,get:function(){return n.RequestType6}}),Object.defineProperty(t,"RequestType7",{enumerable:!0,get:function(){return n.RequestType7}}),Object.defineProperty(t,"RequestType8",{enumerable:!0,get:function(){return n.RequestType8}}),Object.defineProperty(t,"RequestType9",{enumerable:!0,get:function(){return n.RequestType9}}),Object.defineProperty(t,"ResponseError",{enumerable:!0,get:function(){return n.ResponseError}}),Object.defineProperty(t,"ErrorCodes",{enumerable:!0,get:function(){return n.ErrorCodes}}),Object.defineProperty(t,"NotificationType",{enumerable:!0,get:function(){return n.NotificationType}}),Object.defineProperty(t,"NotificationType0",{enumerable:!0,get:function(){return n.NotificationType0}}),Object.defineProperty(t,"NotificationType1",{enumerable:!0,get:function(){return n.NotificationType1}}),Object.defineProperty(t,"NotificationType2",{enumerable:!0,get:function(){return n.NotificationType2}}),Object.defineProperty(t,"NotificationType3",{enumerable:!0,get:function(){return n.NotificationType3}}),Object.defineProperty(t,"NotificationType4",{enumerable:!0,get:function(){return n.NotificationType4}}),Object.defineProperty(t,"NotificationType5",{enumerable:!0,get:function(){return n.NotificationType5}}),Object.defineProperty(t,"NotificationType6",{enumerable:!0,get:function(){return n.NotificationType6}}),Object.defineProperty(t,"NotificationType7",{enumerable:!0,get:function(){return n.NotificationType7}}),Object.defineProperty(t,"NotificationType8",{enumerable:!0,get:function(){return n.NotificationType8}}),Object.defineProperty(t,"NotificationType9",{enumerable:!0,get:function(){return n.NotificationType9}}),Object.defineProperty(t,"ParameterStructures",{enumerable:!0,get:function(){return n.ParameterStructures}});const i=r(83911);Object.defineProperty(t,"Disposable",{enumerable:!0,get:function(){return i.Disposable}});const o=r(27135);Object.defineProperty(t,"Event",{enumerable:!0,get:function(){return o.Event}}),Object.defineProperty(t,"Emitter",{enumerable:!0,get:function(){return o.Emitter}});const s=r(13881);Object.defineProperty(t,"CancellationTokenSource",{enumerable:!0,get:function(){return s.CancellationTokenSource}}),Object.defineProperty(t,"CancellationToken",{enumerable:!0,get:function(){return s.CancellationToken}});const a=r(56525);Object.defineProperty(t,"MessageReader",{enumerable:!0,get:function(){return a.MessageReader}}),Object.defineProperty(t,"AbstractMessageReader",{enumerable:!0,get:function(){return a.AbstractMessageReader}}),Object.defineProperty(t,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return a.ReadableStreamMessageReader}});const c=r(96654);Object.defineProperty(t,"MessageWriter",{enumerable:!0,get:function(){return c.MessageWriter}}),Object.defineProperty(t,"AbstractMessageWriter",{enumerable:!0,get:function(){return c.AbstractMessageWriter}}),Object.defineProperty(t,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return c.WriteableStreamMessageWriter}});const l=r(61343);Object.defineProperty(t,"ConnectionStrategy",{enumerable:!0,get:function(){return l.ConnectionStrategy}}),Object.defineProperty(t,"ConnectionOptions",{enumerable:!0,get:function(){return l.ConnectionOptions}}),Object.defineProperty(t,"NullLogger",{enumerable:!0,get:function(){return l.NullLogger}}),Object.defineProperty(t,"createMessageConnection",{enumerable:!0,get:function(){return l.createMessageConnection}}),Object.defineProperty(t,"ProgressType",{enumerable:!0,get:function(){return l.ProgressType}}),Object.defineProperty(t,"Trace",{enumerable:!0,get:function(){return l.Trace}}),Object.defineProperty(t,"TraceFormat",{enumerable:!0,get:function(){return l.TraceFormat}}),Object.defineProperty(t,"SetTraceNotification",{enumerable:!0,get:function(){return l.SetTraceNotification}}),Object.defineProperty(t,"LogTraceNotification",{enumerable:!0,get:function(){return l.LogTraceNotification}}),Object.defineProperty(t,"ConnectionErrors",{enumerable:!0,get:function(){return l.ConnectionErrors}}),Object.defineProperty(t,"ConnectionError",{enumerable:!0,get:function(){return l.ConnectionError}}),Object.defineProperty(t,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return l.CancellationReceiverStrategy}}),Object.defineProperty(t,"CancellationSenderStrategy",{enumerable:!0,get:function(){return l.CancellationSenderStrategy}}),Object.defineProperty(t,"CancellationStrategy",{enumerable:!0,get:function(){return l.CancellationStrategy}});const u=r(30147);t.RAL=u.default},13881:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;const n=r(30147),i=r(67574),o=r(27135);var s;!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:o.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:o.Event.None}),e.is=function(t){const r=t;return r&&(r===e.None||r===e.Cancelled||i.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}}(s=t.CancellationToken||(t.CancellationToken={}));const a=Object.freeze((function(e,t){const r=n.default().timer.setTimeout(e.bind(t),0);return{dispose(){n.default().timer.clearTimeout(r)}}}));class c{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?a:(this._emitter||(this._emitter=new o.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}}t.CancellationTokenSource=class{get token(){return this._token||(this._token=new c),this._token}cancel(){this._token?this._token.cancel():this._token=s.Cancelled}dispose(){this._token?this._token instanceof c&&this._token.dispose():this._token=s.None}}},61343:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.ConnectionOptions=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.ConnectionStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.Trace=t.NullLogger=t.ProgressType=void 0;const n=r(30147),i=r(67574),o=r(20839),s=r(96184),a=r(27135),c=r(13881);var l,u,d,p,h,f,g,m,y,v,_,b,w;!function(e){e.type=new o.NotificationType("$/cancelRequest")}(l||(l={})),function(e){e.type=new o.NotificationType("$/progress")}(u||(u={})),t.ProgressType=class{constructor(){}},function(e){e.is=function(e){return i.func(e)}}(d||(d={})),t.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}}),function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Verbose=2]="Verbose"}(p=t.Trace||(t.Trace={})),function(e){e.fromString=function(t){if(!i.string(t))return e.Off;switch(t=t.toLowerCase()){case"off":default:return e.Off;case"messages":return e.Messages;case"verbose":return e.Verbose}},e.toString=function(t){switch(t){case e.Off:return"off";case e.Messages:return"messages";case e.Verbose:return"verbose";default:return"off"}}}(p=t.Trace||(t.Trace={})),function(e){e.Text="text",e.JSON="json"}(t.TraceFormat||(t.TraceFormat={})),function(e){e.fromString=function(t){return"json"===(t=t.toLowerCase())?e.JSON:e.Text}}(h=t.TraceFormat||(t.TraceFormat={})),function(e){e.type=new o.NotificationType("$/setTrace")}(f=t.SetTraceNotification||(t.SetTraceNotification={})),function(e){e.type=new o.NotificationType("$/logTrace")}(g=t.LogTraceNotification||(t.LogTraceNotification={})),function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"}(m=t.ConnectionErrors||(t.ConnectionErrors={}));class C extends Error{constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,C.prototype)}}t.ConnectionError=C,function(e){e.is=function(e){const t=e;return t&&i.func(t.cancelUndispatched)}}(y=t.ConnectionStrategy||(t.ConnectionStrategy={})),function(e){e.Message=Object.freeze({createCancellationTokenSource:e=>new c.CancellationTokenSource}),e.is=function(e){const t=e;return t&&i.func(t.createCancellationTokenSource)}}(v=t.CancellationReceiverStrategy||(t.CancellationReceiverStrategy={})),function(e){e.Message=Object.freeze({sendCancellation(e,t){e.sendNotification(l.type,{id:t})},cleanup(e){}}),e.is=function(e){const t=e;return t&&i.func(t.sendCancellation)&&i.func(t.cleanup)}}(_=t.CancellationSenderStrategy||(t.CancellationSenderStrategy={})),function(e){e.Message=Object.freeze({receiver:v.Message,sender:_.Message}),e.is=function(e){const t=e;return t&&v.is(t.receiver)&&_.is(t.sender)}}(b=t.CancellationStrategy||(t.CancellationStrategy={})),(t.ConnectionOptions||(t.ConnectionOptions={})).is=function(e){const t=e;return t&&(b.is(t.cancellationStrategy)||y.is(t.connectionStrategy))},function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"}(w||(w={})),t.createMessageConnection=function(e,r,y,v){const _=void 0!==y?y:t.NullLogger;let E=0,T=0,S=0;const x="2.0";let k;const I=Object.create(null);let A;const P=Object.create(null),R=new Map;let N,O,L=new s.LinkedMap,D=Object.create(null),M=Object.create(null),B=p.Off,F=h.Text,j=w.New;const U=new a.Emitter,$=new a.Emitter,q=new a.Emitter,H=new a.Emitter,V=new a.Emitter,z=v&&v.cancellationStrategy?v.cancellationStrategy:b.Message;function K(e){if(null===e)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+e.toString()}function W(e){}function G(){return j===w.Listening}function Q(){return j===w.Closed}function J(){return j===w.Disposed}function Y(){j!==w.New&&j!==w.Listening||(j=w.Closed,$.fire(void 0))}function X(){N||0===L.size||(N=n.default().timer.setImmediate((()=>{N=void 0,function(){if(0===L.size)return;const e=L.shift();try{o.isRequestMessage(e)?function(e){if(J())return;function t(t,n,i){const s={jsonrpc:x,id:e.id};t instanceof o.ResponseError?s.error=t.toJson():s.result=void 0===t?null:t,ee(s,n,i),r.write(s)}function n(t,n,i){const o={jsonrpc:x,id:e.id,error:t.toJson()};ee(o,n,i),r.write(o)}!function(e){if(B!==p.Off&&O)if(F===h.Text){let t;B===p.Verbose&&e.params&&(t=`Params: ${JSON.stringify(e.params,null,4)}\n\n`),O.log(`Received request '${e.method} - (${e.id})'.`,t)}else te("receive-request",e)}(e);const s=I[e.method];let a,c;s&&(a=s.type,c=s.handler);const l=Date.now();if(c||k){const s=String(e.id),u=z.receiver.createCancellationTokenSource(s);M[s]=u;try{let d;if(c)if(void 0===e.params){if(void 0!==a&&0!==a.numberOfParams)return void n(new o.ResponseError(o.ErrorCodes.InvalidParams,`Request ${e.method} defines ${a.numberOfParams} params but recevied none.`),e.method,l);d=c(u.token)}else if(Array.isArray(e.params)){if(void 0!==a&&a.parameterStructures===o.ParameterStructures.byName)return void n(new o.ResponseError(o.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by name but received parameters by position`),e.method,l);d=c(...e.params,u.token)}else{if(void 0!==a&&a.parameterStructures===o.ParameterStructures.byPosition)return void n(new o.ResponseError(o.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by position but received parameters by name`),e.method,l);d=c(e.params,u.token)}else k&&(d=k(e.method,e.params,u.token));const p=d;d?p.then?p.then((r=>{delete M[s],t(r,e.method,l)}),(t=>{delete M[s],t instanceof o.ResponseError?n(t,e.method,l):t&&i.string(t.message)?n(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,l):n(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,l)})):(delete M[s],t(d,e.method,l)):(delete M[s],function(t,n,i){void 0===t&&(t=null);const o={jsonrpc:x,id:e.id,result:t};ee(o,n,i),r.write(o)}(d,e.method,l))}catch(r){delete M[s],r instanceof o.ResponseError?t(r,e.method,l):r&&i.string(r.message)?n(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${r.message}`),e.method,l):n(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,l)}}else n(new o.ResponseError(o.ErrorCodes.MethodNotFound,`Unhandled method ${e.method}`),e.method,l)}(e):o.isNotificationMessage(e)?function(e){if(J())return;let t,r;if(e.method===l.type.method)r=e=>{const t=e.id,r=M[String(t)];r&&r.cancel()};else{const n=P[e.method];n&&(r=n.handler,t=n.type)}if(r||A)try{!function(e){if(B!==p.Off&&O&&e.method!==g.type.method)if(F===h.Text){let t;B===p.Verbose&&(t=e.params?`Params: ${JSON.stringify(e.params,null,4)}\n\n`:"No parameters provided.\n\n"),O.log(`Received notification '${e.method}'.`,t)}else te("receive-notification",e)}(e),r?void 0===e.params?(void 0!==t&&0!==t.numberOfParams&&t.parameterStructures!==o.ParameterStructures.byName&&_.error(`Notification ${e.method} defines ${t.numberOfParams} params but recevied none.`),r()):Array.isArray(e.params)?(void 0!==t&&(t.parameterStructures===o.ParameterStructures.byName&&_.error(`Notification ${e.method} defines parameters by name but received parameters by position`),t.numberOfParams!==e.params.length&&_.error(`Notification ${e.method} defines ${t.numberOfParams} params but received ${e.params.length} argumennts`)),r(...e.params)):(void 0!==t&&t.parameterStructures===o.ParameterStructures.byPosition&&_.error(`Notification ${e.method} defines parameters by position but received parameters by name`),r(e.params)):A&&A(e.method,e.params)}catch(t){t.message?_.error(`Notification handler '${e.method}' failed with message: ${t.message}`):_.error(`Notification handler '${e.method}' failed unexpectedly.`)}else q.fire(e)}(e):o.isResponseMessage(e)?function(e){if(!J())if(null===e.id)e.error?_.error(`Received response message without id: Error is: \n${JSON.stringify(e.error,void 0,4)}`):_.error("Received response message without id. No further error information provided.");else{const t=String(e.id),r=D[t];if(function(e,t){if(B!==p.Off&&O)if(F===h.Text){let r;if(B===p.Verbose&&(e.error&&e.error.data?r=`Error data: ${JSON.stringify(e.error.data,null,4)}\n\n`:e.result?r=`Result: ${JSON.stringify(e.result,null,4)}\n\n`:void 0===e.error&&(r="No result returned.\n\n")),t){const n=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:"";O.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${n}`,r)}else O.log(`Received response ${e.id} without active response promise.`,r)}else te("receive-response",e)}(e,r),r){delete D[t];try{if(e.error){const t=e.error;r.reject(new o.ResponseError(t.code,t.message,t.data))}else{if(void 0===e.result)throw new Error("Should never happen.");r.resolve(e.result)}}catch(e){e.message?_.error(`Response handler '${r.method}' failed with message: ${e.message}`):_.error(`Response handler '${r.method}' failed unexpectedly.`)}}}}(e):function(e){if(!e)return void _.error("Received empty message.");_.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(e,null,4)}`);const t=e;if(i.string(t.id)||i.number(t.id)){const e=String(t.id),r=D[e];r&&r.reject(new Error("The received response has neither a result nor an error property."))}}(e)}finally{X()}}()})))}e.onClose(Y),e.onError((function(e){U.fire([e,void 0,void 0])})),r.onClose(Y),r.onError((function(e){U.fire(e)}));const Z=e=>{try{if(o.isNotificationMessage(e)&&e.method===l.type.method){const t=K(e.params.id),n=L.get(t);if(o.isRequestMessage(n)){const i=null==v?void 0:v.connectionStrategy,o=i&&i.cancelUndispatched?i.cancelUndispatched(n,W):void 0;if(o&&(void 0!==o.error||void 0!==o.result))return L.delete(t),o.id=n.id,ee(o,e.method,Date.now()),void r.write(o)}}!function(e,t){var r;o.isRequestMessage(t)?e.set(K(t.id),t):o.isResponseMessage(t)?e.set(null===(r=t.id)?"res-unknown-"+(++S).toString():"res-"+r.toString(),t):e.set("not-"+(++T).toString(),t)}(L,e)}finally{X()}};function ee(e,t,r){if(B!==p.Off&&O)if(F===h.Text){let n;B===p.Verbose&&(e.error&&e.error.data?n=`Error data: ${JSON.stringify(e.error.data,null,4)}\n\n`:e.result?n=`Result: ${JSON.stringify(e.result,null,4)}\n\n`:void 0===e.error&&(n="No result returned.\n\n")),O.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-r}ms`,n)}else te("send-response",e)}function te(e,t){if(!O||B===p.Off)return;const r={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};O.log(r)}function re(){if(Q())throw new C(m.Closed,"Connection is closed.");if(J())throw new C(m.Disposed,"Connection is disposed.")}function ne(e){return void 0===e?null:e}function ie(e){return null===e?void 0:e}function oe(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function se(e,t){switch(e){case o.ParameterStructures.auto:return oe(t)?ie(t):[ne(t)];case o.ParameterStructures.byName:if(!oe(t))throw new Error("Recevied parameters by name but param is not an object literal.");return ie(t);case o.ParameterStructures.byPosition:return[ne(t)];default:throw new Error(`Unknown parameter structure ${e.toString()}`)}}function ae(e,t){let r;const n=e.numberOfParams;switch(n){case 0:r=void 0;break;case 1:r=se(e.parameterStructures,t[0]);break;default:r=[];for(let e=0;e{let n,s;if(re(),i.string(e)){n=e;const r=t[0];let i=0,a=o.ParameterStructures.auto;o.ParameterStructures.is(r)&&(i=1,a=r);let c=t.length;const l=c-i;switch(l){case 0:s=void 0;break;case 1:s=se(a,t[i]);break;default:if(a===o.ParameterStructures.byName)throw new Error(`Recevied ${l} parameters for 'by Name' notification parameter structure.`);s=t.slice(i,c).map((e=>ne(e)))}}else{const r=t;n=e.method,s=ae(e,r)}const a={jsonrpc:x,method:n,params:s};!function(e){if(B!==p.Off&&O)if(F===h.Text){let t;B===p.Verbose&&(t=e.params?`Params: ${JSON.stringify(e.params,null,4)}\n\n`:"No parameters provided.\n\n"),O.log(`Sending notification '${e.method}'.`,t)}else te("send-notification",e)}(a),r.write(a)},onNotification:(e,t)=>{let r;return re(),i.func(e)?A=e:t&&(i.string(e)?(r=e,P[e]={type:void 0,handler:t}):(r=e.method,P[e.method]={type:e,handler:t})),{dispose:()=>{void 0!==r?delete P[r]:A=void 0}}},onProgress:(e,t,r)=>{if(R.has(t))throw new Error(`Progress handler for token ${t} already registered`);return R.set(t,r),{dispose:()=>{R.delete(t)}}},sendProgress:(e,t,r)=>{ce.sendNotification(u.type,{token:t,value:r})},onUnhandledProgress:H.event,sendRequest:(e,...t)=>{let n,s,a;if(re(),function(){if(!G())throw new Error("Call listen() first.")}(),i.string(e)){n=e;const r=t[0],i=t[t.length-1];let l=0,u=o.ParameterStructures.auto;o.ParameterStructures.is(r)&&(l=1,u=r);let d=t.length;c.CancellationToken.is(i)&&(d-=1,a=i);const p=d-l;switch(p){case 0:s=void 0;break;case 1:s=se(u,t[l]);break;default:if(u===o.ParameterStructures.byName)throw new Error(`Recevied ${p} parameters for 'by Name' request parameter structure.`);s=t.slice(l,d).map((e=>ne(e)))}}else{const r=t;n=e.method,s=ae(e,r);const i=e.numberOfParams;a=c.CancellationToken.is(r[i])?r[i]:void 0}const l=E++;let u;return a&&(u=a.onCancellationRequested((()=>{z.sender.sendCancellation(ce,l)}))),new Promise(((e,t)=>{const i={jsonrpc:x,id:l,method:n,params:s};let a={method:n,timerStart:Date.now(),resolve:t=>{e(t),z.sender.cleanup(l),null==u||u.dispose()},reject:e=>{t(e),z.sender.cleanup(l),null==u||u.dispose()}};!function(e){if(B!==p.Off&&O)if(F===h.Text){let t;B===p.Verbose&&e.params&&(t=`Params: ${JSON.stringify(e.params,null,4)}\n\n`),O.log(`Sending request '${e.method} - (${e.id})'.`,t)}else te("send-request",e)}(i);try{r.write(i)}catch(e){a.reject(new o.ResponseError(o.ErrorCodes.MessageWriteError,e.message?e.message:"Unknown reason")),a=null}a&&(D[String(l)]=a)}))},onRequest:(e,t)=>{re();let r=null;return d.is(e)?(r=void 0,k=e):i.string(e)?(r=null,void 0!==t&&(r=e,I[e]={handler:t,type:void 0})):void 0!==t&&(r=e.method,I[e.method]={type:e,handler:t}),{dispose:()=>{null!==r&&(void 0!==r?delete I[r]:k=void 0)}}},trace:(e,t,r)=>{let n=!1,o=h.Text;void 0!==r&&(i.boolean(r)?n=r:(n=r.sendNotification||!1,o=r.traceFormat||h.Text)),B=e,F=o,O=B===p.Off?void 0:t,!n||Q()||J()||ce.sendNotification(f.type,{value:p.toString(e)})},onError:U.event,onClose:$.event,onUnhandledNotification:q.event,onDispose:V.event,end:()=>{r.end()},dispose:()=>{if(J())return;j=w.Disposed,V.fire(void 0);const t=new Error("Connection got disposed.");Object.keys(D).forEach((e=>{D[e].reject(t)})),D=Object.create(null),M=Object.create(null),L=new s.LinkedMap,i.func(r.dispose)&&r.dispose(),i.func(e.dispose)&&e.dispose()},listen:()=>{re(),function(){if(G())throw new C(m.AlreadyListening,"Connection is already listening")}(),j=w.Listening,e.listen(Z)},inspect:()=>{n.default().console.log("inspect")}};return ce.onNotification(g.type,(e=>{B!==p.Off&&O&&O.log(e.message,B===p.Verbose?e.verbose:void 0)})),ce.onNotification(u.type,(e=>{const t=R.get(e.token);t?t(e.value):H.fire(e)})),ce}},83911:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Disposable=void 0,(t.Disposable||(t.Disposable={})).create=function(e){return{dispose:e}}},27135:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;const n=r(30147);!function(e){const t={dispose(){}};e.None=function(){return t}}(t.Event||(t.Event={}));class i{add(e,t=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(r)&&r.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let r=!1;for(let n=0,i=this._callbacks.length;n{this._callbacks||(this._callbacks=new i),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);const n={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),n.dispose=o._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(n),n}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}t.Emitter=o,o._noop=function(){}},67574:(e,t)=>{"use strict";function r(e){return"string"==typeof e||e instanceof String}function n(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=r,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=n,t.stringArray=function(e){return n(e)&&e.every((e=>r(e)))}},96184:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.LRUCache=t.LinkedMap=t.Touch=void 0,function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last}(r=t.Touch||(t.Touch={}));class n{constructor(){this[Symbol.toStringTag]="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(){var e;return null===(e=this._head)||void 0===e?void 0:e.value}get last(){var e;return null===(e=this._tail)||void 0===e?void 0:e.value}has(e){return this._map.has(e)}get(e,t=r.None){const n=this._map.get(e);if(n)return t!==r.None&&this.touch(n,t),n.value}set(e,t,n=r.None){let i=this._map.get(e);if(i)i.value=t,n!==r.None&&this.touch(i,n);else{switch(i={key:e,value:t,next:void 0,previous:void 0},n){case r.None:this.addItemLast(i);break;case r.First:this.addItemFirst(i);break;case r.Last:default:this.addItemLast(i)}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const r=this._state;let n=this._head;for(;n;){if(t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");n=n.next}}keys(){const e=this,t=this._state;let r=this._head;const n={[Symbol.iterator]:()=>n,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(r){const e={value:r.key,done:!1};return r=r.next,e}return{value:void 0,done:!0}}};return n}values(){const e=this,t=this._state;let r=this._head;const n={[Symbol.iterator]:()=>n,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(r){const e={value:r.value,done:!1};return r=r.next,e}return{value:void 0,done:!0}}};return n}entries(){const e=this,t=this._state;let r=this._head;const n={[Symbol.iterator]:()=>n,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(r){const e={value:[r.key,r.value],done:!1};return r=r.next,e}return{value:void 0,done:!0}}};return n}[Symbol.iterator](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,r=this.size;for(;t&&r>e;)this._map.delete(t.key),t=t.next,r--;this._head=t,this._size=r,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,r=e.previous;if(!t||!r)throw new Error("Invalid list");t.previous=r,r.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(t===r.First||t===r.Last)if(t===r.First){if(e===this._head)return;const t=e.next,r=e.previous;e===this._tail?(r.next=void 0,this._tail=r):(t.previous=r,r.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===r.Last){if(e===this._tail)return;const t=e.next,r=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=r,r.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach(((t,r)=>{e.push([r,t])})),e}fromJSON(e){this.clear();for(const[t,r]of e)this.set(t,r)}}t.LinkedMap=n,t.LRUCache=class extends n{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=r.AsNew){return super.get(e,t)}peek(e){return super.get(e,r.None)}set(e,t){return super.set(e,t,r.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}},75530:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractMessageBuffer=void 0,t.AbstractMessageBuffer=class{constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){const t="string"==typeof e?this.fromString(e,this._encoding):e;this._chunks.push(t),this._totalLength+=t.byteLength}tryReadHeaders(){if(0===this._chunks.length)return;let e=0,t=0,r=0,n=0;e:for(;tthis._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){const t=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(t)}if(this._chunks[0].byteLength>e){const t=this._chunks[0],r=this.asNative(t,e);return this._chunks[0]=t.slice(e),this._totalLength-=e,r}const t=this.allocNative(e);let r=0;for(;e>0;){const n=this._chunks[0];if(n.byteLength>e){const i=n.slice(0,e);t.set(i,r),r+=e,this._chunks[0]=n.slice(e),this._totalLength-=e,e-=e}else t.set(n,r),r+=n.byteLength,this._chunks.shift(),this._totalLength-=n.byteLength,e-=n.byteLength}return t}}},56525:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=void 0;const n=r(30147),i=r(67574),o=r(27135);var s;(t.MessageReader||(t.MessageReader={})).is=function(e){let t=e;return t&&i.func(t.listen)&&i.func(t.dispose)&&i.func(t.onError)&&i.func(t.onClose)&&i.func(t.onPartialMessage)};class a{constructor(){this.errorEmitter=new o.Emitter,this.closeEmitter=new o.Emitter,this.partialMessageEmitter=new o.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader received error. Reason: ${i.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageReader=a,function(e){e.fromOptions=function(e){var t;let r,i;const o=new Map;let s;const a=new Map;if(void 0===e||"string"==typeof e)r=null!=e?e:"utf-8";else{if(r=null!==(t=e.charset)&&void 0!==t?t:"utf-8",void 0!==e.contentDecoder&&(i=e.contentDecoder,o.set(i.name,i)),void 0!==e.contentDecoders)for(const t of e.contentDecoders)o.set(t.name,t);if(void 0!==e.contentTypeDecoder&&(s=e.contentTypeDecoder,a.set(s.name,s)),void 0!==e.contentTypeDecoders)for(const t of e.contentTypeDecoders)a.set(t.name,t)}return void 0===s&&(s=n.default().applicationJson.decoder,a.set(s.name,s)),{charset:r,contentDecoder:i,contentDecoders:o,contentTypeDecoder:s,contentTypeDecoders:a}}}(s||(s={})),t.ReadableStreamMessageReader=class extends a{constructor(e,t){super(),this.readable=e,this.options=s.fromOptions(t),this.buffer=n.default().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;const t=this.readable.onData((e=>{this.onData(e)}));return this.readable.onError((e=>this.fireError(e))),this.readable.onClose((()=>this.fireClose())),t}onData(e){for(this.buffer.append(e);;){if(-1===this.nextMessageLength){const e=this.buffer.tryReadHeaders();if(!e)return;const t=e.get("Content-Length");if(!t)throw new Error("Header must provide a Content-Length property.");const r=parseInt(t);if(isNaN(r))throw new Error("Content-Length value must be a number.");this.nextMessageLength=r}const e=this.buffer.tryReadBody(this.nextMessageLength);if(void 0===e)return void this.setPartialMessageTimer();let t;this.clearPartialMessageTimer(),this.nextMessageLength=-1,t=void 0!==this.options.contentDecoder?this.options.contentDecoder.decode(e):Promise.resolve(e),t.then((e=>{this.options.contentTypeDecoder.decode(e,this.options).then((e=>{this.callback(e)}),(e=>{this.fireError(e)}))}),(e=>{this.fireError(e)}))}}clearPartialMessageTimer(){this.partialMessageTimer&&(n.default().timer.clearTimeout(this.partialMessageTimer),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),this._partialMessageTimeout<=0||(this.partialMessageTimer=n.default().timer.setTimeout(((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())}),this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}}},96654:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=void 0;const n=r(30147),i=r(67574),o=r(80142),s=r(27135);var a;(t.MessageWriter||(t.MessageWriter={})).is=function(e){let t=e;return t&&i.func(t.dispose)&&i.func(t.onClose)&&i.func(t.onError)&&i.func(t.write)};class c{constructor(){this.errorEmitter=new s.Emitter,this.closeEmitter=new s.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,r){this.errorEmitter.fire([this.asError(e),t,r])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error(`Writer received error. Reason: ${i.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageWriter=c,function(e){e.fromOptions=function(e){var t,r;return void 0===e||"string"==typeof e?{charset:null!=e?e:"utf-8",contentTypeEncoder:n.default().applicationJson.encoder}:{charset:null!==(t=e.charset)&&void 0!==t?t:"utf-8",contentEncoder:e.contentEncoder,contentTypeEncoder:null!==(r=e.contentTypeEncoder)&&void 0!==r?r:n.default().applicationJson.encoder}}}(a||(a={})),t.WriteableStreamMessageWriter=class extends c{constructor(e,t){super(),this.writable=e,this.options=a.fromOptions(t),this.errorCount=0,this.writeSemaphore=new o.Semaphore(1),this.writable.onError((e=>this.fireError(e))),this.writable.onClose((()=>this.fireClose()))}async write(e){return this.writeSemaphore.lock((async()=>this.options.contentTypeEncoder.encode(e,this.options).then((e=>void 0!==this.options.contentEncoder?this.options.contentEncoder.encode(e):e)).then((t=>{const r=[];return r.push("Content-Length: ",t.byteLength.toString(),"\r\n"),r.push("\r\n"),this.doWrite(e,r,t)}),(e=>{throw this.fireError(e),e}))))}async doWrite(e,t,r){try{return await this.writable.write(t.join(""),"ascii"),this.writable.write(r)}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}}},20839:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isResponseMessage=t.isNotificationMessage=t.isRequestMessage=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType=t.RequestType0=t.AbstractMessageSignature=t.ParameterStructures=t.ResponseError=t.ErrorCodes=void 0;const n=r(67574);var i;!function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.jsonrpcReservedErrorRangeStart=-32099,e.serverErrorStart=e.jsonrpcReservedErrorRangeStart,e.MessageWriteError=-32099,e.MessageReadError=-32098,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.jsonrpcReservedErrorRangeEnd=-32e3,e.serverErrorEnd=e.jsonrpcReservedErrorRangeEnd}(i=t.ErrorCodes||(t.ErrorCodes={}));class o extends Error{constructor(e,t,r){super(t),this.code=n.number(e)?e:i.UnknownErrorCode,this.data=r,Object.setPrototypeOf(this,o.prototype)}toJson(){return{code:this.code,message:this.message,data:this.data}}}t.ResponseError=o;class s{constructor(e){this.kind=e}static is(e){return e===s.auto||e===s.byName||e===s.byPosition}toString(){return this.kind}}t.ParameterStructures=s,s.auto=new s("auto"),s.byPosition=new s("byPosition"),s.byName=new s("byName");class a{constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return s.auto}}t.AbstractMessageSignature=a,t.RequestType0=class extends a{constructor(e){super(e,0)}},t.RequestType=class extends a{constructor(e,t=s.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.RequestType1=class extends a{constructor(e,t=s.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.RequestType2=class extends a{constructor(e){super(e,2)}},t.RequestType3=class extends a{constructor(e){super(e,3)}},t.RequestType4=class extends a{constructor(e){super(e,4)}},t.RequestType5=class extends a{constructor(e){super(e,5)}},t.RequestType6=class extends a{constructor(e){super(e,6)}},t.RequestType7=class extends a{constructor(e){super(e,7)}},t.RequestType8=class extends a{constructor(e){super(e,8)}},t.RequestType9=class extends a{constructor(e){super(e,9)}},t.NotificationType=class extends a{constructor(e,t=s.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.NotificationType0=class extends a{constructor(e){super(e,0)}},t.NotificationType1=class extends a{constructor(e,t=s.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.NotificationType2=class extends a{constructor(e){super(e,2)}},t.NotificationType3=class extends a{constructor(e){super(e,3)}},t.NotificationType4=class extends a{constructor(e){super(e,4)}},t.NotificationType5=class extends a{constructor(e){super(e,5)}},t.NotificationType6=class extends a{constructor(e){super(e,6)}},t.NotificationType7=class extends a{constructor(e){super(e,7)}},t.NotificationType8=class extends a{constructor(e){super(e,8)}},t.NotificationType9=class extends a{constructor(e){super(e,9)}},t.isRequestMessage=function(e){const t=e;return t&&n.string(t.method)&&(n.string(t.id)||n.number(t.id))},t.isNotificationMessage=function(e){const t=e;return t&&n.string(t.method)&&void 0===e.id},t.isResponseMessage=function(e){const t=e;return t&&(void 0!==t.result||!!t.error)&&(n.string(t.id)||n.number(t.id)||null===t.id)}},30147:(e,t)=>{"use strict";let r;function n(){if(void 0===r)throw new Error("No runtime abstraction layer installed");return r}Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.install=function(e){if(void 0===e)throw new Error("No runtime abstraction layer provided");r=e}}(n||(n={})),t.default=n},80142:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Semaphore=void 0;const n=r(30147);t.Semaphore=class{constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise(((t,r)=>{this._waiting.push({thunk:e,resolve:t,reject:r}),this.runNext()}))}get active(){return this._active}runNext(){0!==this._waiting.length&&this._active!==this._capacity&&n.default().timer.setImmediate((()=>this.doRunNext()))}doRunNext(){if(0===this._waiting.length||this._active===this._capacity)return;const e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{const t=e.thunk();t instanceof Promise?t.then((t=>{this._active--,e.resolve(t),this.runNext()}),(t=>{this._active--,e.reject(t),this.runNext()})):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}}},74389:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.createServerSocketTransport=t.createClientSocketTransport=t.createServerPipeTransport=t.createClientPipeTransport=t.generateRandomPipeName=t.StreamMessageWriter=t.StreamMessageReader=t.SocketMessageWriter=t.SocketMessageReader=t.IPCMessageWriter=t.IPCMessageReader=void 0;const o=r(23034);o.default.install();const s=r(23870),a=r(71017),c=r(22037),l=r(6113),u=r(41808);i(r(23870),t);class d extends s.AbstractMessageReader{constructor(e){super(),this.process=e;let t=this.process;t.on("error",(e=>this.fireError(e))),t.on("close",(()=>this.fireClose()))}listen(e){return this.process.on("message",e),s.Disposable.create((()=>this.process.off("message",e)))}}t.IPCMessageReader=d;class p extends s.AbstractMessageWriter{constructor(e){super(),this.process=e,this.errorCount=0;let t=this.process;t.on("error",(e=>this.fireError(e))),t.on("close",(()=>this.fireClose))}write(e){try{return"function"==typeof this.process.send&&this.process.send(e,void 0,void 0,(t=>{t?(this.errorCount++,this.handleError(t,e)):this.errorCount=0})),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}}t.IPCMessageWriter=p;class h extends s.ReadableStreamMessageReader{constructor(e,t="utf-8"){super(o.default().stream.asReadableStream(e),t)}}t.SocketMessageReader=h;class f extends s.WriteableStreamMessageWriter{constructor(e,t){super(o.default().stream.asWritableStream(e),t),this.socket=e}dispose(){super.dispose(),this.socket.destroy()}}t.SocketMessageWriter=f;class g extends s.ReadableStreamMessageReader{constructor(e,t){super(o.default().stream.asReadableStream(e),t)}}t.StreamMessageReader=g;class m extends s.WriteableStreamMessageWriter{constructor(e,t){super(o.default().stream.asWritableStream(e),t)}}t.StreamMessageWriter=m;const y=process.env.XDG_RUNTIME_DIR,v=new Map([["linux",107],["darwin",103]]);t.generateRandomPipeName=function(){const e=l.randomBytes(21).toString("hex");if("win32"===process.platform)return`\\\\.\\pipe\\vscode-jsonrpc-${e}-sock`;let t;t=y?a.join(y,`vscode-ipc-${e}.sock`):a.join(c.tmpdir(),`vscode-${e}.sock`);const r=v.get(process.platform);return void 0!==r&&t.length>=r&&o.default().console.warn(`WARNING: IPC handle "${t}" is longer than ${r} characters.`),t},t.createClientPipeTransport=function(e,t="utf-8"){let r;const n=new Promise(((e,t)=>{r=e}));return new Promise(((i,o)=>{let s=u.createServer((e=>{s.close(),r([new h(e,t),new f(e,t)])}));s.on("error",o),s.listen(e,(()=>{s.removeListener("error",o),i({onConnected:()=>n})}))}))},t.createServerPipeTransport=function(e,t="utf-8"){const r=u.createConnection(e);return[new h(r,t),new f(r,t)]},t.createClientSocketTransport=function(e,t="utf-8"){let r;const n=new Promise(((e,t)=>{r=e}));return new Promise(((i,o)=>{const s=u.createServer((e=>{s.close(),r([new h(e,t),new f(e,t)])}));s.on("error",o),s.listen(e,"127.0.0.1",(()=>{s.removeListener("error",o),i({onConnected:()=>n})}))}))},t.createServerSocketTransport=function(e,t="utf-8"){const r=u.createConnection(e,"127.0.0.1");return[new h(r,t),new f(r,t)]},t.createMessageConnection=function(e,t,r,n){r||(r=s.NullLogger);const i=function(e){const t=e;return void 0!==t.read&&void 0!==t.addListener}(e)?new g(e):e,o=function(e){const t=e;return void 0!==t.write&&void 0!==t.addListener}(t)?new m(t):t;return s.ConnectionStrategy.is(n)&&(n={connectionStrategy:n}),s.createMessageConnection(i,o,r,n)}},23034:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(30147),i=r(73837),o=r(83911),s=r(75530);class a extends s.AbstractMessageBuffer{constructor(e="utf-8"){super(e)}emptyBuffer(){return a.emptyBuffer}fromString(e,t){return Buffer.from(e,t)}toString(e,t){return e instanceof Buffer?e.toString(t):new i.TextDecoder(t).decode(e)}asNative(e,t){return void 0===t?e instanceof Buffer?e:Buffer.from(e):e instanceof Buffer?e.slice(0,t):Buffer.from(e,0,t)}allocNative(e){return Buffer.allocUnsafe(e)}}a.emptyBuffer=Buffer.allocUnsafe(0);class c{constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),o.Disposable.create((()=>this.stream.off("close",e)))}onError(e){return this.stream.on("error",e),o.Disposable.create((()=>this.stream.off("error",e)))}onEnd(e){return this.stream.on("end",e),o.Disposable.create((()=>this.stream.off("end",e)))}onData(e){return this.stream.on("data",e),o.Disposable.create((()=>this.stream.off("data",e)))}}class l{constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),o.Disposable.create((()=>this.stream.off("close",e)))}onError(e){return this.stream.on("error",e),o.Disposable.create((()=>this.stream.off("error",e)))}onEnd(e){return this.stream.on("end",e),o.Disposable.create((()=>this.stream.off("end",e)))}write(e,t){return new Promise(((r,n)=>{const i=e=>{null==e?r():n(e)};"string"==typeof e?this.stream.write(e,t,i):this.stream.write(e,i)}))}end(){this.stream.end()}}const u=Object.freeze({messageBuffer:Object.freeze({create:e=>new a(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(e,void 0,0),t.charset))}catch(e){return Promise.reject(e)}}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{try{return e instanceof Buffer?Promise.resolve(JSON.parse(e.toString(t.charset))):Promise.resolve(JSON.parse(new i.TextDecoder(t.charset).decode(e)))}catch(e){return Promise.reject(e)}}})}),stream:Object.freeze({asReadableStream:e=>new c(e),asWritableStream:e=>new l(e)}),console,timer:Object.freeze({setTimeout:(e,t,...r)=>setTimeout(e,t,...r),clearTimeout(e){clearTimeout(e)},setImmediate:(e,...t)=>setImmediate(e,...t),clearImmediate(e){clearImmediate(e)}})});function d(){return u}!function(e){e.install=function(){n.default.install(u)}}(d||(d={})),t.default=d},95028:(e,t,r)=>{"use strict";e.exports=r(74389)},51661:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.LSPErrorCodes=t.createProtocolConnection=void 0,i(r(74389),t),i(r(91674),t),i(r(66140),t),i(r(10542),t);var o,s=r(73767);Object.defineProperty(t,"createProtocolConnection",{enumerable:!0,get:function(){return s.createProtocolConnection}}),(o=t.LSPErrorCodes||(t.LSPErrorCodes={})).lspReservedErrorRangeStart=-32899,o.ContentModified=-32801,o.RequestCancelled=-32800,o.lspReservedErrorRangeEnd=-32800},73767:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const n=r(74389);t.createProtocolConnection=function(e,t,r,i){return n.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),n.createMessageConnection(e,t,r,i)}},66140:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolNotificationType=t.ProtocolNotificationType0=t.ProtocolRequestType=t.ProtocolRequestType0=t.RegistrationType=void 0;const n=r(74389);t.RegistrationType=class{constructor(e){this.method=e}};class i extends n.RequestType0{constructor(e){super(e)}}t.ProtocolRequestType0=i;class o extends n.RequestType{constructor(e){super(e,n.ParameterStructures.byName)}}t.ProtocolRequestType=o;class s extends n.NotificationType0{constructor(e){super(e)}}t.ProtocolNotificationType0=s;class a extends n.NotificationType{constructor(e){super(e,n.ParameterStructures.byName)}}t.ProtocolNotificationType=a},82918:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.CallHierarchyPrepareRequest=void 0;const n=r(66140);var i,o,s;(s=t.CallHierarchyPrepareRequest||(t.CallHierarchyPrepareRequest={})).method="textDocument/prepareCallHierarchy",s.type=new n.ProtocolRequestType(s.method),(o=t.CallHierarchyIncomingCallsRequest||(t.CallHierarchyIncomingCallsRequest={})).method="callHierarchy/incomingCalls",o.type=new n.ProtocolRequestType(o.method),(i=t.CallHierarchyOutgoingCallsRequest||(t.CallHierarchyOutgoingCallsRequest={})).method="callHierarchy/outgoingCalls",i.type=new n.ProtocolRequestType(i.method)},79891:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorPresentationRequest=t.DocumentColorRequest=void 0;const n=r(66140);var i;(i=t.DocumentColorRequest||(t.DocumentColorRequest={})).method="textDocument/documentColor",i.type=new n.ProtocolRequestType(i.method),(t.ColorPresentationRequest||(t.ColorPresentationRequest={})).type=new n.ProtocolRequestType("textDocument/colorPresentation")},85934:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationRequest=void 0;const n=r(66140);(t.ConfigurationRequest||(t.ConfigurationRequest={})).type=new n.ProtocolRequestType("workspace/configuration")},40764:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeclarationRequest=void 0;const n=r(66140);var i;(i=t.DeclarationRequest||(t.DeclarationRequest={})).method="textDocument/declaration",i.type=new n.ProtocolRequestType(i.method)},37846:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.DidRenameFilesNotification=t.WillRenameFilesRequest=t.DidCreateFilesNotification=t.WillCreateFilesRequest=t.FileOperationPatternKind=void 0;const n=r(66140);var i,o,s,a,c,l,u;(u=t.FileOperationPatternKind||(t.FileOperationPatternKind={})).file="file",u.folder="folder",(l=t.WillCreateFilesRequest||(t.WillCreateFilesRequest={})).method="workspace/willCreateFiles",l.type=new n.ProtocolRequestType(l.method),(c=t.DidCreateFilesNotification||(t.DidCreateFilesNotification={})).method="workspace/didCreateFiles",c.type=new n.ProtocolNotificationType(c.method),(a=t.WillRenameFilesRequest||(t.WillRenameFilesRequest={})).method="workspace/willRenameFiles",a.type=new n.ProtocolRequestType(a.method),(s=t.DidRenameFilesNotification||(t.DidRenameFilesNotification={})).method="workspace/didRenameFiles",s.type=new n.ProtocolNotificationType(s.method),(o=t.DidDeleteFilesNotification||(t.DidDeleteFilesNotification={})).method="workspace/didDeleteFiles",o.type=new n.ProtocolNotificationType(o.method),(i=t.WillDeleteFilesRequest||(t.WillDeleteFilesRequest={})).method="workspace/willDeleteFiles",i.type=new n.ProtocolRequestType(i.method)},13394:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeRequest=t.FoldingRangeKind=void 0;const n=r(66140);var i,o;(o=t.FoldingRangeKind||(t.FoldingRangeKind={})).Comment="comment",o.Imports="imports",o.Region="region",(i=t.FoldingRangeRequest||(t.FoldingRangeRequest={})).method="textDocument/foldingRange",i.type=new n.ProtocolRequestType(i.method)},82122:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationRequest=void 0;const n=r(66140);var i;(i=t.ImplementationRequest||(t.ImplementationRequest={})).method="textDocument/implementation",i.type=new n.ProtocolRequestType(i.method)},10542:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentLinkRequest=t.CodeLensRefreshRequest=t.CodeLensResolveRequest=t.CodeLensRequest=t.WorkspaceSymbolRequest=t.CodeActionResolveRequest=t.CodeActionRequest=t.DocumentSymbolRequest=t.DocumentHighlightRequest=t.ReferencesRequest=t.DefinitionRequest=t.SignatureHelpRequest=t.SignatureHelpTriggerKind=t.HoverRequest=t.CompletionResolveRequest=t.CompletionRequest=t.CompletionTriggerKind=t.PublishDiagnosticsNotification=t.WatchKind=t.FileChangeType=t.DidChangeWatchedFilesNotification=t.WillSaveTextDocumentWaitUntilRequest=t.WillSaveTextDocumentNotification=t.TextDocumentSaveReason=t.DidSaveTextDocumentNotification=t.DidCloseTextDocumentNotification=t.DidChangeTextDocumentNotification=t.TextDocumentContentChangeEvent=t.DidOpenTextDocumentNotification=t.TextDocumentSyncKind=t.TelemetryEventNotification=t.LogMessageNotification=t.ShowMessageRequest=t.ShowMessageNotification=t.MessageType=t.DidChangeConfigurationNotification=t.ExitNotification=t.ShutdownRequest=t.InitializedNotification=t.InitializeError=t.InitializeRequest=t.WorkDoneProgressOptions=t.TextDocumentRegistrationOptions=t.StaticRegistrationOptions=t.FailureHandlingKind=t.ResourceOperationKind=t.UnregistrationRequest=t.RegistrationRequest=t.DocumentSelector=t.DocumentFilter=void 0,t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.WillRenameFilesRequest=t.DidRenameFilesNotification=t.WillCreateFilesRequest=t.DidCreateFilesNotification=t.FileOperationPatternKind=t.LinkedEditingRangeRequest=t.ShowDocumentRequest=t.SemanticTokensRegistrationType=t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.TokenFormat=t.SemanticTokens=t.SemanticTokenModifiers=t.SemanticTokenTypes=t.CallHierarchyPrepareRequest=t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=t.SelectionRangeRequest=t.DeclarationRequest=t.FoldingRangeRequest=t.ColorPresentationRequest=t.DocumentColorRequest=t.ConfigurationRequest=t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=t.TypeDefinitionRequest=t.ImplementationRequest=t.ApplyWorkspaceEditRequest=t.ExecuteCommandRequest=t.PrepareRenameRequest=t.RenameRequest=t.PrepareSupportDefaultBehavior=t.DocumentOnTypeFormattingRequest=t.DocumentRangeFormattingRequest=t.DocumentFormattingRequest=t.DocumentLinkResolveRequest=void 0;const n=r(69533),i=r(66140),o=r(82122);Object.defineProperty(t,"ImplementationRequest",{enumerable:!0,get:function(){return o.ImplementationRequest}});const s=r(71589);Object.defineProperty(t,"TypeDefinitionRequest",{enumerable:!0,get:function(){return s.TypeDefinitionRequest}});const a=r(79795);Object.defineProperty(t,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return a.WorkspaceFoldersRequest}}),Object.defineProperty(t,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return a.DidChangeWorkspaceFoldersNotification}});const c=r(85934);Object.defineProperty(t,"ConfigurationRequest",{enumerable:!0,get:function(){return c.ConfigurationRequest}});const l=r(79891);Object.defineProperty(t,"DocumentColorRequest",{enumerable:!0,get:function(){return l.DocumentColorRequest}}),Object.defineProperty(t,"ColorPresentationRequest",{enumerable:!0,get:function(){return l.ColorPresentationRequest}});const u=r(13394);Object.defineProperty(t,"FoldingRangeRequest",{enumerable:!0,get:function(){return u.FoldingRangeRequest}});const d=r(40764);Object.defineProperty(t,"DeclarationRequest",{enumerable:!0,get:function(){return d.DeclarationRequest}});const p=r(5206);Object.defineProperty(t,"SelectionRangeRequest",{enumerable:!0,get:function(){return p.SelectionRangeRequest}});const h=r(21862);Object.defineProperty(t,"WorkDoneProgress",{enumerable:!0,get:function(){return h.WorkDoneProgress}}),Object.defineProperty(t,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return h.WorkDoneProgressCreateRequest}}),Object.defineProperty(t,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return h.WorkDoneProgressCancelNotification}});const f=r(82918);Object.defineProperty(t,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return f.CallHierarchyIncomingCallsRequest}}),Object.defineProperty(t,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return f.CallHierarchyOutgoingCallsRequest}}),Object.defineProperty(t,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return f.CallHierarchyPrepareRequest}});const g=r(39434);Object.defineProperty(t,"SemanticTokenTypes",{enumerable:!0,get:function(){return g.SemanticTokenTypes}}),Object.defineProperty(t,"SemanticTokenModifiers",{enumerable:!0,get:function(){return g.SemanticTokenModifiers}}),Object.defineProperty(t,"SemanticTokens",{enumerable:!0,get:function(){return g.SemanticTokens}}),Object.defineProperty(t,"TokenFormat",{enumerable:!0,get:function(){return g.TokenFormat}}),Object.defineProperty(t,"SemanticTokensRequest",{enumerable:!0,get:function(){return g.SemanticTokensRequest}}),Object.defineProperty(t,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return g.SemanticTokensDeltaRequest}}),Object.defineProperty(t,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return g.SemanticTokensRangeRequest}}),Object.defineProperty(t,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return g.SemanticTokensRefreshRequest}}),Object.defineProperty(t,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return g.SemanticTokensRegistrationType}});const m=r(75726);Object.defineProperty(t,"ShowDocumentRequest",{enumerable:!0,get:function(){return m.ShowDocumentRequest}});const y=r(26305);Object.defineProperty(t,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return y.LinkedEditingRangeRequest}});const v=r(37846);Object.defineProperty(t,"FileOperationPatternKind",{enumerable:!0,get:function(){return v.FileOperationPatternKind}}),Object.defineProperty(t,"DidCreateFilesNotification",{enumerable:!0,get:function(){return v.DidCreateFilesNotification}}),Object.defineProperty(t,"WillCreateFilesRequest",{enumerable:!0,get:function(){return v.WillCreateFilesRequest}}),Object.defineProperty(t,"DidRenameFilesNotification",{enumerable:!0,get:function(){return v.DidRenameFilesNotification}}),Object.defineProperty(t,"WillRenameFilesRequest",{enumerable:!0,get:function(){return v.WillRenameFilesRequest}}),Object.defineProperty(t,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return v.DidDeleteFilesNotification}}),Object.defineProperty(t,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return v.WillDeleteFilesRequest}});const _=r(73443);var b,w,C,E,T,S,x,k,I,A,P,R,N,O,L,D,M,B,F,j,U,$,q,H,V,z,K,W,G,Q,J,Y,X,Z,ee,te,re,ne,ie,oe;Object.defineProperty(t,"UniquenessLevel",{enumerable:!0,get:function(){return _.UniquenessLevel}}),Object.defineProperty(t,"MonikerKind",{enumerable:!0,get:function(){return _.MonikerKind}}),Object.defineProperty(t,"MonikerRequest",{enumerable:!0,get:function(){return _.MonikerRequest}}),function(e){e.is=function(e){const t=e;return n.string(t.language)||n.string(t.scheme)||n.string(t.pattern)}}(b=t.DocumentFilter||(t.DocumentFilter={})),function(e){e.is=function(e){if(!Array.isArray(e))return!1;for(let t of e)if(!n.string(t)&&!b.is(t))return!1;return!0}}(w=t.DocumentSelector||(t.DocumentSelector={})),(t.RegistrationRequest||(t.RegistrationRequest={})).type=new i.ProtocolRequestType("client/registerCapability"),(t.UnregistrationRequest||(t.UnregistrationRequest={})).type=new i.ProtocolRequestType("client/unregisterCapability"),(oe=t.ResourceOperationKind||(t.ResourceOperationKind={})).Create="create",oe.Rename="rename",oe.Delete="delete",(ie=t.FailureHandlingKind||(t.FailureHandlingKind={})).Abort="abort",ie.Transactional="transactional",ie.TextOnlyTransactional="textOnlyTransactional",ie.Undo="undo",(t.StaticRegistrationOptions||(t.StaticRegistrationOptions={})).hasId=function(e){const t=e;return t&&n.string(t.id)&&t.id.length>0},(t.TextDocumentRegistrationOptions||(t.TextDocumentRegistrationOptions={})).is=function(e){const t=e;return t&&(null===t.documentSelector||w.is(t.documentSelector))},(ne=t.WorkDoneProgressOptions||(t.WorkDoneProgressOptions={})).is=function(e){const t=e;return n.objectLiteral(t)&&(void 0===t.workDoneProgress||n.boolean(t.workDoneProgress))},ne.hasWorkDoneProgress=function(e){const t=e;return t&&n.boolean(t.workDoneProgress)},(t.InitializeRequest||(t.InitializeRequest={})).type=new i.ProtocolRequestType("initialize"),(t.InitializeError||(t.InitializeError={})).unknownProtocolVersion=1,(t.InitializedNotification||(t.InitializedNotification={})).type=new i.ProtocolNotificationType("initialized"),(t.ShutdownRequest||(t.ShutdownRequest={})).type=new i.ProtocolRequestType0("shutdown"),(t.ExitNotification||(t.ExitNotification={})).type=new i.ProtocolNotificationType0("exit"),(t.DidChangeConfigurationNotification||(t.DidChangeConfigurationNotification={})).type=new i.ProtocolNotificationType("workspace/didChangeConfiguration"),(re=t.MessageType||(t.MessageType={})).Error=1,re.Warning=2,re.Info=3,re.Log=4,(t.ShowMessageNotification||(t.ShowMessageNotification={})).type=new i.ProtocolNotificationType("window/showMessage"),(t.ShowMessageRequest||(t.ShowMessageRequest={})).type=new i.ProtocolRequestType("window/showMessageRequest"),(t.LogMessageNotification||(t.LogMessageNotification={})).type=new i.ProtocolNotificationType("window/logMessage"),(t.TelemetryEventNotification||(t.TelemetryEventNotification={})).type=new i.ProtocolNotificationType("telemetry/event"),(te=t.TextDocumentSyncKind||(t.TextDocumentSyncKind={})).None=0,te.Full=1,te.Incremental=2,(ee=t.DidOpenTextDocumentNotification||(t.DidOpenTextDocumentNotification={})).method="textDocument/didOpen",ee.type=new i.ProtocolNotificationType(ee.method),(Z=t.TextDocumentContentChangeEvent||(t.TextDocumentContentChangeEvent={})).isIncremental=function(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)},Z.isFull=function(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength},(X=t.DidChangeTextDocumentNotification||(t.DidChangeTextDocumentNotification={})).method="textDocument/didChange",X.type=new i.ProtocolNotificationType(X.method),(Y=t.DidCloseTextDocumentNotification||(t.DidCloseTextDocumentNotification={})).method="textDocument/didClose",Y.type=new i.ProtocolNotificationType(Y.method),(J=t.DidSaveTextDocumentNotification||(t.DidSaveTextDocumentNotification={})).method="textDocument/didSave",J.type=new i.ProtocolNotificationType(J.method),(Q=t.TextDocumentSaveReason||(t.TextDocumentSaveReason={})).Manual=1,Q.AfterDelay=2,Q.FocusOut=3,(G=t.WillSaveTextDocumentNotification||(t.WillSaveTextDocumentNotification={})).method="textDocument/willSave",G.type=new i.ProtocolNotificationType(G.method),(W=t.WillSaveTextDocumentWaitUntilRequest||(t.WillSaveTextDocumentWaitUntilRequest={})).method="textDocument/willSaveWaitUntil",W.type=new i.ProtocolRequestType(W.method),(t.DidChangeWatchedFilesNotification||(t.DidChangeWatchedFilesNotification={})).type=new i.ProtocolNotificationType("workspace/didChangeWatchedFiles"),(K=t.FileChangeType||(t.FileChangeType={})).Created=1,K.Changed=2,K.Deleted=3,(z=t.WatchKind||(t.WatchKind={})).Create=1,z.Change=2,z.Delete=4,(t.PublishDiagnosticsNotification||(t.PublishDiagnosticsNotification={})).type=new i.ProtocolNotificationType("textDocument/publishDiagnostics"),(V=t.CompletionTriggerKind||(t.CompletionTriggerKind={})).Invoked=1,V.TriggerCharacter=2,V.TriggerForIncompleteCompletions=3,(H=t.CompletionRequest||(t.CompletionRequest={})).method="textDocument/completion",H.type=new i.ProtocolRequestType(H.method),(q=t.CompletionResolveRequest||(t.CompletionResolveRequest={})).method="completionItem/resolve",q.type=new i.ProtocolRequestType(q.method),($=t.HoverRequest||(t.HoverRequest={})).method="textDocument/hover",$.type=new i.ProtocolRequestType($.method),(U=t.SignatureHelpTriggerKind||(t.SignatureHelpTriggerKind={})).Invoked=1,U.TriggerCharacter=2,U.ContentChange=3,(j=t.SignatureHelpRequest||(t.SignatureHelpRequest={})).method="textDocument/signatureHelp",j.type=new i.ProtocolRequestType(j.method),(F=t.DefinitionRequest||(t.DefinitionRequest={})).method="textDocument/definition",F.type=new i.ProtocolRequestType(F.method),(B=t.ReferencesRequest||(t.ReferencesRequest={})).method="textDocument/references",B.type=new i.ProtocolRequestType(B.method),(M=t.DocumentHighlightRequest||(t.DocumentHighlightRequest={})).method="textDocument/documentHighlight",M.type=new i.ProtocolRequestType(M.method),(D=t.DocumentSymbolRequest||(t.DocumentSymbolRequest={})).method="textDocument/documentSymbol",D.type=new i.ProtocolRequestType(D.method),(L=t.CodeActionRequest||(t.CodeActionRequest={})).method="textDocument/codeAction",L.type=new i.ProtocolRequestType(L.method),(O=t.CodeActionResolveRequest||(t.CodeActionResolveRequest={})).method="codeAction/resolve",O.type=new i.ProtocolRequestType(O.method),(N=t.WorkspaceSymbolRequest||(t.WorkspaceSymbolRequest={})).method="workspace/symbol",N.type=new i.ProtocolRequestType(N.method),(R=t.CodeLensRequest||(t.CodeLensRequest={})).method="textDocument/codeLens",R.type=new i.ProtocolRequestType(R.method),(P=t.CodeLensResolveRequest||(t.CodeLensResolveRequest={})).method="codeLens/resolve",P.type=new i.ProtocolRequestType(P.method),(A=t.CodeLensRefreshRequest||(t.CodeLensRefreshRequest={})).method="workspace/codeLens/refresh",A.type=new i.ProtocolRequestType0(A.method),(I=t.DocumentLinkRequest||(t.DocumentLinkRequest={})).method="textDocument/documentLink",I.type=new i.ProtocolRequestType(I.method),(k=t.DocumentLinkResolveRequest||(t.DocumentLinkResolveRequest={})).method="documentLink/resolve",k.type=new i.ProtocolRequestType(k.method),(x=t.DocumentFormattingRequest||(t.DocumentFormattingRequest={})).method="textDocument/formatting",x.type=new i.ProtocolRequestType(x.method),(S=t.DocumentRangeFormattingRequest||(t.DocumentRangeFormattingRequest={})).method="textDocument/rangeFormatting",S.type=new i.ProtocolRequestType(S.method),(T=t.DocumentOnTypeFormattingRequest||(t.DocumentOnTypeFormattingRequest={})).method="textDocument/onTypeFormatting",T.type=new i.ProtocolRequestType(T.method),(t.PrepareSupportDefaultBehavior||(t.PrepareSupportDefaultBehavior={})).Identifier=1,(E=t.RenameRequest||(t.RenameRequest={})).method="textDocument/rename",E.type=new i.ProtocolRequestType(E.method),(C=t.PrepareRenameRequest||(t.PrepareRenameRequest={})).method="textDocument/prepareRename",C.type=new i.ProtocolRequestType(C.method),(t.ExecuteCommandRequest||(t.ExecuteCommandRequest={})).type=new i.ProtocolRequestType("workspace/executeCommand"),(t.ApplyWorkspaceEditRequest||(t.ApplyWorkspaceEditRequest={})).type=new i.ProtocolRequestType("workspace/applyEdit")},26305:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeRequest=void 0;const n=r(66140);var i;(i=t.LinkedEditingRangeRequest||(t.LinkedEditingRangeRequest={})).method="textDocument/linkedEditingRange",i.type=new n.ProtocolRequestType(i.method)},73443:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=void 0;const n=r(66140);var i,o,s;(s=t.UniquenessLevel||(t.UniquenessLevel={})).document="document",s.project="project",s.group="group",s.scheme="scheme",s.global="global",(o=t.MonikerKind||(t.MonikerKind={})).import="import",o.export="export",o.local="local",(i=t.MonikerRequest||(t.MonikerRequest={})).method="textDocument/moniker",i.type=new n.ProtocolRequestType(i.method)},21862:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=void 0;const n=r(74389),i=r(66140);var o;(o=t.WorkDoneProgress||(t.WorkDoneProgress={})).type=new n.ProgressType,o.is=function(e){return e===o.type},(t.WorkDoneProgressCreateRequest||(t.WorkDoneProgressCreateRequest={})).type=new i.ProtocolRequestType("window/workDoneProgress/create"),(t.WorkDoneProgressCancelNotification||(t.WorkDoneProgressCancelNotification={})).type=new i.ProtocolNotificationType("window/workDoneProgress/cancel")},5206:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeRequest=void 0;const n=r(66140);var i;(i=t.SelectionRangeRequest||(t.SelectionRangeRequest={})).method="textDocument/selectionRange",i.type=new n.ProtocolRequestType(i.method)},39434:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.SemanticTokensRegistrationType=t.TokenFormat=t.SemanticTokens=t.SemanticTokenModifiers=t.SemanticTokenTypes=void 0;const n=r(66140);var i,o,s,a,c,l,u;(u=t.SemanticTokenTypes||(t.SemanticTokenTypes={})).namespace="namespace",u.type="type",u.class="class",u.enum="enum",u.interface="interface",u.struct="struct",u.typeParameter="typeParameter",u.parameter="parameter",u.variable="variable",u.property="property",u.enumMember="enumMember",u.event="event",u.function="function",u.method="method",u.macro="macro",u.keyword="keyword",u.modifier="modifier",u.comment="comment",u.string="string",u.number="number",u.regexp="regexp",u.operator="operator",(l=t.SemanticTokenModifiers||(t.SemanticTokenModifiers={})).declaration="declaration",l.definition="definition",l.readonly="readonly",l.static="static",l.deprecated="deprecated",l.abstract="abstract",l.async="async",l.modification="modification",l.documentation="documentation",l.defaultLibrary="defaultLibrary",(t.SemanticTokens||(t.SemanticTokens={})).is=function(e){const t=e;return void 0!==t&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])},(t.TokenFormat||(t.TokenFormat={})).Relative="relative",(c=t.SemanticTokensRegistrationType||(t.SemanticTokensRegistrationType={})).method="textDocument/semanticTokens",c.type=new n.RegistrationType(c.method),(a=t.SemanticTokensRequest||(t.SemanticTokensRequest={})).method="textDocument/semanticTokens/full",a.type=new n.ProtocolRequestType(a.method),(s=t.SemanticTokensDeltaRequest||(t.SemanticTokensDeltaRequest={})).method="textDocument/semanticTokens/full/delta",s.type=new n.ProtocolRequestType(s.method),(o=t.SemanticTokensRangeRequest||(t.SemanticTokensRangeRequest={})).method="textDocument/semanticTokens/range",o.type=new n.ProtocolRequestType(o.method),(i=t.SemanticTokensRefreshRequest||(t.SemanticTokensRefreshRequest={})).method="workspace/semanticTokens/refresh",i.type=new n.ProtocolRequestType0(i.method)},75726:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentRequest=void 0;const n=r(66140);var i;(i=t.ShowDocumentRequest||(t.ShowDocumentRequest={})).method="window/showDocument",i.type=new n.ProtocolRequestType(i.method)},71589:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDefinitionRequest=void 0;const n=r(66140);var i;(i=t.TypeDefinitionRequest||(t.TypeDefinitionRequest={})).method="textDocument/typeDefinition",i.type=new n.ProtocolRequestType(i.method)},79795:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=void 0;const n=r(66140);(t.WorkspaceFoldersRequest||(t.WorkspaceFoldersRequest={})).type=new n.ProtocolRequestType0("workspace/workspaceFolders"),(t.DidChangeWorkspaceFoldersNotification||(t.DidChangeWorkspaceFoldersNotification={})).type=new n.ProtocolNotificationType("workspace/didChangeWorkspaceFolders")},69533:(e,t)=>{"use strict";function r(e){return"string"==typeof e||e instanceof String}function n(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.objectLiteral=t.typedArray=t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=r,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=n,t.stringArray=function(e){return n(e)&&e.every((e=>r(e)))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.objectLiteral=function(e){return null!==e&&"object"==typeof e}},40273:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const o=r(95028);i(r(95028),t),i(r(51661),t),t.createProtocolConnection=function(e,t,r,n){return o.createMessageConnection(e,t,r,n)}},96560:(e,t,r)=>{"use strict";e.exports=r(40273)},96813:(e,t,r)=>{"use strict";r.r(t),r.d(t,{TextDocument:()=>n});var n,i=function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;ie?n=i:r=i+1}var o=r-1;return{line:o,character:e-t[o]}},e.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var r=t[e.line],n=e.line+1r.line||t.line===r.line&&t.character>r.character?{start:r,end:t}:e}function l(e){var t=c(e.range);return t!==e.range?{newText:e.newText,range:t}:e}!function(e){e.create=function(e,t,r,n){return new o(e,t,r,n)},e.update=function(e,t,r){if(e instanceof o)return e.update(t,r),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")},e.applyEdits=function(e,t){for(var r=e.getText(),n=0,i=[],o=0,a=s(t.map(l),(function(e,t){var r=e.range.start.line-t.range.start.line;return 0===r?e.range.start.character-t.range.start.character:r}));on&&i.push(r.substring(n,u)),c.newText.length&&i.push(c.newText),n=e.offsetAt(c.range.end)}return i.push(r.substr(n)),i.join("")}}(n||(n={}))},91674:(e,t,r)=>{"use strict";var n,i,o,s,a,c,l,u,d,p,h,f,g,m,y,v,_,b,w,C,E,T,S,x,k,I;r.r(t),r.d(t,{integer:()=>n,uinteger:()=>i,Position:()=>o,Range:()=>s,Location:()=>a,LocationLink:()=>c,Color:()=>l,ColorInformation:()=>u,ColorPresentation:()=>d,FoldingRangeKind:()=>p,FoldingRange:()=>h,DiagnosticRelatedInformation:()=>f,DiagnosticSeverity:()=>g,DiagnosticTag:()=>m,CodeDescription:()=>y,Diagnostic:()=>v,Command:()=>_,TextEdit:()=>b,ChangeAnnotation:()=>w,ChangeAnnotationIdentifier:()=>C,AnnotatedTextEdit:()=>E,TextDocumentEdit:()=>T,CreateFile:()=>S,RenameFile:()=>x,DeleteFile:()=>k,WorkspaceEdit:()=>I,WorkspaceChange:()=>ae,TextDocumentIdentifier:()=>A,VersionedTextDocumentIdentifier:()=>P,OptionalVersionedTextDocumentIdentifier:()=>R,TextDocumentItem:()=>N,MarkupKind:()=>O,MarkupContent:()=>L,CompletionItemKind:()=>D,InsertTextFormat:()=>M,CompletionItemTag:()=>B,InsertReplaceEdit:()=>F,InsertTextMode:()=>j,CompletionItem:()=>U,CompletionList:()=>$,MarkedString:()=>q,Hover:()=>H,ParameterInformation:()=>V,SignatureInformation:()=>z,DocumentHighlightKind:()=>K,DocumentHighlight:()=>W,SymbolKind:()=>G,SymbolTag:()=>Q,SymbolInformation:()=>J,DocumentSymbol:()=>Y,CodeActionKind:()=>X,CodeActionContext:()=>Z,CodeAction:()=>ee,CodeLens:()=>te,FormattingOptions:()=>re,DocumentLink:()=>ne,SelectionRange:()=>ie,EOL:()=>le,TextDocument:()=>ce}),function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647}(n||(n={})),function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647}(i||(i={})),function(e){e.create=function(e,t){return e===Number.MAX_VALUE&&(e=i.MAX_VALUE),t===Number.MAX_VALUE&&(t=i.MAX_VALUE),{line:e,character:t}},e.is=function(e){var t=e;return ue.objectLiteral(t)&&ue.uinteger(t.line)&&ue.uinteger(t.character)}}(o||(o={})),function(e){e.create=function(e,t,r,n){if(ue.uinteger(e)&&ue.uinteger(t)&&ue.uinteger(r)&&ue.uinteger(n))return{start:o.create(e,t),end:o.create(r,n)};if(o.is(e)&&o.is(t))return{start:e,end:t};throw new Error("Range#create called with invalid arguments["+e+", "+t+", "+r+", "+n+"]")},e.is=function(e){var t=e;return ue.objectLiteral(t)&&o.is(t.start)&&o.is(t.end)}}(s||(s={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){var t=e;return ue.defined(t)&&s.is(t.range)&&(ue.string(t.uri)||ue.undefined(t.uri))}}(a||(a={})),function(e){e.create=function(e,t,r,n){return{targetUri:e,targetRange:t,targetSelectionRange:r,originSelectionRange:n}},e.is=function(e){var t=e;return ue.defined(t)&&s.is(t.targetRange)&&ue.string(t.targetUri)&&(s.is(t.targetSelectionRange)||ue.undefined(t.targetSelectionRange))&&(s.is(t.originSelectionRange)||ue.undefined(t.originSelectionRange))}}(c||(c={})),function(e){e.create=function(e,t,r,n){return{red:e,green:t,blue:r,alpha:n}},e.is=function(e){var t=e;return ue.numberRange(t.red,0,1)&&ue.numberRange(t.green,0,1)&&ue.numberRange(t.blue,0,1)&&ue.numberRange(t.alpha,0,1)}}(l||(l={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){var t=e;return s.is(t.range)&&l.is(t.color)}}(u||(u={})),function(e){e.create=function(e,t,r){return{label:e,textEdit:t,additionalTextEdits:r}},e.is=function(e){var t=e;return ue.string(t.label)&&(ue.undefined(t.textEdit)||b.is(t))&&(ue.undefined(t.additionalTextEdits)||ue.typedArray(t.additionalTextEdits,b.is))}}(d||(d={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(p||(p={})),function(e){e.create=function(e,t,r,n,i){var o={startLine:e,endLine:t};return ue.defined(r)&&(o.startCharacter=r),ue.defined(n)&&(o.endCharacter=n),ue.defined(i)&&(o.kind=i),o},e.is=function(e){var t=e;return ue.uinteger(t.startLine)&&ue.uinteger(t.startLine)&&(ue.undefined(t.startCharacter)||ue.uinteger(t.startCharacter))&&(ue.undefined(t.endCharacter)||ue.uinteger(t.endCharacter))&&(ue.undefined(t.kind)||ue.string(t.kind))}}(h||(h={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){var t=e;return ue.defined(t)&&a.is(t.location)&&ue.string(t.message)}}(f||(f={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(g||(g={})),function(e){e.Unnecessary=1,e.Deprecated=2}(m||(m={})),function(e){e.is=function(e){var t=e;return null!=t&&ue.string(t.href)}}(y||(y={})),function(e){e.create=function(e,t,r,n,i,o){var s={range:e,message:t};return ue.defined(r)&&(s.severity=r),ue.defined(n)&&(s.code=n),ue.defined(i)&&(s.source=i),ue.defined(o)&&(s.relatedInformation=o),s},e.is=function(e){var t,r=e;return ue.defined(r)&&s.is(r.range)&&ue.string(r.message)&&(ue.number(r.severity)||ue.undefined(r.severity))&&(ue.integer(r.code)||ue.string(r.code)||ue.undefined(r.code))&&(ue.undefined(r.codeDescription)||ue.string(null===(t=r.codeDescription)||void 0===t?void 0:t.href))&&(ue.string(r.source)||ue.undefined(r.source))&&(ue.undefined(r.relatedInformation)||ue.typedArray(r.relatedInformation,f.is))}}(v||(v={})),function(e){e.create=function(e,t){for(var r=[],n=2;n0&&(i.arguments=r),i},e.is=function(e){var t=e;return ue.defined(t)&&ue.string(t.title)&&ue.string(t.command)}}(_||(_={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){var t=e;return ue.objectLiteral(t)&&ue.string(t.newText)&&s.is(t.range)}}(b||(b={})),function(e){e.create=function(e,t,r){var n={label:e};return void 0!==t&&(n.needsConfirmation=t),void 0!==r&&(n.description=r),n},e.is=function(e){var t=e;return void 0!==t&&ue.objectLiteral(t)&&ue.string(t.label)&&(ue.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(ue.string(t.description)||void 0===t.description)}}(w||(w={})),function(e){e.is=function(e){return"string"==typeof e}}(C||(C={})),function(e){e.replace=function(e,t,r){return{range:e,newText:t,annotationId:r}},e.insert=function(e,t,r){return{range:{start:e,end:e},newText:t,annotationId:r}},e.del=function(e,t){return{range:e,newText:"",annotationId:t}},e.is=function(e){var t=e;return b.is(t)&&(w.is(t.annotationId)||C.is(t.annotationId))}}(E||(E={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){var t=e;return ue.defined(t)&&R.is(t.textDocument)&&Array.isArray(t.edits)}}(T||(T={})),function(e){e.create=function(e,t,r){var n={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(n.options=t),void 0!==r&&(n.annotationId=r),n},e.is=function(e){var t=e;return t&&"create"===t.kind&&ue.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||ue.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||ue.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||C.is(t.annotationId))}}(S||(S={})),function(e){e.create=function(e,t,r,n){var i={kind:"rename",oldUri:e,newUri:t};return void 0===r||void 0===r.overwrite&&void 0===r.ignoreIfExists||(i.options=r),void 0!==n&&(i.annotationId=n),i},e.is=function(e){var t=e;return t&&"rename"===t.kind&&ue.string(t.oldUri)&&ue.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||ue.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||ue.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||C.is(t.annotationId))}}(x||(x={})),function(e){e.create=function(e,t,r){var n={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(n.options=t),void 0!==r&&(n.annotationId=r),n},e.is=function(e){var t=e;return t&&"delete"===t.kind&&ue.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||ue.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||ue.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||C.is(t.annotationId))}}(k||(k={})),function(e){e.is=function(e){var t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((function(e){return ue.string(e.kind)?S.is(e)||x.is(e)||k.is(e):T.is(e)})))}}(I||(I={}));var A,P,R,N,O,L,D,M,B,F,j,U,$,q,H,V,z,K,W,G,Q,J,Y,X,Z,ee,te,re,ne,ie,oe=function(){function e(e,t){this.edits=e,this.changeAnnotations=t}return e.prototype.insert=function(e,t,r){var n,i;if(void 0===r?n=b.insert(e,t):C.is(r)?(i=r,n=E.insert(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),n=E.insert(e,t,i)),this.edits.push(n),void 0!==i)return i},e.prototype.replace=function(e,t,r){var n,i;if(void 0===r?n=b.replace(e,t):C.is(r)?(i=r,n=E.replace(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),n=E.replace(e,t,i)),this.edits.push(n),void 0!==i)return i},e.prototype.delete=function(e,t){var r,n;if(void 0===t?r=b.del(e):C.is(t)?(n=t,r=E.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(t),r=E.del(e,n)),this.edits.push(r),void 0!==n)return n},e.prototype.add=function(e){this.edits.push(e)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e.prototype.assertChangeAnnotations=function(e){if(void 0===e)throw new Error("Text edit change is not configured to manage change annotations.")},e}(),se=function(){function e(e){this._annotations=void 0===e?Object.create(null):e,this._counter=0,this._size=0}return e.prototype.all=function(){return this._annotations},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.manage=function(e,t){var r;if(C.is(e)?r=e:(r=this.nextId(),t=e),void 0!==this._annotations[r])throw new Error("Id "+r+" is already in use.");if(void 0===t)throw new Error("No annotation provided for id "+r);return this._annotations[r]=t,this._size++,r},e.prototype.nextId=function(){return this._counter++,this._counter.toString()},e}(),ae=function(){function e(e){var t=this;this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new se(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach((function(e){if(T.is(e)){var r=new oe(e.edits,t._changeAnnotations);t._textEditChanges[e.textDocument.uri]=r}}))):e.changes&&Object.keys(e.changes).forEach((function(r){var n=new oe(e.changes[r]);t._textEditChanges[r]=n}))):this._workspaceEdit={}}return Object.defineProperty(e.prototype,"edit",{get:function(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),e.prototype.getTextEditChange=function(e){if(R.is(e)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var t={uri:e.uri,version:e.version};if(!(n=this._textEditChanges[t.uri])){var r={textDocument:t,edits:i=[]};this._workspaceEdit.documentChanges.push(r),n=new oe(i,this._changeAnnotations),this._textEditChanges[t.uri]=n}return n}if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var n;if(!(n=this._textEditChanges[e])){var i=[];this._workspaceEdit.changes[e]=i,n=new oe(i),this._textEditChanges[e]=n}return n},e.prototype.initDocumentChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new se,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},e.prototype.initChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))},e.prototype.createFile=function(e,t,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var n,i,o;if(w.is(t)||C.is(t)?n=t:r=t,void 0===n?i=S.create(e,r):(o=C.is(n)?n:this._changeAnnotations.manage(n),i=S.create(e,r,o)),this._workspaceEdit.documentChanges.push(i),void 0!==o)return o},e.prototype.renameFile=function(e,t,r,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var i,o,s;if(w.is(r)||C.is(r)?i=r:n=r,void 0===i?o=x.create(e,t,n):(s=C.is(i)?i:this._changeAnnotations.manage(i),o=x.create(e,t,n,s)),this._workspaceEdit.documentChanges.push(o),void 0!==s)return s},e.prototype.deleteFile=function(e,t,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var n,i,o;if(w.is(t)||C.is(t)?n=t:r=t,void 0===n?i=k.create(e,r):(o=C.is(n)?n:this._changeAnnotations.manage(n),i=k.create(e,r,o)),this._workspaceEdit.documentChanges.push(i),void 0!==o)return o},e}();!function(e){e.create=function(e){return{uri:e}},e.is=function(e){var t=e;return ue.defined(t)&&ue.string(t.uri)}}(A||(A={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return ue.defined(t)&&ue.string(t.uri)&&ue.integer(t.version)}}(P||(P={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return ue.defined(t)&&ue.string(t.uri)&&(null===t.version||ue.integer(t.version))}}(R||(R={})),function(e){e.create=function(e,t,r,n){return{uri:e,languageId:t,version:r,text:n}},e.is=function(e){var t=e;return ue.defined(t)&&ue.string(t.uri)&&ue.string(t.languageId)&&ue.integer(t.version)&&ue.string(t.text)}}(N||(N={})),function(e){e.PlainText="plaintext",e.Markdown="markdown"}(O||(O={})),function(e){e.is=function(t){var r=t;return r===e.PlainText||r===e.Markdown}}(O||(O={})),function(e){e.is=function(e){var t=e;return ue.objectLiteral(e)&&O.is(t.kind)&&ue.string(t.value)}}(L||(L={})),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}(D||(D={})),function(e){e.PlainText=1,e.Snippet=2}(M||(M={})),function(e){e.Deprecated=1}(B||(B={})),function(e){e.create=function(e,t,r){return{newText:e,insert:t,replace:r}},e.is=function(e){var t=e;return t&&ue.string(t.newText)&&s.is(t.insert)&&s.is(t.replace)}}(F||(F={})),function(e){e.asIs=1,e.adjustIndentation=2}(j||(j={})),function(e){e.create=function(e){return{label:e}}}(U||(U={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}($||($={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){var t=e;return ue.string(t)||ue.objectLiteral(t)&&ue.string(t.language)&&ue.string(t.value)}}(q||(q={})),function(e){e.is=function(e){var t=e;return!!t&&ue.objectLiteral(t)&&(L.is(t.contents)||q.is(t.contents)||ue.typedArray(t.contents,q.is))&&(void 0===e.range||s.is(e.range))}}(H||(H={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(V||(V={})),function(e){e.create=function(e,t){for(var r=[],n=2;n=0;s--){var a=i[s],c=e.offsetAt(a.range.start),l=e.offsetAt(a.range.end);if(!(l<=o))throw new Error("Overlapping edit");n=n.substring(0,c)+a.newText+n.substring(l,n.length),o=c}return n}}(ce||(ce={}));var ue,de=function(){function e(e,t,r,n){this._uri=e,this._languageId=t,this._version=r,this._content=n,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),e.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(t,r)}return this._content},e.prototype.update=function(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0},e.prototype.getLineOffsets=function(){if(void 0===this._lineOffsets){for(var e=[],t=this._content,r=!0,n=0;n0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},e.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),r=0,n=t.length;if(0===n)return o.create(0,e);for(;re?n=i:r=i+1}var s=r-1;return o.create(s,e-t[s])},e.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var r=t[e.line],n=e.line+1{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyFeature=void 0;const n=r(40273);t.CallHierarchyFeature=e=>class extends e{get callHierarchy(){return{onPrepare:e=>{this.connection.onRequest(n.CallHierarchyPrepareRequest.type,((t,r)=>e(t,r,this.attachWorkDoneProgress(t),void 0)))},onIncomingCalls:e=>{const t=n.CallHierarchyIncomingCallsRequest.type;this.connection.onRequest(t,((r,n)=>e(r,n,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(t,r))))},onOutgoingCalls:e=>{const t=n.CallHierarchyOutgoingCallsRequest.type;this.connection.onRequest(t,((r,n)=>e(r,n,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(t,r))))}}}}},52507:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationFeature=void 0;const n=r(40273),i=r(40289);t.ConfigurationFeature=e=>class extends e{getConfiguration(e){return e?i.string(e)?this._getConfiguration({section:e}):this._getConfiguration(e):this._getConfiguration({})}_getConfiguration(e){let t={items:Array.isArray(e)?e:[e]};return this.connection.sendRequest(n.ConfigurationRequest.type,t).then((t=>Array.isArray(e)?t:t[0]))}}},50828:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileOperationsFeature=void 0;const n=r(40273);t.FileOperationsFeature=e=>class extends e{onDidCreateFiles(e){this.connection.onNotification(n.DidCreateFilesNotification.type,(t=>{e(t)}))}onDidRenameFiles(e){this.connection.onNotification(n.DidRenameFilesNotification.type,(t=>{e(t)}))}onDidDeleteFiles(e){this.connection.onNotification(n.DidDeleteFilesNotification.type,(t=>{e(t)}))}onWillCreateFiles(e){return this.connection.onRequest(n.WillCreateFilesRequest.type,((t,r)=>e(t,r)))}onWillRenameFiles(e){return this.connection.onRequest(n.WillRenameFilesRequest.type,((t,r)=>e(t,r)))}onWillDeleteFiles(e){return this.connection.onRequest(n.WillDeleteFilesRequest.type,((t,r)=>e(t,r)))}}},22776:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeFeature=void 0;const n=r(40273);t.LinkedEditingRangeFeature=e=>class extends e{onLinkedEditingRange(e){this.connection.onRequest(n.LinkedEditingRangeRequest.type,((t,r)=>e(t,r,this.attachWorkDoneProgress(t),void 0)))}}},8120:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerFeature=void 0;const n=r(40273);t.MonikerFeature=e=>class extends e{get moniker(){return{on:e=>{const t=n.MonikerRequest.type;this.connection.onRequest(t,((r,n)=>e(r,n,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(t,r))))}}}}},42731:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.attachPartialResult=t.ProgressFeature=t.attachWorkDone=void 0;const n=r(40273),i=r(37560);class o{constructor(e,t){this._connection=e,this._token=t,o.Instances.set(this._token,this)}begin(e,t,r,i){let o={kind:"begin",title:e,percentage:t,message:r,cancellable:i};this._connection.sendProgress(n.WorkDoneProgress.type,this._token,o)}report(e,t){let r={kind:"report"};"number"==typeof e?(r.percentage=e,void 0!==t&&(r.message=t)):r.message=e,this._connection.sendProgress(n.WorkDoneProgress.type,this._token,r)}done(){o.Instances.delete(this._token),this._connection.sendProgress(n.WorkDoneProgress.type,this._token,{kind:"end"})}}o.Instances=new Map;class s extends o{constructor(e,t){super(e,t),this._source=new n.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}}class a{constructor(){}begin(){}report(){}done(){}}class c extends a{constructor(){super(),this._source=new n.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}}var l;t.attachWorkDone=function(e,t){if(void 0===t||void 0===t.workDoneToken)return new a;const r=t.workDoneToken;return delete t.workDoneToken,new o(e,r)},t.ProgressFeature=e=>class extends e{constructor(){super(),this._progressSupported=!1}initialize(e){var t;!0===(null===(t=null==e?void 0:e.window)||void 0===t?void 0:t.workDoneProgress)&&(this._progressSupported=!0,this.connection.onNotification(n.WorkDoneProgressCancelNotification.type,(e=>{let t=o.Instances.get(e.token);(t instanceof s||t instanceof c)&&t.cancel()})))}attachWorkDoneProgress(e){return void 0===e?new a:new o(this.connection,e)}createWorkDoneProgress(){if(this._progressSupported){const e=i.generateUuid();return this.connection.sendRequest(n.WorkDoneProgressCreateRequest.type,{token:e}).then((()=>new s(this.connection,e)))}return Promise.resolve(new c)}},function(e){e.type=new n.ProgressType}(l||(l={}));class u{constructor(e,t){this._connection=e,this._token=t}report(e){this._connection.sendProgress(l.type,this._token,e)}}t.attachPartialResult=function(e,t){if(void 0===t||void 0===t.partialResultToken)return;const r=t.partialResultToken;return delete t.partialResultToken,new u(e,r)}},59817:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensBuilder=t.SemanticTokensFeature=void 0;const n=r(40273);t.SemanticTokensFeature=e=>class extends e{get semanticTokens(){return{on:e=>{const t=n.SemanticTokensRequest.type;this.connection.onRequest(t,((r,n)=>e(r,n,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(t,r))))},onDelta:e=>{const t=n.SemanticTokensDeltaRequest.type;this.connection.onRequest(t,((r,n)=>e(r,n,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(t,r))))},onRange:e=>{const t=n.SemanticTokensRangeRequest.type;this.connection.onRequest(t,((r,n)=>e(r,n,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(t,r))))}}}},t.SemanticTokensBuilder=class{constructor(){this._prevData=void 0,this.initialize()}initialize(){this._id=Date.now(),this._prevLine=0,this._prevChar=0,this._data=[],this._dataLen=0}push(e,t,r,n,i){let o=e,s=t;this._dataLen>0&&(o-=this._prevLine,0===o&&(s-=this._prevChar)),this._data[this._dataLen++]=o,this._data[this._dataLen++]=s,this._data[this._dataLen++]=r,this._data[this._dataLen++]=n,this._data[this._dataLen++]=i,this._prevLine=e,this._prevChar=t}get id(){return this._id.toString()}previousResult(e){this.id===e&&(this._prevData=this._data),this.initialize()}build(){return this._prevData=void 0,{resultId:this.id,data:this._data}}canBuildEdits(){return void 0!==this._prevData}buildEdits(){if(void 0!==this._prevData){const e=this._prevData.length,t=this._data.length;let r=0;for(;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createConnection=t.combineFeatures=t.combineLanguagesFeatures=t.combineWorkspaceFeatures=t.combineWindowFeatures=t.combineClientFeatures=t.combineTracerFeatures=t.combineTelemetryFeatures=t.combineConsoleFeatures=t._LanguagesImpl=t.BulkUnregistration=t.BulkRegistration=t.ErrorMessageTracker=t.TextDocuments=void 0;const n=r(40273),i=r(40289),o=r(37560),s=r(42731),a=r(52507),c=r(28634),l=r(47985),u=r(59817),d=r(85421),p=r(50828),h=r(22776),f=r(8120);function g(e){if(null!==e)return e}t.TextDocuments=class{constructor(e){this._documents=Object.create(null),this._configuration=e,this._onDidChangeContent=new n.Emitter,this._onDidOpen=new n.Emitter,this._onDidClose=new n.Emitter,this._onDidSave=new n.Emitter,this._onWillSave=new n.Emitter}get onDidChangeContent(){return this._onDidChangeContent.event}get onDidOpen(){return this._onDidOpen.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(e){this._willSaveWaitUntil=e}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(e){return this._documents[e]}all(){return Object.keys(this._documents).map((e=>this._documents[e]))}keys(){return Object.keys(this._documents)}listen(e){e.__textDocumentSync=n.TextDocumentSyncKind.Full,e.onDidOpenTextDocument((e=>{let t=e.textDocument,r=this._configuration.create(t.uri,t.languageId,t.version,t.text);this._documents[t.uri]=r;let n=Object.freeze({document:r});this._onDidOpen.fire(n),this._onDidChangeContent.fire(n)})),e.onDidChangeTextDocument((e=>{let t=e.textDocument,r=e.contentChanges;if(0===r.length)return;let n=this._documents[t.uri];const{version:i}=t;if(null==i)throw new Error(`Received document change event for ${t.uri} without valid version identifier`);n=this._configuration.update(n,r,i),this._documents[t.uri]=n,this._onDidChangeContent.fire(Object.freeze({document:n}))})),e.onDidCloseTextDocument((e=>{let t=this._documents[e.textDocument.uri];t&&(delete this._documents[e.textDocument.uri],this._onDidClose.fire(Object.freeze({document:t})))})),e.onWillSaveTextDocument((e=>{let t=this._documents[e.textDocument.uri];t&&this._onWillSave.fire(Object.freeze({document:t,reason:e.reason}))})),e.onWillSaveTextDocumentWaitUntil(((e,t)=>{let r=this._documents[e.textDocument.uri];return r&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:r,reason:e.reason}),t):[]})),e.onDidSaveTextDocument((e=>{let t=this._documents[e.textDocument.uri];t&&this._onDidSave.fire(Object.freeze({document:t}))}))}},t.ErrorMessageTracker=class{constructor(){this._messages=Object.create(null)}add(e){let t=this._messages[e];t||(t=0),t++,this._messages[e]=t}sendErrors(e){Object.keys(this._messages).forEach((t=>{e.window.showErrorMessage(t)}))}};class m{constructor(){}rawAttach(e){this._rawConnection=e}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(e){}initialize(e){}error(e){this.send(n.MessageType.Error,e)}warn(e){this.send(n.MessageType.Warning,e)}info(e){this.send(n.MessageType.Info,e)}log(e){this.send(n.MessageType.Log,e)}send(e,t){this._rawConnection&&this._rawConnection.sendNotification(n.LogMessageNotification.type,{type:e,message:t})}}const y=d.ShowDocumentFeature(s.ProgressFeature(class{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}showErrorMessage(e,...t){let r={type:n.MessageType.Error,message:e,actions:t};return this.connection.sendRequest(n.ShowMessageRequest.type,r).then(g)}showWarningMessage(e,...t){let r={type:n.MessageType.Warning,message:e,actions:t};return this.connection.sendRequest(n.ShowMessageRequest.type,r).then(g)}showInformationMessage(e,...t){let r={type:n.MessageType.Info,message:e,actions:t};return this.connection.sendRequest(n.ShowMessageRequest.type,r).then(g)}}));(t.BulkRegistration||(t.BulkRegistration={})).create=function(){return new v};class v{constructor(){this._registrations=[],this._registered=new Set}add(e,t){const r=i.string(e)?e:e.method;if(this._registered.has(r))throw new Error(`${r} is already added to this registration`);const n=o.generateUuid();this._registrations.push({id:n,method:r,registerOptions:t||{}}),this._registered.add(r)}asRegistrationParams(){return{registrations:this._registrations}}}(t.BulkUnregistration||(t.BulkUnregistration={})).create=function(){return new _(void 0,[])};class _{constructor(e,t){this._connection=e,this._unregistrations=new Map,t.forEach((e=>{this._unregistrations.set(e.method,e)}))}get isAttached(){return!!this._connection}attach(e){this._connection=e}add(e){this._unregistrations.set(e.method,e)}dispose(){let e=[];for(let t of this._unregistrations.values())e.push(t);let t={unregisterations:e};this._connection.sendRequest(n.UnregistrationRequest.type,t).then(void 0,(e=>{this._connection.console.info("Bulk unregistration failed.")}))}disposeSingle(e){const t=i.string(e)?e:e.method,r=this._unregistrations.get(t);if(!r)return!1;let o={unregisterations:[r]};return this._connection.sendRequest(n.UnregistrationRequest.type,o).then((()=>{this._unregistrations.delete(t)}),(e=>{this._connection.console.info(`Un-registering request handler for ${r.id} failed.`)})),!0}}class b{attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}register(e,t,r){return e instanceof v?this.registerMany(e):e instanceof _?this.registerSingle1(e,t,r):this.registerSingle2(e,t)}registerSingle1(e,t,r){const s=i.string(t)?t:t.method,a=o.generateUuid();let c={registrations:[{id:a,method:s,registerOptions:r||{}}]};return e.isAttached||e.attach(this.connection),this.connection.sendRequest(n.RegistrationRequest.type,c).then((t=>(e.add({id:a,method:s}),e)),(e=>(this.connection.console.info(`Registering request handler for ${s} failed.`),Promise.reject(e))))}registerSingle2(e,t){const r=i.string(e)?e:e.method,s=o.generateUuid();let a={registrations:[{id:s,method:r,registerOptions:t||{}}]};return this.connection.sendRequest(n.RegistrationRequest.type,a).then((e=>n.Disposable.create((()=>{this.unregisterSingle(s,r)}))),(e=>(this.connection.console.info(`Registering request handler for ${r} failed.`),Promise.reject(e))))}unregisterSingle(e,t){let r={unregisterations:[{id:e,method:t}]};return this.connection.sendRequest(n.UnregistrationRequest.type,r).then(void 0,(t=>{this.connection.console.info(`Un-registering request handler for ${e} failed.`)}))}registerMany(e){let t=e.asRegistrationParams();return this.connection.sendRequest(n.RegistrationRequest.type,t).then((()=>new _(this._connection,t.registrations.map((e=>({id:e.id,method:e.method}))))),(e=>(this.connection.console.info("Bulk registration failed."),Promise.reject(e))))}}const w=p.FileOperationsFeature(c.WorkspaceFoldersFeature(a.ConfigurationFeature(class{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}applyEdit(e){let t=(r=e)&&r.edit?e:{edit:e};var r;return this.connection.sendRequest(n.ApplyWorkspaceEditRequest.type,t)}})));class C{constructor(){this._trace=n.Trace.Off}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}set trace(e){this._trace=e}log(e,t){this._trace!==n.Trace.Off&&this.connection.sendNotification(n.LogTraceNotification.type,{message:e,verbose:this._trace===n.Trace.Verbose?t:void 0})}}class E{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}logEvent(e){this.connection.sendNotification(n.TelemetryEventNotification.type,e)}}class T{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}attachWorkDoneProgress(e){return s.attachWorkDone(this.connection,e)}attachPartialResultProgress(e,t){return s.attachPartialResult(this.connection,t)}}t._LanguagesImpl=T;const S=f.MonikerFeature(h.LinkedEditingRangeFeature(u.SemanticTokensFeature(l.CallHierarchyFeature(T))));function x(e,t){return function(r){return t(e(r))}}function k(e,t){return function(r){return t(e(r))}}function I(e,t){return function(r){return t(e(r))}}function A(e,t){return function(r){return t(e(r))}}function P(e,t){return function(r){return t(e(r))}}function R(e,t){return function(r){return t(e(r))}}t.combineConsoleFeatures=x,t.combineTelemetryFeatures=k,t.combineTracerFeatures=I,t.combineClientFeatures=A,t.combineWindowFeatures=P,t.combineWorkspaceFeatures=R,t.combineLanguagesFeatures=function(e,t){return function(r){return t(e(r))}},t.combineFeatures=function(e,t){function r(e,t,r){return e&&t?r(e,t):e||t}return{__brand:"features",console:r(e.console,t.console,x),tracer:r(e.tracer,t.tracer,I),telemetry:r(e.telemetry,t.telemetry,k),client:r(e.client,t.client,A),window:r(e.window,t.window,P),workspace:r(e.workspace,t.workspace,R)}},t.createConnection=function(e,t,r){const o=r&&r.console?new(r.console(m)):new m,a=e(o);o.rawAttach(a);const c=r&&r.tracer?new(r.tracer(C)):new C,l=r&&r.telemetry?new(r.telemetry(E)):new E,u=r&&r.client?new(r.client(b)):new b,d=r&&r.window?new(r.window(y)):new y,p=r&&r.workspace?new(r.workspace(w)):new w,h=r&&r.languages?new(r.languages(S)):new S,f=[o,c,l,u,d,p,h];function g(e){return e instanceof Promise?e:i.thenable(e)?new Promise(((t,r)=>{e.then((e=>t(e)),(e=>r(e)))})):Promise.resolve(e)}let v,_,T,x={listen:()=>a.listen(),sendRequest:(e,...t)=>a.sendRequest(i.string(e)?e:e.method,...t),onRequest:(e,t)=>a.onRequest(e,t),sendNotification:(e,t)=>{const r=i.string(e)?e:e.method;1===arguments.length?a.sendNotification(r):a.sendNotification(r,t)},onNotification:(e,t)=>a.onNotification(e,t),onProgress:a.onProgress,sendProgress:a.sendProgress,onInitialize:e=>_=e,onInitialized:e=>a.onNotification(n.InitializedNotification.type,e),onShutdown:e=>v=e,onExit:e=>T=e,get console(){return o},get telemetry(){return l},get tracer(){return c},get client(){return u},get window(){return d},get workspace(){return p},get languages(){return h},onDidChangeConfiguration:e=>a.onNotification(n.DidChangeConfigurationNotification.type,e),onDidChangeWatchedFiles:e=>a.onNotification(n.DidChangeWatchedFilesNotification.type,e),__textDocumentSync:void 0,onDidOpenTextDocument:e=>a.onNotification(n.DidOpenTextDocumentNotification.type,e),onDidChangeTextDocument:e=>a.onNotification(n.DidChangeTextDocumentNotification.type,e),onDidCloseTextDocument:e=>a.onNotification(n.DidCloseTextDocumentNotification.type,e),onWillSaveTextDocument:e=>a.onNotification(n.WillSaveTextDocumentNotification.type,e),onWillSaveTextDocumentWaitUntil:e=>a.onRequest(n.WillSaveTextDocumentWaitUntilRequest.type,e),onDidSaveTextDocument:e=>a.onNotification(n.DidSaveTextDocumentNotification.type,e),sendDiagnostics:e=>a.sendNotification(n.PublishDiagnosticsNotification.type,e),onHover:e=>a.onRequest(n.HoverRequest.type,((t,r)=>e(t,r,s.attachWorkDone(a,t),void 0))),onCompletion:e=>a.onRequest(n.CompletionRequest.type,((t,r)=>e(t,r,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onCompletionResolve:e=>a.onRequest(n.CompletionResolveRequest.type,e),onSignatureHelp:e=>a.onRequest(n.SignatureHelpRequest.type,((t,r)=>e(t,r,s.attachWorkDone(a,t),void 0))),onDeclaration:e=>a.onRequest(n.DeclarationRequest.type,((t,r)=>e(t,r,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onDefinition:e=>a.onRequest(n.DefinitionRequest.type,((t,r)=>e(t,r,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onTypeDefinition:e=>a.onRequest(n.TypeDefinitionRequest.type,((t,r)=>e(t,r,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onImplementation:e=>a.onRequest(n.ImplementationRequest.type,((t,r)=>e(t,r,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onReferences:e=>a.onRequest(n.ReferencesRequest.type,((t,r)=>e(t,r,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onDocumentHighlight:e=>a.onRequest(n.DocumentHighlightRequest.type,((t,r)=>e(t,r,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onDocumentSymbol:e=>a.onRequest(n.DocumentSymbolRequest.type,((t,r)=>e(t,r,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onWorkspaceSymbol:e=>a.onRequest(n.WorkspaceSymbolRequest.type,((t,r)=>e(t,r,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onCodeAction:e=>a.onRequest(n.CodeActionRequest.type,((t,r)=>e(t,r,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onCodeActionResolve:e=>a.onRequest(n.CodeActionResolveRequest.type,((t,r)=>e(t,r))),onCodeLens:e=>a.onRequest(n.CodeLensRequest.type,((t,r)=>e(t,r,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onCodeLensResolve:e=>a.onRequest(n.CodeLensResolveRequest.type,((t,r)=>e(t,r))),onDocumentFormatting:e=>a.onRequest(n.DocumentFormattingRequest.type,((t,r)=>e(t,r,s.attachWorkDone(a,t),void 0))),onDocumentRangeFormatting:e=>a.onRequest(n.DocumentRangeFormattingRequest.type,((t,r)=>e(t,r,s.attachWorkDone(a,t),void 0))),onDocumentOnTypeFormatting:e=>a.onRequest(n.DocumentOnTypeFormattingRequest.type,((t,r)=>e(t,r))),onRenameRequest:e=>a.onRequest(n.RenameRequest.type,((t,r)=>e(t,r,s.attachWorkDone(a,t),void 0))),onPrepareRename:e=>a.onRequest(n.PrepareRenameRequest.type,((t,r)=>e(t,r))),onDocumentLinks:e=>a.onRequest(n.DocumentLinkRequest.type,((t,r)=>e(t,r,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onDocumentLinkResolve:e=>a.onRequest(n.DocumentLinkResolveRequest.type,((t,r)=>e(t,r))),onDocumentColor:e=>a.onRequest(n.DocumentColorRequest.type,((t,r)=>e(t,r,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onColorPresentation:e=>a.onRequest(n.ColorPresentationRequest.type,((t,r)=>e(t,r,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onFoldingRanges:e=>a.onRequest(n.FoldingRangeRequest.type,((t,r)=>e(t,r,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onSelectionRanges:e=>a.onRequest(n.SelectionRangeRequest.type,((t,r)=>e(t,r,s.attachWorkDone(a,t),s.attachPartialResult(a,t)))),onExecuteCommand:e=>a.onRequest(n.ExecuteCommandRequest.type,((t,r)=>e(t,r,s.attachWorkDone(a,t),void 0))),dispose:()=>a.dispose()};for(let e of f)e.attach(x);return a.onRequest(n.InitializeRequest.type,(e=>{t.initialize(e),i.string(e.trace)&&(c.trace=n.Trace.fromString(e.trace));for(let t of f)t.initialize(e.capabilities);if(_)return g(_(e,(new n.CancellationTokenSource).token,s.attachWorkDone(a,e),void 0)).then((e=>{if(e instanceof n.ResponseError)return e;let t=e;t||(t={capabilities:{}});let r=t.capabilities;r||(r={},t.capabilities=r),void 0===r.textDocumentSync||null===r.textDocumentSync?r.textDocumentSync=i.number(x.__textDocumentSync)?x.__textDocumentSync:n.TextDocumentSyncKind.None:i.number(r.textDocumentSync)||i.number(r.textDocumentSync.change)||(r.textDocumentSync.change=i.number(x.__textDocumentSync)?x.__textDocumentSync:n.TextDocumentSyncKind.None);for(let e of f)e.fillServerCapabilities(r);return t}));{let e={capabilities:{textDocumentSync:n.TextDocumentSyncKind.None}};for(let t of f)t.fillServerCapabilities(e.capabilities);return e}})),a.onRequest(n.ShutdownRequest.type,(()=>(t.shutdownReceived=!0,v?v((new n.CancellationTokenSource).token):void 0))),a.onNotification(n.ExitNotification.type,(()=>{try{T&&T()}finally{t.shutdownReceived?t.exit(0):t.exit(1)}})),a.onNotification(n.SetTraceNotification.type,(e=>{c.trace=n.Trace.fromString(e.value)})),x}},85421:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentFeature=void 0;const n=r(40273);t.ShowDocumentFeature=e=>class extends e{showDocument(e){return this.connection.sendRequest(n.ShowDocumentRequest.type,e)}}},40289:(e,t)=>{"use strict";function r(e){return"string"==typeof e||e instanceof String}function n(e){return"function"==typeof e}function i(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.thenable=t.typedArray=t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=r,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=n,t.array=i,t.stringArray=function(e){return i(e)&&e.every((e=>r(e)))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.thenable=function(e){return e&&n(e.then)}},37560:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateUuid=t.parse=t.isUUID=t.v4=t.empty=void 0;class r{constructor(e){this._value=e}asHex(){return this._value}equals(e){return this.asHex()===e.asHex()}}class n extends r{constructor(){super([n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),"-",n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),"-","4",n._randomHex(),n._randomHex(),n._randomHex(),"-",n._oneOf(n._timeHighBits),n._randomHex(),n._randomHex(),n._randomHex(),"-",n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex()].join(""))}static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return n._oneOf(n._chars)}}function i(){return new n}n._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"],n._timeHighBits=["8","9","a","b"],t.empty=new r("00000000-0000-0000-0000-000000000000"),t.v4=i;const o=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function s(e){return o.test(e)}t.isUUID=s,t.parse=function(e){if(!s(e))throw new Error("invalid uuid");return new r(e)},t.generateUuid=function(){return i().asHex()}},28634:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceFoldersFeature=void 0;const n=r(40273);t.WorkspaceFoldersFeature=e=>class extends e{initialize(e){let t=e.workspace;t&&t.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new n.Emitter,this.connection.onNotification(n.DidChangeWorkspaceFoldersNotification.type,(e=>{this._onDidChangeWorkspaceFolders.fire(e.event)})))}getWorkspaceFolders(){return this.connection.sendRequest(n.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return this._unregistration||(this._unregistration=this.connection.client.register(n.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}}},87613:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveModulePath=t.FileSystem=t.resolveGlobalYarnPath=t.resolveGlobalNodePath=t.resolve=t.uriToFilePath=void 0;const n=r(57310),i=r(71017),o=r(57147),s=r(32081);function a(){return"win32"===process.platform}function c(e,t,r,n){const a="NODE_PATH",c=["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(((l,u)=>{let d=process.env,p=Object.create(null);Object.keys(d).forEach((e=>p[e]=d[e])),t&&o.existsSync(t)&&(p[a]?p[a]=t+i.delimiter+p[a]:p[a]=t,n&&n(`NODE_PATH value is: ${p[a]}`)),p.ELECTRON_RUN_AS_NODE="1";try{let t=s.fork("",[],{cwd:r,env:p,execArgv:["-e",c]});if(void 0===t.pid)return void u(new Error(`Starting process to resolve node module ${e} failed`));t.on("error",(e=>{u(e)})),t.on("message",(r=>{"r"===r.c&&(t.send({c:"e"}),r.s?l(r.r):u(new Error(`Failed to resolve module: ${e}`)))}));let n={c:"rs",a:e};t.send(n)}catch(e){u(e)}}))}function l(e){let t="npm";const r=Object.create(null);Object.keys(process.env).forEach((e=>r[e]=process.env[e])),r.NO_UPDATE_NOTIFIER="true";const n={encoding:"utf8",env:r};a()&&(t="npm.cmd",n.shell=!0);let o=()=>{};try{process.on("SIGPIPE",o);let r=s.spawnSync(t,["config","get","prefix"],n).stdout;if(!r)return void(e&&e("'npm config get prefix' didn't return a value."));let c=r.trim();return e&&e(`'npm config get prefix' value is: ${c}`),c.length>0?a()?i.join(c,"node_modules"):i.join(c,"lib","node_modules"):void 0}catch(e){return}finally{process.removeListener("SIGPIPE",o)}}var u;t.uriToFilePath=function(e){let t=n.parse(e);if("file:"!==t.protocol||!t.path)return;let r=t.path.split("/");for(var o=0,s=r.length;o1){let e=r[0],t=r[1];0===e.length&&t.length>1&&":"===t[1]&&r.shift()}return i.normalize(r.join("/"))},t.resolve=c,t.resolveGlobalNodePath=l,t.resolveGlobalYarnPath=function(e){let t="yarn",r={encoding:"utf8"};a()&&(t="yarn.cmd",r.shell=!0);let n=()=>{};try{process.on("SIGPIPE",n);let o=s.spawnSync(t,["global","dir","--json"],r),a=o.stdout;if(!a)return void(e&&(e("'yarn global dir' didn't return a value."),o.stderr&&e(o.stderr)));let c=a.trim().split(/\r?\n/);for(let e of c)try{let t=JSON.parse(e);if("log"===t.type)return i.join(t.data,"node_modules")}catch(e){}return}catch(e){return}finally{process.removeListener("SIGPIPE",n)}},function(e){let t;function r(){return void 0!==t||(t=!("win32"===process.platform||o.existsSync(__filename.toUpperCase())&&o.existsSync(__filename.toLowerCase()))),t}e.isCaseSensitive=r,e.isParent=function(e,t){return r()?0===i.normalize(t).indexOf(i.normalize(e)):0===i.normalize(t).toLowerCase().indexOf(i.normalize(e).toLowerCase())}}(u=t.FileSystem||(t.FileSystem={})),t.resolveModulePath=function(e,t,r,n){return r?(i.isAbsolute(r)||(r=i.join(e,r)),c(t,r,r,n).then((e=>u.isParent(r,e)?e:Promise.reject(new Error(`Failed to load ${t} from node path location.`)))).then(void 0,(r=>c(t,l(n),e,n)))):c(t,l(n),e,n)}},35809:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.createConnection=t.Files=void 0;const o=r(40289),s=r(49891),a=r(87613),c=r(96560);var l;i(r(96560),t),i(r(76265),t),(l=t.Files||(t.Files={})).uriToFilePath=a.uriToFilePath,l.resolveGlobalNodePath=a.resolveGlobalNodePath,l.resolveGlobalYarnPath=a.resolveGlobalYarnPath,l.resolve=a.resolve,l.resolveModulePath=a.resolveModulePath;let u,d=!1;!function(){const e="--clientProcessId";function t(e){try{let t=parseInt(e);isNaN(t)||(u=setInterval((()=>{try{process.kill(t,0)}catch(e){process.exit(d?0:1)}}),3e3))}catch(e){}}for(let r=2;r{const t=e.processId;o.number(t)&&void 0===u&&setInterval((()=>{try{process.kill(t,0)}catch(e){process.exit(d?0:1)}}),3e3)},get shutdownReceived(){return d},set shutdownReceived(e){d=e},exit:e=>{process.exit(e)}};t.createConnection=function(e,t,r,n){let i,a,l,u;return void 0!==e&&"features"===e.__brand&&(i=e,e=t,t=r,r=n),c.ConnectionStrategy.is(e)||c.ConnectionOptions.is(e)?u=e:(a=e,l=t,u=r),function(e,t,r,n){if(!e&&!t&&process.argv.length>2){let r,n,o=process.argv.slice(2);for(let s=0;s{process.exit(d?0:1)})),t.on("close",(()=>{process.exit(d?0:1)}))}return s.createConnection((n=>c.createProtocolConnection(e,t,n,r)),p,n)}(a,l,u,i)}},68212:(e,t,r)=>{"use strict";e.exports=r(35809)},54086:(e,t,r)=>{"use strict";r.r(t),r.d(t,{TextDocument:()=>i});class n{constructor(e,t,r,n){this._uri=e,this._languageId=t,this._version=r,this._content=n,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const t=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(t,r)}return this._content}update(e,t){for(let t of e)if(n.isIncremental(t)){const e=a(t.range),r=this.offsetAt(e.start),n=this.offsetAt(e.end);this._content=this._content.substring(0,r)+t.text+this._content.substring(n,this._content.length);const i=Math.max(e.start.line,0),o=Math.max(e.end.line,0);let c=this._lineOffsets;const l=s(t.text,!1,r);if(o-i===l.length)for(let e=0,t=l.length;ee?n=i:r=i+1}let i=r-1;return{line:i,character:e-t[i]}}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let r=t[e.line],n=e.line+1r.line||t.line===r.line&&t.character>r.character?{start:r,end:t}:e}function c(e){const t=a(e.range);return t!==e.range?{newText:e.newText,range:t}:e}!function(e){e.create=function(e,t,r,i){return new n(e,t,r,i)},e.update=function(e,t,r){if(e instanceof n)return e.update(t,r),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")},e.applyEdits=function(e,t){let r=e.getText(),n=o(t.map(c),((e,t)=>{let r=e.range.start.line-t.range.start.line;return 0===r?e.range.start.character-t.range.start.character:r})),i=0;const s=[];for(const t of n){let n=e.offsetAt(t.range.start);if(ni&&s.push(r.substring(i,n)),t.newText.length&&s.push(t.newText),i=e.offsetAt(t.range.end)}return s.push(r.substr(i)),s.join("")}}(i||(i={}))},39941:e=>{const t="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,r="function"==typeof AbortController?AbortController:class{constructor(){this.signal=new o}abort(){this.signal.dispatchEvent("abort")}},n="function"==typeof AbortSignal,i="function"==typeof r.AbortSignal,o=n?AbortSignal:i?r.AbortController:class{constructor(){this.aborted=!1,this._listeners=[]}dispatchEvent(e){if("abort"===e){this.aborted=!0;const t={type:e,target:this};this.onabort(t),this._listeners.forEach((e=>e(t)),this)}}onabort(){}addEventListener(e,t){"abort"===e&&this._listeners.push(t)}removeEventListener(e,t){"abort"===e&&(this._listeners=this._listeners.filter((e=>e!==t)))}},s=new Set,a=(e,t)=>{const r=`LRU_CACHE_OPTION_${e}`;u(r)&&d(r,`${e} option`,`options.${t}`,m)},c=(e,t)=>{const r=`LRU_CACHE_METHOD_${e}`;if(u(r)){const{prototype:n}=m,{get:i}=Object.getOwnPropertyDescriptor(n,e);d(r,`${e} method`,`cache.${t}()`,i)}},l=(...e)=>{"object"==typeof process&&process&&"function"==typeof process.emitWarning?process.emitWarning(...e):console.error(...e)},u=e=>!s.has(e),d=(e,t,r,n)=>{s.add(e),l(`The ${t} is deprecated. Please use ${r} instead.`,"DeprecationWarning",e,n)},p=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),h=e=>p(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?f:null:null;class f extends Array{constructor(e){super(e),this.fill(0)}}class g{constructor(e){if(0===e)return[];const t=h(e);this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}}class m{constructor(e={}){const{max:t=0,ttl:r,ttlResolution:n=1,ttlAutopurge:i,updateAgeOnGet:o,updateAgeOnHas:c,allowStale:d,dispose:f,disposeAfter:y,noDisposeOnSet:v,noUpdateTTL:_,maxSize:b=0,sizeCalculation:w,fetchMethod:C,fetchContext:E,noDeleteOnFetchRejection:T,noDeleteOnStaleGet:S}=e,{length:x,maxAge:k,stale:I}=e instanceof m?{}:e;if(0!==t&&!p(t))throw new TypeError("max option must be a nonnegative integer");const A=t?h(t):Array;if(!A)throw new Error("invalid max value: "+t);if(this.max=t,this.maxSize=b,this.sizeCalculation=w||x,this.sizeCalculation){if(!this.maxSize)throw new TypeError("cannot set sizeCalculation without setting maxSize");if("function"!=typeof this.sizeCalculation)throw new TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=C||null,this.fetchMethod&&"function"!=typeof this.fetchMethod)throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=E,!this.fetchMethod&&void 0!==E)throw new TypeError("cannot set fetchContext without fetchMethod");if(this.keyMap=new Map,this.keyList=new Array(t).fill(null),this.valList=new Array(t).fill(null),this.next=new A(t),this.prev=new A(t),this.head=0,this.tail=0,this.free=new g(t),this.initialFill=1,this.size=0,"function"==typeof f&&(this.dispose=f),"function"==typeof y?(this.disposeAfter=y,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!v,this.noUpdateTTL=!!_,this.noDeleteOnFetchRejection=!!T,0!==this.maxSize){if(!p(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!d||!!I,this.noDeleteOnStaleGet=!!S,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!c,this.ttlResolution=p(n)||0===n?n:1,this.ttlAutopurge=!!i,this.ttl=r||k||0,this.ttl){if(!p(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.initializeTTLTracking()}if(0===this.max&&0===this.ttl&&0===this.maxSize)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.max&&!this.maxSize){const e="LRU_CACHE_UNBOUNDED";u(e)&&(s.add(e),l("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",e,m))}I&&a("stale","allowStale"),k&&a("maxAge","ttl"),x&&a("length","sizeCalculation")}getRemainingTTL(e){return this.has(e,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new f(this.max),this.starts=new f(this.max),this.setItemTTL=(e,r,n=t.now())=>{if(this.starts[e]=0!==r?n:0,this.ttls[e]=r,0!==r&&this.ttlAutopurge){const t=setTimeout((()=>{this.isStale(e)&&this.delete(this.keyList[e])}),r+1);t.unref&&t.unref()}},this.updateItemAge=e=>{this.starts[e]=0!==this.ttls[e]?t.now():0};let e=0;const r=()=>{const r=t.now();if(this.ttlResolution>0){e=r;const t=setTimeout((()=>e=0),this.ttlResolution);t.unref&&t.unref()}return r};this.getRemainingTTL=t=>{const n=this.keyMap.get(t);return void 0===n?0:0===this.ttls[n]||0===this.starts[n]?1/0:this.starts[n]+this.ttls[n]-(e||r())},this.isStale=t=>0!==this.ttls[t]&&0!==this.starts[t]&&(e||r())-this.starts[t]>this.ttls[t]}updateItemAge(e){}setItemTTL(e,t,r){}isStale(e){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new f(this.max),this.removeItemSize=e=>{this.calculatedSize-=this.sizes[e],this.sizes[e]=0},this.requireSize=(e,t,r,n)=>{if(!p(r)){if(!n)throw new TypeError("invalid size value (must be positive integer)");if("function"!=typeof n)throw new TypeError("sizeCalculation must be a function");if(r=n(t,e),!p(r))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}return r},this.addItemSize=(e,t)=>{this.sizes[e]=t;const r=this.maxSize-this.sizes[e];for(;this.calculatedSize>r;)this.evict(!0);this.calculatedSize+=this.sizes[e]}}removeItemSize(e){}addItemSize(e,t){}requireSize(e,t,r,n){if(r||n)throw new TypeError("cannot set size without setting maxSize on cache")}*indexes({allowStale:e=this.allowStale}={}){if(this.size)for(let t=this.tail;this.isValidIndex(t)&&(!e&&this.isStale(t)||(yield t),t!==this.head);)t=this.prev[t]}*rindexes({allowStale:e=this.allowStale}={}){if(this.size)for(let t=this.head;this.isValidIndex(t)&&(!e&&this.isStale(t)||(yield t),t!==this.tail);)t=this.next[t]}isValidIndex(e){return this.keyMap.get(this.keyList[e])===e}*entries(){for(const e of this.indexes())yield[this.keyList[e],this.valList[e]]}*rentries(){for(const e of this.rindexes())yield[this.keyList[e],this.valList[e]]}*keys(){for(const e of this.indexes())yield this.keyList[e]}*rkeys(){for(const e of this.rindexes())yield this.keyList[e]}*values(){for(const e of this.indexes())yield this.valList[e]}*rvalues(){for(const e of this.rindexes())yield this.valList[e]}[Symbol.iterator](){return this.entries()}find(e,t={}){for(const r of this.indexes())if(e(this.valList[r],this.keyList[r],this))return this.get(this.keyList[r],t)}forEach(e,t=this){for(const r of this.indexes())e.call(t,this.valList[r],this.keyList[r],this)}rforEach(e,t=this){for(const r of this.rindexes())e.call(t,this.valList[r],this.keyList[r],this)}get prune(){return c("prune","purgeStale"),this.purgeStale}purgeStale(){let e=!1;for(const t of this.rindexes({allowStale:!0}))this.isStale(t)&&(this.delete(this.keyList[t]),e=!0);return e}dump(){const e=[];for(const r of this.indexes({allowStale:!0})){const n=this.keyList[r],i=this.valList[r],o={value:this.isBackgroundFetch(i)?i.__staleWhileFetching:i};if(this.ttls){o.ttl=this.ttls[r];const e=t.now()-this.starts[r];o.start=Math.floor(Date.now()-e)}this.sizes&&(o.size=this.sizes[r]),e.unshift([n,o])}return e}load(e){this.clear();for(const[r,n]of e){if(n.start){const e=Date.now()-n.start;n.start=t.now()-e}this.set(r,n.value,n)}}dispose(e,t,r){}set(e,t,{ttl:r=this.ttl,start:n,noDisposeOnSet:i=this.noDisposeOnSet,size:o=0,sizeCalculation:s=this.sizeCalculation,noUpdateTTL:a=this.noUpdateTTL}={}){if(o=this.requireSize(e,t,o,s),this.maxSize&&o>this.maxSize)return this;let c=0===this.size?void 0:this.keyMap.get(e);if(void 0===c)c=this.newIndex(),this.keyList[c]=e,this.valList[c]=t,this.keyMap.set(e,c),this.next[this.tail]=c,this.prev[c]=this.tail,this.tail=c,this.size++,this.addItemSize(c,o),a=!1;else{const r=this.valList[c];t!==r&&(this.isBackgroundFetch(r)?r.__abortController.abort():i||(this.dispose(r,e,"set"),this.disposeAfter&&this.disposed.push([r,e,"set"])),this.removeItemSize(c),this.valList[c]=t,this.addItemSize(c,o)),this.moveToTail(c)}if(0===r||0!==this.ttl||this.ttls||this.initializeTTLTracking(),a||this.setItemTTL(c,r,n),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return 0===this.size?this.tail:this.size===this.max&&0!==this.max?this.evict(!1):0!==this.free.length?this.free.pop():this.initialFill++}pop(){if(this.size){const e=this.valList[this.head];return this.evict(!0),e}}evict(e){const t=this.head,r=this.keyList[t],n=this.valList[t];return this.isBackgroundFetch(n)?n.__abortController.abort():(this.dispose(n,r,"evict"),this.disposeAfter&&this.disposed.push([n,r,"evict"])),this.removeItemSize(t),e&&(this.keyList[t]=null,this.valList[t]=null,this.free.push(t)),this.head=this.next[t],this.keyMap.delete(r),this.size--,t}has(e,{updateAgeOnHas:t=this.updateAgeOnHas}={}){const r=this.keyMap.get(e);return void 0!==r&&!this.isStale(r)&&(t&&this.updateItemAge(r),!0)}peek(e,{allowStale:t=this.allowStale}={}){const r=this.keyMap.get(e);if(void 0!==r&&(t||!this.isStale(r))){const e=this.valList[r];return this.isBackgroundFetch(e)?e.__staleWhileFetching:e}}backgroundFetch(e,t,n,i){const o=void 0===t?void 0:this.valList[t];if(this.isBackgroundFetch(o))return o;const s=new r,a={signal:s.signal,options:n,context:i},c=new Promise((t=>t(this.fetchMethod(e,o,a)))).then((t=>(s.signal.aborted||this.set(e,t,a.options),t)),(r=>{if(this.valList[t]===c&&(n.noDeleteOnFetchRejection&&void 0!==c.__staleWhileFetching?this.valList[t]=c.__staleWhileFetching:this.delete(e)),c.__returned===c)throw r}));return c.__abortController=s,c.__staleWhileFetching=o,c.__returned=null,void 0===t?(this.set(e,c,a.options),t=this.keyMap.get(e)):this.valList[t]=c,c}isBackgroundFetch(e){return e&&"object"==typeof e&&"function"==typeof e.then&&Object.prototype.hasOwnProperty.call(e,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(e,"__returned")&&(e.__returned===e||null===e.__returned)}async fetch(e,{allowStale:t=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:i=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:s=0,sizeCalculation:a=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,noDeleteOnFetchRejection:l=this.noDeleteOnFetchRejection,fetchContext:u=this.fetchContext,forceRefresh:d=!1}={}){if(!this.fetchMethod)return this.get(e,{allowStale:t,updateAgeOnGet:r,noDeleteOnStaleGet:n});const p={allowStale:t,updateAgeOnGet:r,noDeleteOnStaleGet:n,ttl:i,noDisposeOnSet:o,size:s,sizeCalculation:a,noUpdateTTL:c,noDeleteOnFetchRejection:l};let h=this.keyMap.get(e);if(void 0===h){const t=this.backgroundFetch(e,h,p,u);return t.__returned=t}{const n=this.valList[h];if(this.isBackgroundFetch(n))return t&&void 0!==n.__staleWhileFetching?n.__staleWhileFetching:n.__returned=n;if(!d&&!this.isStale(h))return this.moveToTail(h),r&&this.updateItemAge(h),n;const i=this.backgroundFetch(e,h,p,u);return t&&void 0!==i.__staleWhileFetching?i.__staleWhileFetching:i.__returned=i}}get(e,{allowStale:t=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet}={}){const i=this.keyMap.get(e);if(void 0!==i){const o=this.valList[i],s=this.isBackgroundFetch(o);if(this.isStale(i))return s?t?o.__staleWhileFetching:void 0:(n||this.delete(e),t?o:void 0);if(s)return;return this.moveToTail(i),r&&this.updateItemAge(i),o}}connect(e,t){this.prev[t]=e,this.next[e]=t}moveToTail(e){e!==this.tail&&(e===this.head?this.head=this.next[e]:this.connect(this.prev[e],this.next[e]),this.connect(this.tail,e),this.tail=e)}get del(){return c("del","delete"),this.delete}delete(e){let t=!1;if(0!==this.size){const r=this.keyMap.get(e);if(void 0!==r)if(t=!0,1===this.size)this.clear();else{this.removeItemSize(r);const t=this.valList[r];this.isBackgroundFetch(t)?t.__abortController.abort():(this.dispose(t,e,"delete"),this.disposeAfter&&this.disposed.push([t,e,"delete"])),this.keyMap.delete(e),this.keyList[r]=null,this.valList[r]=null,r===this.tail?this.tail=this.prev[r]:r===this.head?this.head=this.next[r]:(this.next[this.prev[r]]=this.next[r],this.prev[this.next[r]]=this.prev[r]),this.size--,this.free.push(r)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return t}clear(){for(const e of this.rindexes({allowStale:!0})){const t=this.valList[e];if(this.isBackgroundFetch(t))t.__abortController.abort();else{const r=this.keyList[e];this.dispose(t,r,"delete"),this.disposeAfter&&this.disposed.push([t,r,"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 c("reset","clear"),this.clear}get length(){return((e,t)=>{const r=`LRU_CACHE_PROPERTY_${e}`;if(u(r)){const{prototype:t}=m,{get:n}=Object.getOwnPropertyDescriptor(t,e);d(r,`${e} property`,"cache.size",n)}})("length"),this.size}static get AbortController(){return r}static get AbortSignal(){return o}}e.exports=m},86029:(e,t,r)=>{"use strict";const{randomBytes:n}=r(6113),{Readable:i}=r(12781),o=e=>"object"==typeof e&&0===["arrayBuffer","stream","text","slice","constructor"].map((t=>typeof e[t])).filter((e=>"function"!==e)).length&&"string"==typeof e.type&&"number"==typeof e.size&&/^(Blob|File)$/.test(e[Symbol.toStringTag]),s=e=>`--${e}--\r\n\r\n`,a=(e,t,r)=>{let n="";return n+=`--${e}\r\n`,n+=`Content-Disposition: form-data; name="${t}"`,o(r)&&(n+=`; filename="${r.name}"\r\n`,n+=`Content-Type: ${r.type||"application/octet-stream"}`),`${n}\r\n\r\n`};e.exports={isFormData:e=>null!=e&&"object"==typeof e&&0===["append","delete","get","getAll","has","set","keys","values","entries","constructor"].map((t=>typeof e[t])).filter((e=>"function"!==e)).length&&"FormData"===e[Symbol.toStringTag],FormDataSerializer:class{constructor(e){this.fd=e,this.boundary=n(8).toString("hex")}length(){return void 0===this._length&&(this._length=((e,t)=>{let r=0;for(const[n,i]of e)r+=Buffer.byteLength(a(t,n,i)),r+=o(i)?i.size:Buffer.byteLength(String(i)),r+=Buffer.byteLength("\r\n");return r+=Buffer.byteLength(s(t)),r})(this.fd,this.boundary)),this._length}contentType(){return`multipart/form-data; boundary=${this.boundary}`}stream(){return i.from(async function*(e,t){for(const[r,n]of e)yield a(t,r,n),o(n)?yield*n.stream():yield n,yield"\r\n";yield s(t)}(this.fd,this.boundary))}}}},45591:(e,t,r)=>{"use strict";const{constants:{MAX_LENGTH:n}}=r(14300),{pipeline:i,PassThrough:o}=r(12781),{promisify:s}=r(73837),{createGunzip:a,createInflate:c,createBrotliDecompress:l,constants:{Z_SYNC_FLUSH:u}}=r(59796),d=r(41241)("helix-fetch:utils"),p=s(i),h=(e,t)=>{if(Buffer.isBuffer(e))return e.length;switch(typeof e){case"string":return 2*e.length;case"boolean":return 4;case"number":return 8;case"symbol":return Symbol.keyFor(e)?2*Symbol.keyFor(e).length:2*(e.toString().length-8);case"object":return Array.isArray(e)?f(e,t):g(e,t);default:return 0}},f=(e,t)=>(t.add(e),e.map((e=>t.has(e)?0:h(e,t))).reduce(((e,t)=>e+t),0)),g=(e,t)=>{if(null==e)return 0;t.add(e);let r=0;const n=[];for(const t in e)n.push(t);return n.push(...Object.getOwnPropertySymbols(e)),n.forEach((n=>{if(r+=h(n,t),"object"==typeof e[n]&&null!==e[n]){if(t.has(e[n]))return;t.add(e[n])}r+=h(e[n],t)})),r};e.exports={decodeStream:(e,t,r,n)=>{if(!((e,t)=>204!==e&&304!==e&&0!=+t["content-length"]&&/^\s*(?:(x-)?deflate|(x-)?gzip|br)\s*$/.test(t["content-encoding"]))(e,t))return r;const o=e=>{e&&(d(`encountered error while decoding stream: ${e}`),n(e))};switch(t["content-encoding"].trim()){case"gzip":case"x-gzip":return i(r,a({flush:u,finishFlush:u}),o);case"deflate":case"x-deflate":return i(r,c(),o);case"br":return i(r,l(),o);default:return r}},isPlainObject:e=>{if(!e||"object"!=typeof e)return!1;if("[object Object]"!==Object.prototype.toString.call(e))return!1;if(null===Object.getPrototypeOf(e))return!0;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t},sizeof:e=>h(e,new WeakSet),streamToBuffer:async e=>{const t=new o;let r=0;const i=[];return t.on("data",(e=>{if(r+e.length>n)throw new Error("Buffer.constants.MAX_SIZE exceeded");i.push(e),r+=e.length})),await p(e,t),Buffer.concat(i,r)}}},75899:e=>{"use strict";class t extends Error{get name(){return this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}}e.exports={RequestAbortedError:t}},84751:(e,t,r)=>{"use strict";const n=r(13685),i=r(95687),{Readable:o}=r(12781),s=r(41241)("helix-fetch:h1"),{RequestAbortedError:a}=r(75899),{decodeStream:c}=r(45591);e.exports={request:async(e,t,r)=>{const{request:l}="https:"===t.protocol?i:n,u=((e,t)=>{const{h1:r,options:{h1:o,rejectUnauthorized:s}}=e;return"https:"===t?r.httpsAgent?r.httpsAgent:o||"boolean"==typeof s?(r.httpsAgent=new i.Agent("boolean"==typeof s?{...o||{},rejectUnauthorized:s}:o),r.httpsAgent):void 0:r.httpAgent?r.httpAgent:o?(r.httpAgent=new n.Agent(o),r.httpAgent):void 0})(e,t.protocol),d={...r,agent:u},{socket:p,body:h}=d;return p&&(delete d.socket,p.assigned||(p.assigned=!0,u?d.agent=new Proxy(u,{get:(e,t)=>"createConnection"!==t||p.inUse?e[t]:(e,t)=>{s(`agent reusing socket #${p.id} (${p.servername})`),p.inUse=!0,t(null,p)}}):d.createConnection=(e,t)=>{s(`reusing socket #${p.id} (${p.servername})`),p.inUse=!0,t(null,p)})),new Promise(((e,r)=>{let n;s(`${d.method} ${t.href}`);const{signal:i}=d,u=()=>{i.removeEventListener("abort",u),p&&!p.inUse&&(s(`discarding redundant socket used for ALPN: #${p.id} ${p.servername}`),p.destroy()),r(new a),n&&n.abort()};if(i){if(i.aborted)return void r(new a);i.addEventListener("abort",u)}n=l(t,d),n.once("response",(t=>{i&&i.removeEventListener("abort",u),p&&!p.inUse&&(s(`discarding redundant socket used for ALPN: #${p.id} ${p.servername}`),p.destroy()),e(((e,t,r)=>{const{statusCode:n,statusMessage:i,httpVersion:o,httpVersionMajor:s,httpVersionMinor:a,headers:l}=e,u=t?c(n,l,e,r):e;return{statusCode:n,statusText:i,httpVersion:o,httpVersionMajor:s,httpVersionMinor:a,headers:l,readable:u,decoded:!(!t||u===e)}})(t,d.decode,r))})),n.once("error",(e=>{i&&i.removeEventListener("abort",u),p&&!p.inUse&&(s(`discarding redundant socket used for ALPN: #${p.id} ${p.servername}`),p.destroy()),n.aborted||(s(`${d.method} ${t.href} failed with: ${e.message}`),n.abort(),r(e))})),h instanceof o?h.pipe(n):(h&&n.write(h),n.end())}))},setupContext:e=>{e.h1={}},resetContext:async({h1:e})=>{e.httpAgent&&(s("resetContext: destroying httpAgent"),e.httpAgent.destroy(),delete e.httpAgent),e.httpsAgent&&(s("resetContext: destroying httpsAgent"),e.httpsAgent.destroy(),delete e.httpsAgent)}}},57652:(e,t,r)=>{"use strict";const{connect:n,constants:i}=r(85158),{Readable:o}=r(12781),s=r(41241)("helix-fetch:h2"),{RequestAbortedError:a}=r(75899),{decodeStream:c}=r(45591),{NGHTTP2_CANCEL:l}=i,u=3e5,d=5e3,p=(e,t,r,n=(()=>{}))=>{const i={...e},o=i[":status"];delete i[":status"];const s=r?c(o,e,t,n):t;return{statusCode:o,statusText:"",httpVersion:"2.0",httpVersionMajor:2,httpVersionMinor:0,headers:i,readable:s,decoded:!(!r||s===t)}};e.exports={request:async(e,t,r)=>{const{origin:i,pathname:c,search:h,hash:f}=t,g=`${c}${h}${f}`,{options:{h2:m={}},h2:{sessionCache:y}}=e,{idleSessionTimeout:v=u,pushPromiseHandler:_,pushHandler:b}=m,w={...r},{method:C,headers:E,socket:T,body:S,decode:x}=w;return T&&delete w.socket,E.host&&(E[":authority"]=E.host,delete E.host),new Promise(((r,c)=>{let u,h=y[i];if(!h||h.closed||h.destroyed){const t=!(!1===e.options.rejectUnauthorized||!1===m.rejectUnauthorized),r={...m,rejectUnauthorized:t};T&&!T.inUse&&(r.createConnection=()=>(s(`reusing socket #${T.id} (${T.servername})`),T.inUse=!0,T));const o=!(!_&&!b);h=n(i,{...r,settings:{enablePush:o}}),h.setMaxListeners(1e3),h.setTimeout(v,(()=>{s(`closing session ${i} after ${v} ms of inactivity`),h.close()})),h.once("connect",(()=>{s(`session ${i} established`),s(`caching session ${i}`),y[i]=h})),h.on("localSettings",(e=>{s(`session ${i} localSettings: ${JSON.stringify(e)}`)})),h.on("remoteSettings",(e=>{s(`session ${i} remoteSettings: ${JSON.stringify(e)}`)})),h.once("close",(()=>{s(`session ${i} closed`),y[i]===h&&(s(`discarding cached session ${i}`),delete y[i])})),h.once("error",(e=>{s(`session ${i} encountered error: ${e}`),y[i]===h&&(s(`discarding cached session ${i}`),delete y[i])})),h.on("frameError",((e,t,r)=>{s(`session ${i} encountered frameError: type: ${e}, code: ${t}, id: ${r}`)})),h.once("goaway",((e,t,r)=>{s(`session ${i} received GOAWAY frame: errorCode: ${e}, lastStreamID: ${t}, opaqueData: ${r?r.toString():void 0}`)})),h.on("stream",((t,r,n)=>{((e,t,r,n,i,o)=>{const{options:{h2:{pushPromiseHandler:a,pushHandler:c,pushedStreamIdleTimeout:u=d}}}=e,h=i[":path"],f=`${t}${h}`;s(`received PUSH_PROMISE: ${f}, stream #${n.id}, headers: ${JSON.stringify(i)}, flags: ${o}`),a&&a(f,i,(()=>{n.close(l)})),n.on("push",((e,o)=>{s(`received push headers for ${t}${h}, stream #${n.id}, headers: ${JSON.stringify(e)}, flags: ${o}`),n.setTimeout(u,(()=>{s(`closing pushed stream #${n.id} after ${u} ms of inactivity`),n.close(l)})),c&&c(f,i,p(e,n,r))})),n.on("aborted",(()=>{s(`pushed stream #${n.id} aborted`)})),n.on("error",(e=>{s(`pushed stream #${n.id} encountered error: ${e}`)})),n.on("frameError",((e,t,r)=>{s(`pushed stream #${n.id} encountered frameError: type: ${e}, code: ${t}, id: ${r}`)}))})(e,i,x,t,r,n)}))}else T&&T.id!==h.socket.id&&!T.inUse&&(s(`discarding redundant socket used for ALPN: #${T.id} ${T.servername}`),T.destroy());s(`${C} ${t.host}${g}`);const{signal:f}=w,k=()=>{f.removeEventListener("abort",k),c(new a),u&&u.close(l)};if(f){if(f.aborted)return void c(new a);f.addEventListener("abort",k)}const I=e=>{s(`session ${i} encountered error during ${w.method} ${t.href}: ${e}`),c(e)};h.once("error",I),u=h.request({":method":C,":path":g,...E}),u.once("response",(e=>{h.off("error",I),f&&f.removeEventListener("abort",k),r(p(e,u,w.decode,c))})),u.once("error",(e=>{h.off("error",I),f&&f.removeEventListener("abort",k),u.rstCode!==l&&(s(`${w.method} ${t.href} failed with: ${e.message}`),u.close(l),c(e))})),u.once("frameError",((e,r,n)=>{h.off("error",I),s(`encountered frameError during ${w.method} ${t.href}: type: ${e}, code: ${r}, id: ${n}`)})),u.on("push",((e,t)=>{s(`received 'push' event: headers: ${JSON.stringify(e)}, flags: ${t}`)})),S instanceof o?S.pipe(u):(S&&u.write(S),u.end())}))},setupContext:e=>{e.h2={sessionCache:{}}},resetContext:async({h2:e})=>Promise.all(Object.values(e.sessionCache).map((e=>new Promise((t=>{e.on("close",t),s(`resetContext: destroying session (socket #${e.socket&&e.socket.id}, ${e.socket&&e.socket.servername})`),e.destroy()})))))}},44673:(e,t,r)=>{"use strict";const n=r(41241)("helix-fetch:core"),{request:i,setupContext:o,resetContext:s,RequestAbortedError:a,ALPN_HTTP2:c,ALPN_HTTP2C:l,ALPN_HTTP1_1:u,ALPN_HTTP1_0:d}=r(56633);class p{constructor(e){this.options={...e||{}},o(this)}api(){return{request:async(e,t)=>this.request(e,t),context:(e={})=>new p(e).api(),reset:async()=>this.reset(),RequestAbortedError:a,ALPN_HTTP2:c,ALPN_HTTP2C:l,ALPN_HTTP1_1:u,ALPN_HTTP1_0:d}}async request(e,t){return i(this,e,t)}async reset(){return n("resetting context"),s(this)}}e.exports=(new p).api()},93430:(e,t,r)=>{"use strict";const{EventEmitter:n}=r(82361);e.exports=()=>{const e={},t=new n;return t.setMaxListeners(0),{acquire:r=>new Promise((n=>{if(!e[r])return e[r]=!0,void n();const i=o=>{e[r]||(e[r]=!0,t.removeListener(r,i),n(o))};t.on(r,i)})),release:(r,n)=>{Reflect.deleteProperty(e,r),setImmediate((()=>t.emit(r,n)))}}}},56633:(e,t,r)=>{"use strict";const{Readable:n}=r(12781),i=r(24404),{types:{isAnyArrayBuffer:o}}=r(73837),s=r(39941),a=r(41241)("helix-fetch:core"),{RequestAbortedError:c}=r(75899),l=r(84751),u=r(57652),d=r(93430),{isPlainObject:p}=r(45591),{isFormData:h,FormDataSerializer:f}=r(86029),{version:g}=r(93180),m="h2",y="h2c",v="http/1.0",_="http/1.1",b=100,w=36e5,C=[m,_,v],E=`helix-fetch/${g}`,T={method:"GET",compress:!0,decode:!0};let S=0;const x=d(),k=(e,t)=>new Promise(((r,n)=>{const{signal:o}=t;let s;const l=()=>{o.removeEventListener("abort",l);const e=new c;n(e),s&&s.destroy(e)};if(o){if(o.aborted)return void n(new c);o.addEventListener("abort",l)}const u=+e.port||443,d=t=>{o&&o.removeEventListener("abort",l),t instanceof c||(a(`connecting to ${e.hostname}:${u} failed with: ${t.message}`),n(t))};s=i.connect(u,e.hostname,t),s.once("secureConnect",(()=>{o&&o.removeEventListener("abort",l),s.off("error",d),S+=1,s.id=S,s.secureConnecting=!1,a(`established TLS connection: #${s.id} (${s.servername})`),r(s)})),s.once("error",d)}));e.exports={request:async(e,t,r)=>{const i=new URL(t),s={...T,...r||{}};let c;if("string"==typeof s.method&&(s.method=s.method.toUpperCase()),s.headers=(e=>{const t={};return Object.keys(e).forEach((r=>{t[r.toLowerCase()]=e[r]})),t})(s.headers||{}),void 0===s.headers.host&&(s.headers.host=i.host),e.userAgent&&void 0===s.headers["user-agent"]&&(s.headers["user-agent"]=e.userAgent),s.body instanceof URLSearchParams)c="application/x-www-form-urlencoded; charset=utf-8",s.body=s.body.toString();else if(h(s.body)){const e=new f(s.body);c=e.contentType(),s.body=e.stream(),void 0===s.headers["transfer-encoding"]&&void 0===s.headers["content-length"]&&(s.headers["content-length"]=String(e.length()))}else"string"==typeof s.body||s.body instanceof String?c="text/plain; charset=utf-8":p(s.body)?(s.body=JSON.stringify(s.body),c="application/json"):o(s.body)&&(s.body=Buffer.from(s.body));void 0===s.headers["content-type"]&&void 0!==c&&(s.headers["content-type"]=c),null!=s.body&&(s.body instanceof n||("string"==typeof s.body||s.body instanceof String||Buffer.isBuffer(s.body)||(s.body=String(s.body)),void 0===s.headers["transfer-encoding"]&&void 0===s.headers["content-length"]&&(s.headers["content-length"]=String(Buffer.isBuffer(s.body)?s.body.length:Buffer.byteLength(s.body,"utf-8"))))),void 0===s.headers.accept&&(s.headers.accept="*/*"),null==s.body&&["POST","PUT"].includes(s.method)&&(s.headers["content-length"]="0"),s.compress&&void 0===s.headers["accept-encoding"]&&(s.headers["accept-encoding"]="gzip,deflate,br");const{signal:d}=s,{protocol:g,socket:b=null}=e.socketFactory?await(async(e,t,r,n)=>{const i="https:"===t.protocol;let o;o=t.port?t.port:i?443:80;const s={...r,host:t.host,port:o},a=await e(s);if(i){const e={...s,ALPNProtocols:n};e.socket=a;const r=await k(t,e);return{protocol:r.alpnProtocol||_,socket:r}}return{protocol:a.alpnProtocol||_,socket:a}})(e.socketFactory,i,s,e.alpnProtocols):await(async(e,t,r)=>{const n=`${t.protocol}//${t.host}`;let i=e.alpnCache.get(n);if(i)return{protocol:i};switch(t.protocol){case"http:":return i=_,e.alpnCache.set(n,i),{protocol:i};case"http2:":return i=y,e.alpnCache.set(n,i),{protocol:i};case"https:":break;default:throw new TypeError(`unsupported protocol: ${t.protocol}`)}const{options:{rejectUnauthorized:o,h1:s={},h2:a={}}}=e,c=!(!1===o||!1===s.rejectUnauthorized||!1===a.rejectUnauthorized),l={servername:t.hostname,ALPNProtocols:e.alpnProtocols,signal:r,rejectUnauthorized:c},u=await(async(e,t)=>{let r=await x.acquire(e.origin);try{return r||(r=await k(e,t)),r}finally{x.release(e.origin,r)}})(t,l);return i=u.alpnProtocol,i||(i=_),e.alpnCache.set(n,i),{protocol:i,socket:u}})(e,i,d);switch(a(`${i.host} -> ${g}`),g){case m:try{return await u.request(e,i,b?{...s,socket:b}:s)}catch(t){const{code:r,message:n}=t;throw"ERR_HTTP2_ERROR"===r&&"Protocol error"===n&&e.alpnCache.delete(`${i.protocol}//${i.host}`),t}case y:return u.request(e,new URL(`http://${i.host}${i.pathname}${i.hash}${i.search}`),b?{...s,socket:b}:s);case v:case _:return l.request(e,i,b?{...s,socket:b}:s);default:throw new TypeError(`unsupported protocol: ${g}`)}},setupContext:e=>{const{options:{alpnProtocols:t=C,alpnCacheTTL:r=w,alpnCacheSize:n=b,userAgent:i=E,socketFactory:o}}=e;e.alpnProtocols=t,e.alpnCache=new s({max:n,ttl:r}),e.userAgent=i,e.socketFactory=o,l.setupContext(e),u.setupContext(e)},resetContext:async e=>(e.alpnCache.clear(),Promise.all([l.resetContext(e),u.resetContext(e)])),RequestAbortedError:c,ALPN_HTTP2:m,ALPN_HTTP2C:y,ALPN_HTTP1_1:_,ALPN_HTTP1_0:v}},64346:(e,t,r)=>{"use strict";const{EventEmitter:n}=r(82361),i=Symbol("AbortSignal internals");class o{constructor(){this[i]={eventEmitter:new n,onabort:null,aborted:!1}}get aborted(){return this[i].aborted}get onabort(){return this[i].onabort}set onabort(e){this[i].onabort=e}get[Symbol.toStringTag](){return this.constructor.name}removeEventListener(e,t){this[i].eventEmitter.removeListener(e,t)}addEventListener(e,t){this[i].eventEmitter.on(e,t)}dispatchEvent(e){const t={type:e,target:this},r=`on${e}`;"function"==typeof this[i][r]&&this[r](t),this[i].eventEmitter.emit(e,t)}fire(){this[i].aborted=!0,this.dispatchEvent("abort")}}Object.defineProperties(o.prototype,{addEventListener:{enumerable:!0},removeEventListener:{enumerable:!0},dispatchEvent:{enumerable:!0},aborted:{enumerable:!0},onabort:{enumerable:!0}});class s extends o{constructor(e){if(!Number.isInteger(e))throw new TypeError("Expected an integer, got "+typeof e);super(),this[i].timerId=setTimeout((()=>{this.fire()}),e)}clear(){clearTimeout(this[i].timerId)}}Object.defineProperties(s.prototype,{clear:{enumerable:!0}});const a=Symbol("AbortController internals");class c{constructor(){this[a]={signal:new o}}get signal(){return this[a].signal}get[Symbol.toStringTag](){return this.constructor.name}abort(){this[a].signal.aborted||this[a].signal.fire()}}Object.defineProperties(c.prototype,{signal:{enumerable:!0},abort:{enumerable:!0}}),e.exports={AbortController:c,AbortSignal:o,TimeoutSignal:s}},54214:(e,t,r)=>{"use strict";const{PassThrough:n,Readable:i}=r(12781),{types:{isAnyArrayBuffer:o}}=r(73837),{FetchError:s,FetchBaseError:a}=r(2501),{streamToBuffer:c}=r(45591),l=Buffer.alloc(0),u=Symbol("Body internals"),d=async e=>{if(e[u].disturbed)throw new TypeError("Already read");if(e[u].error)throw new TypeError(`Stream had error: ${e[u].error.message}`);e[u].disturbed=!0;const{stream:t}=e[u];return null===t?l:c(t)};class p{constructor(e){let t;t=null==e?null:e instanceof URLSearchParams?i.from(e.toString()):e instanceof i?e:Buffer.isBuffer(e)?i.from(e):o(e)?i.from(Buffer.from(e)):"string"==typeof e||e instanceof String?i.from(e):i.from(String(e)),this[u]={stream:t,disturbed:!1,error:null},e instanceof i&&t.on("error",(e=>{const t=e instanceof a?e:new s(`Invalid response body while trying to fetch ${this.url}: ${e.message}`,"system",e);this[u].error=t}))}get body(){return this[u].stream}get bodyUsed(){return this[u].disturbed}async buffer(){return d(this)}async arrayBuffer(){return(e=await this.buffer()).buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);var e}async text(){return(await d(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}}),e.exports={Body:p,cloneStream:e=>{if(e[u].disturbed)throw new TypeError("Cannot clone: already read");const{stream:t}=e[u];let r=t;if(t instanceof i){r=new n;const i=new n;t.pipe(r),t.pipe(i),e[u].stream=i}return r},guessContentType:e=>null===e?null:"string"==typeof e?"text/plain; charset=utf-8":e instanceof URLSearchParams?"application/x-www-form-urlencoded; charset=utf-8":Buffer.isBuffer(e)||o(e)||e instanceof i?null:"text/plain; charset=utf-8"}},98941:(e,t,r)=>{"use strict";const{Readable:n}=r(12781),{Headers:i}=r(48226),{Response:o}=r(28327),s=Symbol("CacheableResponse internals");class a extends o{constructor(e,t){super(e,t);const r=new i(t.headers);this[s]={headers:r,bufferedBody:e}}get headers(){return this[s].headers}set headers(e){if(!(e instanceof i))throw new TypeError("instance of Headers expected");this[s].headers=e}get body(){return n.from(this[s].bufferedBody)}get bodyUsed(){return!1}async buffer(){return this[s].bufferedBody}async arrayBuffer(){return(e=this[s].bufferedBody).buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);var e}async text(){return this[s].bufferedBody.toString()}async json(){return JSON.parse(await this.text())}clone(){const{url:e,status:t,statusText:r,headers:n,httpVersion:i,decoded:o,counter:c}=this;return new a(this[s].bufferedBody,{url:e,status:t,statusText:r,headers:n,httpVersion:i,decoded:o,counter:c})}get[Symbol.toStringTag](){return this.constructor.name}}e.exports={cacheableResponse:async e=>{const t=await e.buffer(),{url:r,status:n,statusText:i,headers:o,httpVersion:s,decoded:c,counter:l}=e;return new a(t,{url:r,status:n,statusText:i,headers:o,httpVersion:s,decoded:c,counter:l})}}},2501:e=>{"use strict";class t extends Error{constructor(e,t){super(e),this.type=t}get name(){return this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}}e.exports={FetchBaseError:t,FetchError:class extends t{constructor(e,t,r){super(e,t),r&&(this.code=this.errno=r.code,this.erroredSysCall=r.syscall)}},AbortError:class extends t{constructor(e,t="aborted"){super(e,t)}}}},48226:(e,t,r)=>{"use strict";const{validateHeaderName:n,validateHeaderValue:i}=r(13685),{isPlainObject:o}=r(45591),s=Symbol("Headers internals"),a=e=>{const t="string"!=typeof e?String(e):e;if("function"==typeof n)n(t);else if(!/^[\^`\-\w!#$%&'*+.|~]+$/.test(t)){const e=new TypeError(`Header name must be a valid HTTP token [${t}]`);throw Object.defineProperty(e,"code",{value:"ERR_INVALID_HTTP_TOKEN"}),e}return t.toLowerCase()},c=(e,t)=>{const r="string"!=typeof e?String(e):e;if("function"==typeof i)i(t,r);else if(/[^\t\u0020-\u007E\u0080-\u00FF]/.test(r)){const e=new TypeError(`Invalid character in header content ["${t}"]`);throw Object.defineProperty(e,"code",{value:"ERR_INVALID_CHAR"}),e}return r};class l{constructor(e={}){if(this[s]={map:new Map},e instanceof l)e.forEach(((e,t)=>{this.append(t,e)}));else if(Array.isArray(e))e.forEach((([e,t])=>{this.append(e,t)}));else if(o(e))for(const[t,r]of Object.entries(e))this.append(t,r)}set(e,t){this[s].map.set(a(e),c(t,e))}has(e){return this[s].map.has(a(e))}get(e){const t=this[s].map.get(a(e));return void 0===t?null:t}append(e,t){const r=a(e),n=c(t,e),i=this[s].map.get(r);this[s].map.set(r,i?`${i}, ${n}`:n)}delete(e){this[s].map.delete(a(e))}forEach(e,t){for(const r of this.keys())e.call(t,this.get(r),r)}keys(){return Array.from(this[s].map.keys()).sort()}*values(){for(const e of this.keys())yield this.get(e)}*entries(){for(const e of this.keys())yield[e,this.get(e)]}[Symbol.iterator](){return this.entries()}get[Symbol.toStringTag](){return this.constructor.name}plain(){return Object.fromEntries(this[s].map)}}Object.defineProperties(l.prototype,["append","delete","entries","forEach","get","has","keys","set","values"].reduce(((e,t)=>(e[t]={enumerable:!0},e)),{})),e.exports={Headers:l}},14735:(e,t,r)=>{"use strict";const{EventEmitter:n}=r(82361),{Readable:i}=r(12781),o=r(41241)("helix-fetch"),s=r(39941),{Body:a}=r(54214),{Headers:c}=r(48226),{Request:l}=r(93505),{Response:u}=r(28327),{FetchBaseError:d,FetchError:p,AbortError:h}=r(2501),{AbortController:f,AbortSignal:g,TimeoutSignal:m}=r(64346),y=r(7619),{cacheableResponse:v}=r(98941),{sizeof:_}=r(45591),{isFormData:b}=r(86029),{context:w,RequestAbortedError:C}=r(44673),E=["GET","HEAD"],T="push",S=async(e,t,r)=>{const{request:n}=e.context,o=t instanceof l&&void 0===r?t:new l(t,r),{method:s,body:a,signal:d,compress:f,decode:g,follow:m,redirect:y,init:{body:v}}=o;let _;if(d&&d.aborted){const e=new h("The operation was aborted.");throw o.init.body instanceof i&&o.init.body.destroy(e),e}try{_=await n(o.url,{...r,method:s,headers:o.headers.plain(),body:!v||v instanceof i||b(v)?a:v,compress:f,decode:g,follow:m,redirect:y,signal:d})}catch(e){if(v instanceof i&&v.destroy(e),e instanceof TypeError)throw e;if(e instanceof C)throw new h("The operation was aborted.");throw new p(e.message,"system",e)}const w=()=>{d.removeEventListener("abort",w);const e=new h("The operation was aborted.");o.init.body instanceof i&&o.init.body.destroy(e),_.readable.emit("error",e)};d&&d.addEventListener("abort",w);const{statusCode:E,statusText:T,httpVersion:x,headers:k,readable:I,decoded:A}=_;if([301,302,303,307,308].includes(E)){const{location:t}=k,r=null==t?null:new URL(t,o.url);switch(o.redirect){case"manual":break;case"error":throw d&&d.removeEventListener("abort",w),new p(`uri requested responds with a redirect, redirect mode is set to 'error': ${o.url}`,"no-redirect");case"follow":{if(null===r)break;if(o.counter>=o.follow)throw d&&d.removeEventListener("abort",w),new p(`maximum redirect reached at: ${o.url}`,"max-redirect");const t={headers:new c(o.headers),follow:o.follow,compress:o.compress,decode:o.decode,counter:o.counter+1,method:o.method,body:o.body,signal:o.signal};if(303!==E&&o.body&&o.init.body instanceof i)throw d&&d.removeEventListener("abort",w),new p("Cannot follow redirect with body being a readable stream","unsupported-redirect");return 303!==E&&(301!==E&&302!==E||"POST"!==o.method)||(t.method="GET",t.body=void 0,t.headers.delete("content-length")),d&&d.removeEventListener("abort",w),S(e,new l(r,t))}}}return d&&(I.once("end",(()=>{d.removeEventListener("abort",w)})),I.once("error",(()=>{d.removeEventListener("abort",w)}))),new u(I,{url:o.url,status:E,statusText:T,headers:k,httpVersion:x,decoded:A,counter:o.counter})},x=async(e,t,r)=>{if(0===e.options.maxCacheSize)return r;if(!E.includes(t.method))return r;const n=new y(t,r,{shared:!1});if(n.storable()){const i=await v(r);return e.cache.set(t.url,{policy:n,response:i},n.timeToLive()),i}return r},k=(e,t={})=>{const r=new URL(e);if("object"!=typeof t||Array.isArray(t))throw new TypeError("qs: object expected");return Object.entries(t).forEach((([e,t])=>{Array.isArray(t)?t.forEach((t=>r.searchParams.append(e,t))):r.searchParams.append(e,t)})),r.href},I=e=>new m(e);class A{constructor(e){this.options={...e};const{maxCacheSize:t}=this.options;let r="number"==typeof t&&t>=0?t:104857600,i=500;0===r&&(r=1,i=1),this.cache=new s({max:i,maxSize:r,sizeCalculation:({response:e},t)=>_(e)}),this.eventEmitter=new n,this.options.h2=this.options.h2||{},void 0===this.options.h2.enablePush&&(this.options.h2.enablePush=!0);const{enablePush:o}=this.options.h2;o&&(this.options.h2.pushPromiseHandler=(e,t,r)=>{const n={...t};Object.keys(n).filter((e=>e.startsWith(":"))).forEach((e=>delete n[e])),this.pushPromiseHandler(e,n,r)},this.options.h2.pushHandler=(e,t,r)=>{const n={...t};Object.keys(n).filter((e=>e.startsWith(":"))).forEach((e=>delete n[e]));const{statusCode:i,statusText:o,httpVersion:s,headers:a,readable:c,decoded:l}=r;this.pushHandler(e,n,new u(c,{url:e,status:i,statusText:o,headers:a,httpVersion:s,decoded:l}))}),this.context=w(this.options)}api(){return{fetch:async(e,t)=>this.fetch(e,t),Body:a,Headers:c,Request:l,Response:u,AbortController:f,AbortSignal:g,FetchBaseError:d,FetchError:p,AbortError:h,context:(e={})=>new A(e).api(),noCache:(e={})=>new A({...e,maxCacheSize:0}).api(),h1:(e={})=>new A({...e,alpnProtocols:[this.context.ALPN_HTTP1_1]}).api(),keepAlive:(e={})=>new A({...e,alpnProtocols:[this.context.ALPN_HTTP1_1],h1:{keepAlive:!0}}).api(),h1NoCache:(e={})=>new A({...e,maxCacheSize:0,alpnProtocols:[this.context.ALPN_HTTP1_1]}).api(),keepAliveNoCache:(e={})=>new A({...e,maxCacheSize:0,alpnProtocols:[this.context.ALPN_HTTP1_1],h1:{keepAlive:!0}}).api(),reset:async()=>this.context.reset(),onPush:e=>this.onPush(e),offPush:e=>this.offPush(e),createUrl:k,timeoutSignal:I,clearCache:()=>this.clearCache(),cacheStats:()=>this.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(e,t){return(async(e,t,r)=>{const n=new l(t,r);if(0!==e.options.maxCacheSize&&E.includes(n.method)&&!["no-store","reload"].includes(n.cache)){const{policy:t,response:r}=e.cache.get(n.url)||{};if(t&&t.satisfiesWithoutRevalidation(n)){r.headers=new c(t.responseHeaders(r));const e=r.clone();return e.fromCache=!0,e}}const i=await S(e,n);return"no-store"!==n.cache?x(e,n,i):i})(this,e,t)}onPush(e){return this.eventEmitter.on(T,e)}offPush(e){return this.eventEmitter.off(T,e)}clearCache(){this.cache.clear()}cacheStats(){return{size:this.cache.calculatedSize,count:this.cache.size}}pushPromiseHandler(e,t,r){o(`received server push promise: ${e}, headers: ${JSON.stringify(t)}`);const n=new l(e,{headers:t}),{policy:i}=this.cache.get(e)||{};i&&i.satisfiesWithoutRevalidation(n)&&(o(`already cached, reject push promise: ${e}, headers: ${JSON.stringify(t)}`),r())}async pushHandler(e,t,r){o(`caching resource pushed by server: ${e}, reqHeaders: ${JSON.stringify(t)}, status: ${r.status}, respHeaders: ${JSON.stringify(r.headers)}`);const n=await x(this,new l(e,{headers:t}),r);this.eventEmitter.emit(T,e,n)}}e.exports=(new A).api()},7619:(e,t,r)=>{"use strict";const n=r(13573),{Headers:i}=r(48226),o=e=>({url:e.url,method:e.method,headers:e.headers.plain()}),s=e=>({status:e.status,headers:e.headers.plain()});e.exports=class{constructor(e,t,r){this.policy=new n(o(e),s(t),r)}storable(){return this.policy.storable()}satisfiesWithoutRevalidation(e){return this.policy.satisfiesWithoutRevalidation(o(e))}responseHeaders(e){return new i(this.policy.responseHeaders(s(e)))}timeToLive(){return this.policy.timeToLive()}}},93505:(e,t,r)=>{"use strict";const{AbortSignal:n}=r(64346),{Body:i,cloneStream:o,guessContentType:s}=r(54214),{Headers:a}=r(48226),{isPlainObject:c}=r(45591),{isFormData:l,FormDataSerializer:u}=r(86029),d=Symbol("Request internals");class p extends i{constructor(e,t={}){const r=e instanceof p?e:null,i=r?new URL(r.url):new URL(e);let h=t.method||r&&r.method||"GET";if(h=h.toUpperCase(),(null!=t.body||r&&null!==r.body)&&["GET","HEAD"].includes(h))throw new TypeError("Request with GET/HEAD method cannot have body");let f=t.body||(r&&r.body?o(r):null);const g=new a(t.headers||r&&r.headers||{});if(l(f)&&!g.has("content-type")){const e=new u(f);f=e.stream(),g.set("content-type",e.contentType()),g.has("transfer-encoding")||g.has("content-length")||g.set("content-length",e.length())}if(!g.has("content-type"))if(c(f))f=JSON.stringify(f),g.set("content-type","application/json");else{const e=s(f);e&&g.set("content-type",e)}super(f);let m=r?r.signal:null;if("signal"in t&&(m=t.signal),m&&!(m instanceof n))throw new TypeError("signal needs to be an instance of AbortSignal");const y=t.redirect||r&&r.redirect||"follow";if(!["follow","error","manual"].includes(y))throw new TypeError(`'${y}' is not a valid redirect option`);const v=t.cache||r&&r.cache||"default";if(!["default","no-store","reload","no-cache","force-cache","only-if-cached"].includes(v))throw new TypeError(`'${v}' is not a valid cache option`);this[d]={init:{...t},method:h,redirect:y,cache:v,headers:g,parsedURL:i,signal:m},void 0===t.follow?r&&void 0!==r.follow?this.follow=r.follow:this.follow=20:this.follow=t.follow,this.counter=t.counter||r&&r.counter||0,void 0===t.compress?r&&void 0!==r.compress?this.compress=r.compress:this.compress=!0:this.compress=t.compress,void 0===t.decode?r&&void 0!==r.decode?this.decode=r.decode:this.decode=!0:this.decode=t.decode}get method(){return this[d].method}get url(){return this[d].parsedURL.toString()}get headers(){return this[d].headers}get redirect(){return this[d].redirect}get cache(){return this[d].cache}get signal(){return this[d].signal}clone(){return new p(this)}get init(){return this[d].init}get[Symbol.toStringTag](){return this.constructor.name}}Object.defineProperties(p.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},cache:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0}}),e.exports={Request:p}},28327:(e,t,r)=>{"use strict";const{Body:n,cloneStream:i,guessContentType:o}=r(54214),{Headers:s}=r(48226),{isPlainObject:a}=r(45591),{isFormData:c,FormDataSerializer:l}=r(86029),u=Symbol("Response internals");class d extends n{constructor(e=null,t={}){const r=new s(t.headers);let n=e;if(c(n)&&!r.has("content-type")){const e=new l(n);n=e.stream(),r.set("content-type",e.contentType()),r.has("transfer-encoding")||r.has("content-length")||r.set("content-length",e.length())}if(null!==n&&!r.has("content-type"))if(a(n))n=JSON.stringify(n),r.set("content-type","application/json");else{const e=o(n);e&&r.set("content-type",e)}super(n),this[u]={url:t.url,status:t.status||200,statusText:t.statusText||"",headers:r,httpVersion:t.httpVersion,decoded:t.decoded,counter:t.counter}}get url(){return this[u].url||""}get status(){return this[u].status}get statusText(){return this[u].statusText}get ok(){return this[u].status>=200&&this[u].status<300}get redirected(){return this[u].counter>0}get headers(){return this[u].headers}get httpVersion(){return this[u].httpVersion}get decoded(){return this[u].decoded}static redirect(e,t=302){if(![301,302,303,307,308].includes(t))throw new RangeError("Invalid status code");return new d(null,{headers:{location:new URL(e).toString()},status:t})}clone(){if(this.bodyUsed)throw new TypeError("Cannot clone: already read");return new d(i(this),{...this[u]})}get[Symbol.toStringTag](){return this.constructor.name}}Object.defineProperties(d.prototype,{url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}}),e.exports={Response:d}},98606:(e,t,r)=>{"use strict";e.exports=r(14735)},11240:(e,t,r)=>{const n=r(95687),i=r(60325);if("darwin"!==process.platform)e.exports.all=()=>[],e.exports.each=()=>{};else{const t=r(32081),o=/(?=-----BEGIN\sCERTIFICATE-----)/g,s="/System/Library/Keychains/SystemRootCertificates.keychain",a=["find-certificate","-a","-p"],c=t.spawnSync("/usr/bin/security",a).stdout.toString().split(o),l=t.spawnSync("/usr/bin/security",a.concat(s)).stdout.toString().split(o);n.globalAgent.options.ca=n.globalAgent.options.ca||[];const u=n.globalAgent.options.ca,d=c.concat(l);d.filter((function(e,t,r){return r.indexOf(e)===t})).forEach((e=>u.push(e))),e.exports.der2=i.validFormats,e.exports.all=function(e){return d.map(i.transform(e)).filter((e=>e))},e.exports.each=function(e,t){return"function"==typeof e&&(t=e,e=void 0),d.map(i.transform(e)).filter((e=>e)).forEach(t)}}},60325:(e,t,r)=>{const n=r(35758),i=r(84821);var o=e.exports.validFormats={der:0,pem:1,txt:2,asn1:3};function s(e){const t=n.pki.pemToDer(e),r=n.asn1,i=r.fromDer(t.data.toString("binary")).value[0].value,o=i[0],s=o.tagClass===r.Class.CONTEXT_SPECIFIC&&0===o.type&&o.constructed,a=i.slice(s);return{serial:a[0],issuer:a[2],valid:a[3],subject:a[4]}}e.exports.transform=function(e){return function(t){try{switch(e){case o.der:return n.pki.pemToDer(t);case o.pem:return t;case o.txt:return function(e){const t=s(e),r=new Date,n=t.subject.value.map((e=>e.value[0].value[1].value)).join("/"),o=t.valid.value.map((e=>e.value)).join(" - "),a=r.toTimeString().replace(/\s*\(.*\)\s*/,"");return[`Subject\t${n}`,`Valid\t${o}`,`Saved\t${r.toLocaleDateString()} ${a} by ${i.name}@${i.version}`,String(e)].join("\n")}(t);case o.asn1:return s(t);default:return n.pki.certificateFromPem(t)}}catch(e){return}}}},892:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Type=t.TypeBuilder=t.Modifier=t.Hint=t.Kind=void 0,t.Kind=Symbol.for("TypeBox.Kind"),t.Hint=Symbol.for("TypeBox.Hint"),t.Modifier=Symbol.for("TypeBox.Modifier");let r=0;class n{ReadonlyOptional(e){return{[t.Modifier]:"ReadonlyOptional",...e}}Readonly(e){return{[t.Modifier]:"Readonly",...e}}Optional(e){return{[t.Modifier]:"Optional",...e}}Any(e={}){return this.Create({...e,[t.Kind]:"Any"})}Array(e,r={}){return this.Create({...r,[t.Kind]:"Array",type:"array",items:e})}Boolean(e={}){return this.Create({...e,[t.Kind]:"Boolean",type:"boolean"})}ConstructorParameters(e,t={}){return this.Tuple([...e.parameters],{...t})}Constructor(e,r,n={}){if("Tuple"===e[t.Kind]){const i=void 0===e.items?[]:e.items;return this.Create({...n,[t.Kind]:"Constructor",type:"object",instanceOf:"Constructor",parameters:i,returns:r})}if(globalThis.Array.isArray(e))return this.Create({...n,[t.Kind]:"Constructor",type:"object",instanceOf:"Constructor",parameters:e,returns:r});throw new Error("TypeBuilder.Constructor: Invalid parameters")}Date(e={}){return this.Create({...e,[t.Kind]:"Date",type:"object",instanceOf:"Date"})}Enum(e,r={}){const n=Object.keys(e).filter((e=>isNaN(e))).map((t=>e[t])).map((e=>"string"==typeof e?{[t.Kind]:"Literal",type:"string",const:e}:{[t.Kind]:"Literal",type:"number",const:e}));return this.Create({...r,[t.Kind]:"Union",[t.Hint]:"Enum",anyOf:n})}Function(e,r,n={}){if("Tuple"===e[t.Kind]){const i=void 0===e.items?[]:e.items;return this.Create({...n,[t.Kind]:"Function",type:"object",instanceOf:"Function",parameters:i,returns:r})}if(globalThis.Array.isArray(e))return this.Create({...n,[t.Kind]:"Function",type:"object",instanceOf:"Function",parameters:e,returns:r});throw new Error("TypeBuilder.Function: Invalid parameters")}InstanceType(e,t={}){return{...t,...this.Clone(e.returns)}}Integer(e={}){return this.Create({...e,[t.Kind]:"Integer",type:"integer"})}Intersect(e,r={}){const n=e=>e[t.Modifier]&&"Optional"===e[t.Modifier]||"ReadonlyOptional"===e[t.Modifier],[i,o]=[new Set,new Set];for(const t of e)for(const[e,r]of Object.entries(t.properties))n(r)&&o.add(e);for(const t of e)for(const e of Object.keys(t.properties))o.has(e)||i.add(e);const s={};for(const r of e)for(const[e,n]of Object.entries(r.properties))s[e]=void 0===s[e]?n:{[t.Kind]:"Union",anyOf:[s[e],{...n}]};return i.size>0?this.Create({...r,[t.Kind]:"Object",type:"object",properties:s,required:[...i]}):this.Create({...r,[t.Kind]:"Object",type:"object",properties:s})}KeyOf(e,r={}){const n=Object.keys(e.properties).map((e=>this.Create({...r,[t.Kind]:"Literal",type:"string",const:e})));return this.Create({...r,[t.Kind]:"Union",[t.Hint]:"KeyOf",anyOf:n})}Literal(e,r={}){return this.Create({...r,[t.Kind]:"Literal",const:e,type:typeof e})}Never(e={}){return this.Create({...e,[t.Kind]:"Never",allOf:[{type:"boolean",const:!1},{type:"boolean",const:!0}]})}Null(e={}){return this.Create({...e,[t.Kind]:"Null",type:"null"})}Number(e={}){return this.Create({...e,[t.Kind]:"Number",type:"number"})}Object(e,r={}){const n=Object.keys(e),i=n.filter((r=>{const n=e[r][t.Modifier];return n&&("Optional"===n||"ReadonlyOptional"===n)})),o=n.filter((e=>!i.includes(e)));return o.length>0?this.Create({...r,[t.Kind]:"Object",type:"object",properties:e,required:o}):this.Create({...r,[t.Kind]:"Object",type:"object",properties:e})}Omit(e,r,n={}){const i="Union"===r[t.Kind]?r.anyOf.map((e=>e.const)):r,o={...this.Clone(e),...n,[t.Hint]:"Omit"};o.required&&(o.required=o.required.filter((e=>!i.includes(e))),0===o.required.length&&delete o.required);for(const e of Object.keys(o.properties))i.includes(e)&&delete o.properties[e];return this.Create(o)}Parameters(e,r={}){return t.Type.Tuple(e.parameters,{...r})}Partial(e,r={}){const n={...this.Clone(e),...r,[t.Hint]:"Partial"};delete n.required;for(const e of Object.keys(n.properties)){const r=n.properties[e];switch(r[t.Modifier]){case"ReadonlyOptional":case"Readonly":r[t.Modifier]="ReadonlyOptional";break;default:r[t.Modifier]="Optional"}}return this.Create(n)}Pick(e,r,n={}){const i="Union"===r[t.Kind]?r.anyOf.map((e=>e.const)):r,o={...this.Clone(e),...n,[t.Hint]:"Pick"};o.required&&(o.required=o.required.filter((e=>i.includes(e))),0===o.required.length&&delete o.required);for(const e of Object.keys(o.properties))i.includes(e)||delete o.properties[e];return this.Create(o)}Promise(e,r={}){return this.Create({...r,[t.Kind]:"Promise",type:"object",instanceOf:"Promise",item:e})}Record(e,r,n={}){if("Union"===e[t.Kind])return this.Object(e.anyOf.reduce(((e,t)=>({...e,[t.const]:r})),{}),{...n,[t.Hint]:"Record"});const i=["Integer","Number"].includes(e[t.Kind])?"^(0|[1-9][0-9]*)$":"String"===e[t.Kind]&&e.pattern?e.pattern:"^.*$";return this.Create({...n,[t.Kind]:"Record",type:"object",patternProperties:{[i]:r},additionalProperties:!1})}Recursive(e,n={}){void 0===n.$id&&(n.$id="T"+r++);const i=e({[t.Kind]:"Self",$ref:`${n.$id}`});return i.$id=n.$id,this.Create({...n,...i})}Ref(e,r={}){if(void 0===e.$id)throw Error("TypeBuilder.Ref: Referenced schema must specify an $id");return this.Create({...r,[t.Kind]:"Ref",$ref:e.$id})}RegEx(e,r={}){return this.Create({...r,[t.Kind]:"String",type:"string",pattern:e.source})}Required(e,r={}){const n={...this.Clone(e),...r,[t.Hint]:"Required"};n.required=Object.keys(n.properties);for(const e of Object.keys(n.properties)){const r=n.properties[e];switch(r[t.Modifier]){case"ReadonlyOptional":case"Readonly":r[t.Modifier]="Readonly";break;default:delete r[t.Modifier]}}return this.Create(n)}ReturnType(e,t={}){return{...t,...this.Clone(e.returns)}}Strict(e){return JSON.parse(JSON.stringify(e))}String(e={}){return this.Create({...e,[t.Kind]:"String",type:"string"})}Tuple(e,r={}){const n=e.length,i=e.length,o=e.length>0?{...r,[t.Kind]:"Tuple",type:"array",items:e,additionalItems:!1,minItems:n,maxItems:i}:{...r,[t.Kind]:"Tuple",type:"array",minItems:n,maxItems:i};return this.Create(o)}Undefined(e={}){return this.Create({...e,[t.Kind]:"Undefined",type:"null",typeOf:"Undefined"})}Union(e,r={}){return 0===e.length?t.Type.Never({...r}):this.Create({...r,[t.Kind]:"Union",anyOf:e})}Uint8Array(e={}){return this.Create({...e,[t.Kind]:"Uint8Array",type:"object",instanceOf:"Uint8Array"})}Unknown(e={}){return this.Create({...e,[t.Kind]:"Unknown"})}Unsafe(e={}){return this.Create({...e,[t.Kind]:e[t.Kind]||"Unsafe"})}Void(e={}){return this.Create({...e,[t.Kind]:"Void",type:"null",typeOf:"Void"})}Create(e){return e}Clone(e){return"object"!=typeof(t=e)||null===t||Array.isArray(t)?(e=>"object"==typeof e&&null!==e&&Array.isArray(e))(e)?e.map((e=>this.Clone(e))):e:Object.keys(e).reduce(((t,r)=>({...t,[r]:this.Clone(e[r])})),Object.getOwnPropertySymbols(e).reduce(((t,r)=>({...t,[r]:this.Clone(e[r])})),{}));var t}}t.TypeBuilder=n,t.Type=new n},86236:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const n=r(38355),i=r(35671),o=r(30002),s=r(31512),a=["/properties"],c="http://json-schema.org/draft-07/schema";class l extends n.default{_addVocabularies(){super._addVocabularies(),i.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(s,a):s;this.addMetaSchema(e,c,!1),this.refs["http://json-schema.org/schema"]=c}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}}e.exports=t=l,Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var u=r(91686);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var d=r(15669);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return d._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return d.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return d.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return d.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return d.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return d.CodeGen}})},66545:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class r{}t._CodeOrName=r,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends r{constructor(e){if(super(),!t.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=n;class i extends r{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce(((e,t)=>`${e}${t}`),"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce(((e,t)=>(t instanceof n&&(e[t.str]=(e[t.str]||0)+1),e)),{})}}function o(e,...t){const r=[e[0]];let n=0;for(;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const n=r(66545),i=r(59187);var o=r(66545);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return o._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return o.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return o.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return o.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return o.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return o.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return o.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return o.Name}});var s=r(59187);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return s.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return s.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return s.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return s.varKinds}}),t.operators={GT:new n._Code(">"),GTE:new n._Code(">="),LT:new n._Code("<"),LTE:new n._Code("<="),EQ:new n._Code("==="),NEQ:new n._Code("!=="),NOT:new n._Code("!"),OR:new n._Code("||"),AND:new n._Code("&&"),ADD:new n._Code("+")};class a{optimizeNodes(){return this}optimizeNames(e,t){return this}}class c extends a{constructor(e,t,r){super(),this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){const r=e?i.varKinds.var:this.varKind,n=void 0===this.rhs?"":` = ${this.rhs}`;return`${r} ${this.name}${n};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=R(this.rhs,e,t)),this}get names(){return this.rhs instanceof n._CodeOrName?this.rhs.names:{}}}class l extends a{constructor(e,t,r){super(),this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof n.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=R(this.rhs,e,t),this}get names(){return P(this.lhs instanceof n.Name?{}:{...this.lhs.names},this.rhs)}}class u extends l{constructor(e,t,r,n){super(e,r,n),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class d extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class p extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class h extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class f extends a{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=R(this.code,e,t),this}get names(){return this.code instanceof n._CodeOrName?this.code.names:{}}}class g extends a{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce(((t,r)=>t+r.render(e)),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;for(;t--;){const r=e[t].optimizeNodes();Array.isArray(r)?e.splice(t,1,...r):r?e[t]=r:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){const{nodes:r}=this;let n=r.length;for(;n--;){const i=r[n];i.optimizeNames(e,t)||(N(e,i.names),r.splice(n,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce(((e,t)=>A(e,t.names)),{})}}class m extends g{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class y extends g{}class v extends m{}v.kind="else";class _ extends m{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new v(e):e}return t?!1===e?t instanceof _?t:t.nodes:this.nodes.length?this:new _(O(e),t instanceof _?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var r;if(this.else=null===(r=this.else)||void 0===r?void 0:r.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=R(this.condition,e,t),this}get names(){const e=super.names;return P(e,this.condition),this.else&&A(e,this.else.names),e}}_.kind="if";class b extends m{}b.kind="for";class w extends b{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=R(this.iteration,e,t),this}get names(){return A(super.names,this.iteration.names)}}class C extends b{constructor(e,t,r,n){super(),this.varKind=e,this.name=t,this.from=r,this.to=n}render(e){const t=e.es5?i.varKinds.var:this.varKind,{name:r,from:n,to:o}=this;return`for(${t} ${r}=${n}; ${r}<${o}; ${r}++)`+super.render(e)}get names(){const e=P(super.names,this.from);return P(e,this.to)}}class E extends b{constructor(e,t,r,n){super(),this.loop=e,this.varKind=t,this.name=r,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=R(this.iterable,e,t),this}get names(){return A(super.names,this.iterable.names)}}class T extends m{constructor(e,t,r){super(),this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}T.kind="func";class S extends g{render(e){return"return "+super.render(e)}}S.kind="return";class x extends m{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(e,t){var r,n;return super.optimizeNames(e,t),null===(r=this.catch)||void 0===r||r.optimizeNames(e,t),null===(n=this.finally)||void 0===n||n.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&A(e,this.catch.names),this.finally&&A(e,this.finally.names),e}}class k extends m{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}k.kind="catch";class I extends m{render(e){return"finally"+super.render(e)}}function A(e,t){for(const r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function P(e,t){return t instanceof n._CodeOrName?A(e,t.names):e}function R(e,t,r){return e instanceof n.Name?o(e):(i=e)instanceof n._Code&&i._items.some((e=>e instanceof n.Name&&1===t[e.str]&&void 0!==r[e.str]))?new n._Code(e._items.reduce(((e,t)=>(t instanceof n.Name&&(t=o(t)),t instanceof n._Code?e.push(...t._items):e.push(t),e)),[])):e;var i;function o(e){const n=r[e.str];return void 0===n||1!==t[e.str]?e:(delete t[e.str],n)}}function N(e,t){for(const r in t)e[r]=(e[r]||0)-(t[r]||0)}function O(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:n._`!${B(e)}`}I.kind="finally",t.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new i.Scope({parent:e}),this._nodes=[new y]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,n){const i=this._scope.toName(t);return void 0!==r&&n&&(this._constants[i.str]=r),this._leafNode(new c(e,i,r)),i}const(e,t,r){return this._def(i.varKinds.const,e,t,r)}let(e,t,r){return this._def(i.varKinds.let,e,t,r)}var(e,t,r){return this._def(i.varKinds.var,e,t,r)}assign(e,t,r){return this._leafNode(new l(e,t,r))}add(e,r){return this._leafNode(new u(e,t.operators.ADD,r))}code(e){return"function"==typeof e?e():e!==n.nil&&this._leafNode(new f(e)),this}object(...e){const t=["{"];for(const[r,i]of e)t.length>1&&t.push(","),t.push(r),(r!==i||this.opts.es5)&&(t.push(":"),(0,n.addCodeArg)(t,i));return t.push("}"),new n._Code(t)}if(e,t,r){if(this._blockNode(new _(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new _(e))}else(){return this._elseNode(new v)}endIf(){return this._endBlockNode(_,v)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new w(e),t)}forRange(e,t,r,n,o=(this.opts.es5?i.varKinds.var:i.varKinds.let)){const s=this._scope.toName(e);return this._for(new C(o,s,t,r),(()=>n(s)))}forOf(e,t,r,o=i.varKinds.const){const s=this._scope.toName(e);if(this.opts.es5){const e=t instanceof n.Name?t:this.var("_arr",t);return this.forRange("_i",0,n._`${e}.length`,(t=>{this.var(s,n._`${e}[${t}]`),r(s)}))}return this._for(new E("of",o,s,t),(()=>r(s)))}forIn(e,t,r,o=(this.opts.es5?i.varKinds.var:i.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,n._`Object.keys(${t})`,r);const s=this._scope.toName(e);return this._for(new E("in",o,s,t),(()=>r(s)))}endFor(){return this._endBlockNode(b)}label(e){return this._leafNode(new d(e))}break(e){return this._leafNode(new p(e))}return(e){const t=new S;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(S)}try(e,t,r){if(!t&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');const n=new x;if(this._blockNode(n),this.code(e),t){const e=this.name("e");this._currNode=n.catch=new k(e),t(e)}return r&&(this._currNode=n.finally=new I,this.code(r)),this._endBlockNode(k,I)}throw(e){return this._leafNode(new h(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){const t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");const r=this._nodes.length-t;if(r<0||void 0!==e&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=n.nil,r,i){return this._blockNode(new T(e,t,r)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(T)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){const r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof _))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},t.not=O;const L=M(t.operators.AND);t.and=function(...e){return e.reduce(L)};const D=M(t.operators.OR);function M(e){return(t,r)=>t===n.nil?r:r===n.nil?t:n._`${B(t)} ${e} ${B(r)}`}function B(e){return e instanceof n.Name?e:n._`(${e})`}t.or=function(...e){return e.reduce(D)}},59187:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const n=r(66545);class i extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var o;!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(o=t.UsedValueState||(t.UsedValueState={})),t.varKinds={const:new n.Name("const"),let:new n.Name("let"),var:new n.Name("var")};class s{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof n.Name?e:this.name(e)}name(e){return new n.Name(this._newName(e))}_newName(e){return`${e}${(this._names[e]||this._nameGroup(e)).index++}`}_nameGroup(e){var t,r;if((null===(r=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===r?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}t.Scope=s;class a extends n.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:r}){this.value=e,this.scopePath=n._`.${new n.Name(t)}[${r}]`}}t.ValueScopeName=a;const c=n._`\n`;t.ValueScope=class extends s{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?c:n.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){var r;if(void 0===t.ref)throw new Error("CodeGen: ref must be passed in value");const n=this.toName(e),{prefix:i}=n,o=null!==(r=t.key)&&void 0!==r?r:t.ref;let s=this._values[i];if(s){const e=s.get(o);if(e)return e}else s=this._values[i]=new Map;s.set(o,n);const a=this._scope[i]||(this._scope[i]=[]),c=a.length;return a[c]=t.ref,n.setValue(t,{property:i,itemIndex:c}),n}getValue(e,t){const r=this._values[e];if(r)return r.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(t=>{if(void 0===t.scopePath)throw new Error(`CodeGen: name "${t}" has no value`);return n._`${e}${t.scopePath}`}))}scopeCode(e=this._values,t,r){return this._reduceValues(e,(e=>{if(void 0===e.value)throw new Error(`CodeGen: name "${e}" has no value`);return e.value.code}),t,r)}_reduceValues(e,r,s={},a){let c=n.nil;for(const l in e){const u=e[l];if(!u)continue;const d=s[l]=s[l]||new Map;u.forEach((e=>{if(d.has(e))return;d.set(e,o.Started);let s=r(e);if(s){const r=this.opts.es5?t.varKinds.var:t.varKinds.const;c=n._`${c}${r} ${e} = ${s};${this.opts._n}`}else{if(!(s=null==a?void 0:a(e)))throw new i(e);c=n._`${c}${s}${this.opts._n}`}d.set(e,o.Completed)}))}return c}}},6930:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const n=r(15669),i=r(88936),o=r(17250);function s(e,t){const r=e.const("err",t);e.if(n._`${o.default.vErrors} === null`,(()=>e.assign(o.default.vErrors,n._`[${r}]`)),n._`${o.default.vErrors}.push(${r})`),e.code(n._`${o.default.errors}++`)}function a(e,t){const{gen:r,validateName:i,schemaEnv:o}=e;o.$async?r.throw(n._`new ${e.ValidationError}(${t})`):(r.assign(n._`${i}.errors`,t),r.return(!1))}t.keywordError={message:({keyword:e})=>n.str`must pass "${e}" keyword validation`},t.keyword$DataError={message:({keyword:e,schemaType:t})=>t?n.str`"${e}" keyword must be ${t} ($data)`:n.str`"${e}" keyword is invalid ($data)`},t.reportError=function(e,r=t.keywordError,i,o){const{it:c}=e,{gen:u,compositeRule:d,allErrors:p}=c,h=l(e,r,i);(null!=o?o:d||p)?s(u,h):a(c,n._`[${h}]`)},t.reportExtraError=function(e,r=t.keywordError,n){const{it:i}=e,{gen:c,compositeRule:u,allErrors:d}=i;s(c,l(e,r,n)),u||d||a(i,o.default.vErrors)},t.resetErrorsCount=function(e,t){e.assign(o.default.errors,t),e.if(n._`${o.default.vErrors} !== null`,(()=>e.if(t,(()=>e.assign(n._`${o.default.vErrors}.length`,t)),(()=>e.assign(o.default.vErrors,null)))))},t.extendErrors=function({gen:e,keyword:t,schemaValue:r,data:i,errsCount:s,it:a}){if(void 0===s)throw new Error("ajv implementation error");const c=e.name("err");e.forRange("i",s,o.default.errors,(s=>{e.const(c,n._`${o.default.vErrors}[${s}]`),e.if(n._`${c}.instancePath === undefined`,(()=>e.assign(n._`${c}.instancePath`,(0,n.strConcat)(o.default.instancePath,a.errorPath)))),e.assign(n._`${c}.schemaPath`,n.str`${a.errSchemaPath}/${t}`),a.opts.verbose&&(e.assign(n._`${c}.schema`,r),e.assign(n._`${c}.data`,i))}))};const c={keyword:new n.Name("keyword"),schemaPath:new n.Name("schemaPath"),params:new n.Name("params"),propertyName:new n.Name("propertyName"),message:new n.Name("message"),schema:new n.Name("schema"),parentSchema:new n.Name("parentSchema")};function l(e,t,r){const{createErrors:i}=e.it;return!1===i?n._`{}`:function(e,t,r={}){const{gen:i,it:s}=e,a=[u(s,r),d(e,r)];return function(e,{params:t,message:r},i){const{keyword:s,data:a,schemaValue:l,it:u}=e,{opts:d,propertyName:p,topSchemaRef:h,schemaPath:f}=u;i.push([c.keyword,s],[c.params,"function"==typeof t?t(e):t||n._`{}`]),d.messages&&i.push([c.message,"function"==typeof r?r(e):r]),d.verbose&&i.push([c.schema,l],[c.parentSchema,n._`${h}${f}`],[o.default.data,a]),p&&i.push([c.propertyName,p])}(e,t,a),i.object(...a)}(e,t,r)}function u({errorPath:e},{instancePath:t}){const r=t?n.str`${e}${(0,i.getErrorPath)(t,i.Type.Str)}`:e;return[o.default.instancePath,(0,n.strConcat)(o.default.instancePath,r)]}function d({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:o}){let s=o?t:n.str`${t}/${e}`;return r&&(s=n.str`${s}${(0,i.getErrorPath)(r,i.Type.Str)}`),[c.schemaPath,s]}},87382:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;const n=r(15669),i=r(46448),o=r(17250),s=r(96696),a=r(88936),c=r(91686);class l{constructor(e){var t;let r;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!==(t=e.baseId)&&void 0!==t?t:(0,s.normalizeId)(null==r?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==r?void 0:r.$async,this.refs={}}}function u(e){const t=p.call(this,e);if(t)return t;const r=(0,s.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:a,lines:l}=this.opts.code,{ownProperties:u}=this.opts,d=new n.CodeGen(this.scope,{es5:a,lines:l,ownProperties:u});let h;e.$async&&(h=d.scopeValue("Error",{ref:i.default,code:n._`require("ajv/dist/runtime/validation_error").default`}));const f=d.scopeName("validate");e.validateName=f;const g={gen:d,allErrors:this.opts.allErrors,data:o.default.data,parentData:o.default.parentData,parentDataProperty:o.default.parentDataProperty,dataNames:[o.default.data],dataPathArr:[n.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:d.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,n.stringify)(e.schema)}:{ref:e.schema}),validateName:f,ValidationError:h,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:n.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:n._`""`,opts:this.opts,self:this};let m;try{this._compilations.add(e),(0,c.validateFunctionCode)(g),d.optimize(this.opts.code.optimize);const t=d.toString();m=`${d.scopeRefs(o.default.scope)}return ${t}`,this.opts.code.process&&(m=this.opts.code.process(m,e));const r=new Function(`${o.default.self}`,`${o.default.scope}`,m)(this,this.scope.get());if(this.scope.value(f,{ref:r}),r.errors=null,r.schema=e.schema,r.schemaEnv=e,e.$async&&(r.$async=!0),!0===this.opts.code.source&&(r.source={validateName:f,validateCode:t,scopeValues:d._values}),this.opts.unevaluated){const{props:e,items:t}=g;r.evaluated={props:e instanceof n.Name?void 0:e,items:t instanceof n.Name?void 0:t,dynamicProps:e instanceof n.Name,dynamicItems:t instanceof n.Name},r.source&&(r.source.evaluated=(0,n.stringify)(r.evaluated))}return e.validate=r,e}catch(t){throw delete e.validate,delete e.validateName,m&&this.logger.error("Error compiling schema, function code:",m),t}finally{this._compilations.delete(e)}}function d(e){return(0,s.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:u.call(this,e)}function p(e){for(const n of this._compilations)if(r=e,(t=n).schema===r.schema&&t.root===r.root&&t.baseId===r.baseId)return n;var t,r}function h(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||f.call(this,e,t)}function f(e,t){const r=this.opts.uriResolver.parse(t),n=(0,s._getFullPath)(this.opts.uriResolver,r);let i=(0,s.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===i)return m.call(this,r,e);const o=(0,s.normalizeId)(n),a=this.refs[o]||this.schemas[o];if("string"==typeof a){const t=f.call(this,e,a);if("object"!=typeof(null==t?void 0:t.schema))return;return m.call(this,r,t)}if("object"==typeof(null==a?void 0:a.schema)){if(a.validate||u.call(this,a),o===(0,s.normalizeId)(t)){const{schema:t}=a,{schemaId:r}=this.opts,n=t[r];return n&&(i=(0,s.resolveUrl)(this.opts.uriResolver,i,n)),new l({schema:t,schemaId:r,root:e,baseId:i})}return m.call(this,r,a)}}t.SchemaEnv=l,t.compileSchema=u,t.resolveRef=function(e,t,r){var n;r=(0,s.resolveUrl)(this.opts.uriResolver,t,r);const i=e.refs[r];if(i)return i;let o=h.call(this,e,r);if(void 0===o){const i=null===(n=e.localRefs)||void 0===n?void 0:n[r],{schemaId:s}=this.opts;i&&(o=new l({schema:i,schemaId:s,root:e,baseId:t}))}return void 0!==o?e.refs[r]=d.call(this,o):void 0},t.getCompilingSchema=p,t.resolveSchema=f;const g=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function m(e,{baseId:t,schema:r,root:n}){var i;if("/"!==(null===(i=e.fragment)||void 0===i?void 0:i[0]))return;for(const n of e.fragment.slice(1).split("/")){if("boolean"==typeof r)return;const e=r[(0,a.unescapeFragment)(n)];if(void 0===e)return;const i="object"==typeof(r=e)&&r[this.opts.schemaId];!g.has(n)&&i&&(t=(0,s.resolveUrl)(this.opts.uriResolver,t,i))}let o;if("boolean"!=typeof r&&r.$ref&&!(0,a.schemaHasRulesButRef)(r,this.RULES)){const e=(0,s.resolveUrl)(this.opts.uriResolver,t,r.$ref);o=f.call(this,n,e)}const{schemaId:c}=this.opts;return o=o||new l({schema:r,schemaId:c,root:n,baseId:t}),o.schema!==o.root.schema?o:void 0}},17250:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(15669),i={data:new n.Name("data"),valCxt:new n.Name("valCxt"),instancePath:new n.Name("instancePath"),parentData:new n.Name("parentData"),parentDataProperty:new n.Name("parentDataProperty"),rootData:new n.Name("rootData"),dynamicAnchors:new n.Name("dynamicAnchors"),vErrors:new n.Name("vErrors"),errors:new n.Name("errors"),this:new n.Name("this"),self:new n.Name("self"),scope:new n.Name("scope"),json:new n.Name("json"),jsonPos:new n.Name("jsonPos"),jsonLen:new n.Name("jsonLen"),jsonPart:new n.Name("jsonPart")};t.default=i},91578:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(96696);class i extends Error{constructor(e,t,r,i){super(i||`can't resolve reference ${r} from id ${t}`),this.missingRef=(0,n.resolveUrl)(e,t,r),this.missingSchema=(0,n.normalizeId)((0,n.getFullPath)(e,this.missingRef))}}t.default=i},96696:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;const n=r(88936),i=r(66471),o=r(25127),s=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);t.inlineRef=function(e,t=!0){return"boolean"==typeof e||(!0===t?!c(e):!!t&&l(e)<=t)};const a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function c(e){for(const t in e){if(a.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(c))return!0;if("object"==typeof r&&c(r))return!0}return!1}function l(e){let t=0;for(const r in e){if("$ref"===r)return 1/0;if(t++,!s.has(r)&&("object"==typeof e[r]&&(0,n.eachItem)(e[r],(e=>t+=l(e))),t===1/0))return 1/0}return t}function u(e,t="",r){!1!==r&&(t=h(t));const n=e.parse(t);return d(e,n)}function d(e,t){return e.serialize(t).split("#")[0]+"#"}t.getFullPath=u,t._getFullPath=d;const p=/#\/?$/;function h(e){return e?e.replace(p,""):""}t.normalizeId=h,t.resolveUrl=function(e,t,r){return r=h(r),e.resolve(t,r)};const f=/^[a-z_][-a-z0-9._]*$/i;t.getSchemaRefs=function(e,t){if("boolean"==typeof e)return{};const{schemaId:r,uriResolver:n}=this.opts,s=h(e[r]||t),a={"":s},c=u(n,s,!1),l={},d=new Set;return o(e,{allKeys:!0},((e,t,n,i)=>{if(void 0===i)return;const o=c+t;let s=a[i];function u(t){const r=this.opts.uriResolver.resolve;if(t=h(s?r(s,t):t),d.has(t))throw g(t);d.add(t);let n=this.refs[t];return"string"==typeof n&&(n=this.refs[n]),"object"==typeof n?p(e,n.schema,t):t!==h(o)&&("#"===t[0]?(p(e,l[t],t),l[t]=e):this.refs[t]=o),t}function m(e){if("string"==typeof e){if(!f.test(e))throw new Error(`invalid anchor "${e}"`);u.call(this,`#${e}`)}}"string"==typeof e[r]&&(s=u.call(this,e[r])),m.call(this,e.$anchor),m.call(this,e.$dynamicAnchor),a[t]=s})),l;function p(e,t,r){if(void 0!==t&&!i(e,t))throw g(r)}function g(e){return new Error(`reference "${e}" resolves to more than one schema`)}}},82881:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;const r=new Set(["string","number","integer","boolean","null","object","array"]);t.isJSONType=function(e){return"string"==typeof e&&r.has(e)},t.getRules=function(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}},88936:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;const n=r(15669),i=r(66545);function o(e,t=e.schema){const{opts:r,self:n}=e;if(!r.strictSchema)return;if("boolean"==typeof t)return;const i=n.RULES.keywords;for(const r in t)i[r]||f(e,`unknown keyword: "${r}"`)}function s(e,t){if("boolean"==typeof e)return!e;for(const r in e)if(t[r])return!0;return!1}function a(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function c(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function l({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:i}){return(o,s,a,c)=>{const l=void 0===a?s:a instanceof n.Name?(s instanceof n.Name?e(o,s,a):t(o,s,a),a):s instanceof n.Name?(t(o,a,s),s):r(s,a);return c!==n.Name||l instanceof n.Name?l:i(o,l)}}function u(e,t){if(!0===t)return e.var("props",!0);const r=e.var("props",n._`{}`);return void 0!==t&&d(e,r,t),r}function d(e,t,r){Object.keys(r).forEach((r=>e.assign(n._`${t}${(0,n.getProperty)(r)}`,!0)))}t.toHash=function(e){const t={};for(const r of e)t[r]=!0;return t},t.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(o(e,t),!s(t,e.self.RULES.all))},t.checkUnknownRules=o,t.schemaHasRules=s,t.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(const r in e)if("$ref"!==r&&t.all[r])return!0;return!1},t.schemaRefOrVal=function({topSchemaRef:e,schemaPath:t},r,i,o){if(!o){if("number"==typeof r||"boolean"==typeof r)return r;if("string"==typeof r)return n._`${r}`}return n._`${e}${t}${(0,n.getProperty)(i)}`},t.unescapeFragment=function(e){return c(decodeURIComponent(e))},t.escapeFragment=function(e){return encodeURIComponent(a(e))},t.escapeJsonPointer=a,t.unescapeJsonPointer=c,t.eachItem=function(e,t){if(Array.isArray(e))for(const r of e)t(r);else t(e)},t.mergeEvaluated={props:l({mergeNames:(e,t,r)=>e.if(n._`${r} !== true && ${t} !== undefined`,(()=>{e.if(n._`${t} === true`,(()=>e.assign(r,!0)),(()=>e.assign(r,n._`${r} || {}`).code(n._`Object.assign(${r}, ${t})`)))})),mergeToName:(e,t,r)=>e.if(n._`${r} !== true`,(()=>{!0===t?e.assign(r,!0):(e.assign(r,n._`${r} || {}`),d(e,r,t))})),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:u}),items:l({mergeNames:(e,t,r)=>e.if(n._`${r} !== true && ${t} !== undefined`,(()=>e.assign(r,n._`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`))),mergeToName:(e,t,r)=>e.if(n._`${r} !== true`,(()=>e.assign(r,!0===t||n._`${r} > ${t} ? ${r} : ${t}`))),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},t.evaluatedPropsToName=u,t.setEvaluated=d;const p={};var h;function f(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,!0===r)throw new Error(t);e.self.logger.warn(t)}}t.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:p[t.code]||(p[t.code]=new i._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(h=t.Type||(t.Type={})),t.getErrorPath=function(e,t,r){if(e instanceof n.Name){const i=t===h.Num;return r?i?n._`"[" + ${e} + "]"`:n._`"['" + ${e} + "']"`:i?n._`"/" + ${e}`:n._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,n.getProperty)(e).toString():"/"+a(e)},t.checkStrictMode=f},89073:(e,t)=>{"use strict";function r(e,t){return t.rules.some((t=>n(e,t)))}function n(e,t){var r;return void 0!==e[t.keyword]||(null===(r=t.definition.implements)||void 0===r?void 0:r.some((t=>void 0!==e[t])))}Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0,t.schemaHasRulesForType=function({schema:e,self:t},n){const i=t.RULES.types[n];return i&&!0!==i&&r(e,i)},t.shouldUseGroup=r,t.shouldUseRule=n},12171:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;const n=r(6930),i=r(15669),o=r(17250),s={message:"boolean schema is false"};function a(e,t){const{gen:r,data:i}=e,o={gen:r,keyword:"false schema",data:i,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,n.reportError)(o,s,void 0,t)}t.topBoolOrEmptySchema=function(e){const{gen:t,schema:r,validateName:n}=e;!1===r?a(e,!1):"object"==typeof r&&!0===r.$async?t.return(o.default.data):(t.assign(i._`${n}.errors`,null),t.return(!0))},t.boolOrEmptySchema=function(e,t){const{gen:r,schema:n}=e;!1===n?(r.var(t,!1),a(e)):r.var(t,!0)}},97332:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;const n=r(82881),i=r(89073),o=r(6930),s=r(15669),a=r(88936);var c;function l(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(n.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}!function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"}(c=t.DataType||(t.DataType={})),t.getSchemaTypes=function(e){const t=l(e.type);if(t.includes("null")){if(!1===e.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw new Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},t.getJSONTypes=l,t.coerceAndCheckDataType=function(e,t){const{gen:r,data:n,opts:o}=e,a=function(e,t){return t?e.filter((e=>u.has(e)||"array"===t&&"array"===e)):[]}(t,o.coerceTypes),l=t.length>0&&!(0===a.length&&1===t.length&&(0,i.schemaHasRulesForType)(e,t[0]));if(l){const i=p(t,n,o.strictNumbers,c.Wrong);r.if(i,(()=>{a.length?function(e,t,r){const{gen:n,data:i,opts:o}=e,a=n.let("dataType",s._`typeof ${i}`),c=n.let("coerced",s._`undefined`);"array"===o.coerceTypes&&n.if(s._`${a} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,(()=>n.assign(i,s._`${i}[0]`).assign(a,s._`typeof ${i}`).if(p(t,i,o.strictNumbers),(()=>n.assign(c,i))))),n.if(s._`${c} !== undefined`);for(const e of r)(u.has(e)||"array"===e&&"array"===o.coerceTypes)&&l(e);function l(e){switch(e){case"string":return void n.elseIf(s._`${a} == "number" || ${a} == "boolean"`).assign(c,s._`"" + ${i}`).elseIf(s._`${i} === null`).assign(c,s._`""`);case"number":return void n.elseIf(s._`${a} == "boolean" || ${i} === null || (${a} == "string" && ${i} && ${i} == +${i})`).assign(c,s._`+${i}`);case"integer":return void n.elseIf(s._`${a} === "boolean" || ${i} === null || (${a} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(c,s._`+${i}`);case"boolean":return void n.elseIf(s._`${i} === "false" || ${i} === 0 || ${i} === null`).assign(c,!1).elseIf(s._`${i} === "true" || ${i} === 1`).assign(c,!0);case"null":return n.elseIf(s._`${i} === "" || ${i} === 0 || ${i} === false`),void n.assign(c,null);case"array":n.elseIf(s._`${a} === "string" || ${a} === "number" - || ${a} === "boolean" || ${i} === null`).assign(c,s._`[${i}]`)}}n.else(),f(e),n.endIf(),n.if(s._`${c} !== undefined`,(()=>{n.assign(i,c),function({gen:e,parentData:t,parentDataProperty:r},n){e.if(s._`${t} !== undefined`,(()=>e.assign(s._`${t}[${r}]`,n)))}(e,c)}))}(e,t,a):f(e)}))}return l};const u=new Set(["string","number","integer","boolean","null"]);function d(e,t,r,n=c.Correct){const i=n===c.Correct?s.operators.EQ:s.operators.NEQ;let o;switch(e){case"null":return s._`${t} ${i} null`;case"array":o=s._`Array.isArray(${t})`;break;case"object":o=s._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":o=a(s._`!(${t} % 1) && !isNaN(${t})`);break;case"number":o=a();break;default:return s._`typeof ${t} ${i} ${e}`}return n===c.Correct?o:(0,s.not)(o);function a(e=s.nil){return(0,s.and)(s._`typeof ${t} == "number"`,e,r?s._`isFinite(${t})`:s.nil)}}function p(e,t,r,n){if(1===e.length)return d(e[0],t,r,n);let i;const o=(0,a.toHash)(e);if(o.array&&o.object){const e=s._`typeof ${t} != "object"`;i=o.null?e:s._`!${t} || ${e}`,delete o.null,delete o.array,delete o.object}else i=s.nil;o.number&&delete o.integer;for(const e in o)i=(0,s.and)(i,d(e,t,r,n));return i}t.checkDataType=d,t.checkDataTypes=p;const h={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?s._`{type: ${e}}`:s._`{type: ${t}}`};function f(e){const t=function(e){const{gen:t,data:r,schema:n}=e,i=(0,a.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:e}}(e);(0,o.reportError)(t,h)}t.reportTypeError=f},91481:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;const n=r(15669),i=r(88936);function o(e,t,r){const{gen:o,compositeRule:s,data:a,opts:c}=e;if(void 0===r)return;const l=n._`${a}${(0,n.getProperty)(t)}`;if(s)return void(0,i.checkStrictMode)(e,`default is ignored for: ${l}`);let u=n._`${l} === undefined`;"empty"===c.useDefaults&&(u=n._`${u} || ${l} === null || ${l} === ""`),o.if(u,n._`${l} = ${(0,n.stringify)(r)}`)}t.assignDefaults=function(e,t){const{properties:r,items:n}=e.schema;if("object"===t&&r)for(const t in r)o(e,t,r[t].default);else"array"===t&&Array.isArray(n)&&n.forEach(((t,r)=>o(e,r,t.default)))}},91686:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const n=r(12171),i=r(97332),o=r(89073),s=r(97332),a=r(91481),c=r(95782),l=r(38878),u=r(15669),d=r(17250),p=r(96696),h=r(88936),f=r(6930);function g({gen:e,validateName:t,schema:r,schemaEnv:n,opts:i},o){i.code.es5?e.func(t,u._`${d.default.data}, ${d.default.valCxt}`,n.$async,(()=>{e.code(u._`"use strict"; ${m(r,i)}`),function(e,t){e.if(d.default.valCxt,(()=>{e.var(d.default.instancePath,u._`${d.default.valCxt}.${d.default.instancePath}`),e.var(d.default.parentData,u._`${d.default.valCxt}.${d.default.parentData}`),e.var(d.default.parentDataProperty,u._`${d.default.valCxt}.${d.default.parentDataProperty}`),e.var(d.default.rootData,u._`${d.default.valCxt}.${d.default.rootData}`),t.dynamicRef&&e.var(d.default.dynamicAnchors,u._`${d.default.valCxt}.${d.default.dynamicAnchors}`)}),(()=>{e.var(d.default.instancePath,u._`""`),e.var(d.default.parentData,u._`undefined`),e.var(d.default.parentDataProperty,u._`undefined`),e.var(d.default.rootData,d.default.data),t.dynamicRef&&e.var(d.default.dynamicAnchors,u._`{}`)}))}(e,i),e.code(o)})):e.func(t,u._`${d.default.data}, ${function(e){return u._`{${d.default.instancePath}="", ${d.default.parentData}, ${d.default.parentDataProperty}, ${d.default.rootData}=${d.default.data}${e.dynamicRef?u._`, ${d.default.dynamicAnchors}={}`:u.nil}}={}`}(i)}`,n.$async,(()=>e.code(m(r,i)).code(o)))}function m(e,t){const r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?u._`/*# sourceURL=${r} */`:u.nil}function y({schema:e,self:t}){if("boolean"==typeof e)return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function v(e){return"boolean"!=typeof e.schema}function _(e){(0,h.checkUnknownRules)(e),function(e){const{schema:t,errSchemaPath:r,opts:n,self:i}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,h.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function b(e,t){if(e.opts.jtd)return C(e,[],!1,t);const r=(0,i.getSchemaTypes)(e.schema);C(e,r,!(0,i.coerceAndCheckDataType)(e,r),t)}function w({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:i}){const o=r.$comment;if(!0===i.$comment)e.code(u._`${d.default.self}.logger.log(${o})`);else if("function"==typeof i.$comment){const r=u.str`${n}/$comment`,i=e.scopeValue("root",{ref:t.root});e.code(u._`${d.default.self}.opts.$comment(${o}, ${r}, ${i}.schema)`)}}function C(e,t,r,n){const{gen:i,schema:a,data:c,allErrors:l,opts:p,self:f}=e,{RULES:g}=f;function m(h){(0,o.shouldUseGroup)(a,h)&&(h.type?(i.if((0,s.checkDataType)(h.type,c,p.strictNumbers)),E(e,h),1===t.length&&t[0]===h.type&&r&&(i.else(),(0,s.reportTypeError)(e)),i.endIf()):E(e,h),l||i.if(u._`${d.default.errors} === ${n||0}`))}!a.$ref||!p.ignoreKeywordsWithRef&&(0,h.schemaHasRulesButRef)(a,g)?(p.jtd||function(e,t){!e.schemaEnv.meta&&e.opts.strictTypes&&(function(e,t){t.length&&(e.dataTypes.length?(t.forEach((t=>{T(e.dataTypes,t)||S(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),e.dataTypes=e.dataTypes.filter((e=>T(t,e)))):e.dataTypes=t)}(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&S(e,"use allowUnionTypes to allow union type keyword")}(e,t),function(e,t){const r=e.self.RULES.all;for(const n in r){const i=r[n];if("object"==typeof i&&(0,o.shouldUseRule)(e.schema,i)){const{type:r}=i.definition;r.length&&!r.some((e=>{return n=e,(r=t).includes(n)||"number"===n&&r.includes("integer");var r,n}))&&S(e,`missing type "${r.join(",")}" for keyword "${n}"`)}}}(e,e.dataTypes))}(e,t),i.block((()=>{for(const e of g.rules)m(e);m(g.post)}))):i.block((()=>k(e,"$ref",g.all.$ref.definition)))}function E(e,t){const{gen:r,schema:n,opts:{useDefaults:i}}=e;i&&(0,a.assignDefaults)(e,t.type),r.block((()=>{for(const r of t.rules)(0,o.shouldUseRule)(n,r)&&k(e,r.keyword,r.definition,t.type)}))}function T(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function S(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,h.checkStrictMode)(e,t,e.opts.strictTypes)}t.validateFunctionCode=function(e){v(e)&&(_(e),y(e))?function(e){const{schema:t,opts:r,gen:n}=e;g(e,(()=>{r.$comment&&t.$comment&&w(e),function(e){const{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,h.checkStrictMode)(e,"default is ignored in the schema root")}(e),n.let(d.default.vErrors,null),n.let(d.default.errors,0),r.unevaluated&&function(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",u._`${r}.evaluated`),t.if(u._`${e.evaluated}.dynamicProps`,(()=>t.assign(u._`${e.evaluated}.props`,u._`undefined`))),t.if(u._`${e.evaluated}.dynamicItems`,(()=>t.assign(u._`${e.evaluated}.items`,u._`undefined`)))}(e),b(e),function(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:i,opts:o}=e;r.$async?t.if(u._`${d.default.errors} === 0`,(()=>t.return(d.default.data)),(()=>t.throw(u._`new ${i}(${d.default.vErrors})`))):(t.assign(u._`${n}.errors`,d.default.vErrors),o.unevaluated&&function({gen:e,evaluated:t,props:r,items:n}){r instanceof u.Name&&e.assign(u._`${t}.props`,r),n instanceof u.Name&&e.assign(u._`${t}.items`,n)}(e),t.return(u._`${d.default.errors} === 0`))}(e)}))}(e):g(e,(()=>(0,n.topBoolOrEmptySchema)(e)))};class x{constructor(e,t,r){if((0,c.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,h.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",P(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,c.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",d.default.errors))}result(e,t,r){this.failResult((0,u.not)(e),t,r)}failResult(e,t,r){this.gen.if(e),r?r():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,u.not)(e),void 0,t)}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail(u._`${t} !== undefined && (${(0,u.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t)return this.setParams(t),this._error(e,r),void this.setParams({});this._error(e,r)}_error(e,t){(e?f.reportExtraError:f.reportError)(this,this.def.error,t)}$dataError(){(0,f.reportError)(this,this.def.$dataError||f.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,f.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,r=u.nil){this.gen.block((()=>{this.check$data(e,r),t()}))}check$data(e=u.nil,t=u.nil){if(!this.$data)return;const{gen:r,schemaCode:n,schemaType:i,def:o}=this;r.if((0,u.or)(u._`${n} === undefined`,t)),e!==u.nil&&r.assign(e,!0),(i.length||o.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==u.nil&&r.assign(e,!1)),r.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:r,def:n,it:i}=this;return(0,u.or)(function(){if(r.length){if(!(t instanceof u.Name))throw new Error("ajv implementation error");const e=Array.isArray(r)?r:[r];return u._`${(0,s.checkDataTypes)(e,t,i.opts.strictNumbers,s.DataType.Wrong)}`}return u.nil}(),function(){if(n.validateSchema){const r=e.scopeValue("validate$data",{ref:n.validateSchema});return u._`!${r}(${t})`}return u.nil}())}subschema(e,t){const r=(0,l.getSubschema)(this.it,e);(0,l.extendSubschemaData)(r,this.it,e),(0,l.extendSubschemaMode)(r,e);const i={...this.it,...r,items:void 0,props:void 0};return function(e,t){v(e)&&(_(e),y(e))?function(e,t){const{schema:r,gen:n,opts:i}=e;i.$comment&&r.$comment&&w(e),function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,p.resolveUrl)(e.opts.uriResolver,e.baseId,t))}(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const o=n.const("_errs",d.default.errors);b(e,o),n.var(t,u._`${o} === ${d.default.errors}`)}(e,t):(0,n.boolOrEmptySchema)(e,t)}(i,t),i}mergeEvaluated(e,t){const{it:r,gen:n}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=h.mergeEvaluated.props(n,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=h.mergeEvaluated.items(n,e.items,r.items,t)))}mergeValidEvaluated(e,t){const{it:r,gen:n}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return n.if(t,(()=>this.mergeEvaluated(e,u.Name))),!0}}function k(e,t,r,n){const i=new x(e,r,t);"code"in r?r.code(i,n):i.$data&&r.validate?(0,c.funcKeywordCode)(i,r):"macro"in r?(0,c.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,c.funcKeywordCode)(i,r)}t.KeywordCxt=x;const I=/^\/(?:[^~]|~0|~1)*$/,A=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function P(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let i,o;if(""===e)return d.default.rootData;if("/"===e[0]){if(!I.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);i=e,o=d.default.rootData}else{const s=A.exec(e);if(!s)throw new Error(`Invalid JSON-pointer: ${e}`);const a=+s[1];if(i=s[2],"#"===i){if(a>=t)throw new Error(c("property/index",a));return n[t-a]}if(a>t)throw new Error(c("data",a));if(o=r[t-a],!i)return o}let s=o;const a=i.split("/");for(const e of a)e&&(o=u._`${o}${(0,u.getProperty)((0,h.unescapeJsonPointer)(e))}`,s=u._`${s} && ${o}`);return s;function c(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}t.getData=P},95782:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;const n=r(15669),i=r(17250),o=r(3499),s=r(6930);function a(e){const{gen:t,data:r,it:i}=e;t.if(i.parentData,(()=>t.assign(r,n._`${i.parentData}[${i.parentDataProperty}]`)))}function c(e,t,r){if(void 0===r)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof r?{ref:r}:{ref:r,code:(0,n.stringify)(r)})}t.macroKeywordCode=function(e,t){const{gen:r,keyword:i,schema:o,parentSchema:s,it:a}=e,l=t.macro.call(a.self,o,s,a),u=c(r,i,l);!1!==a.opts.validateSchema&&a.self.validateSchema(l,!0);const d=r.name("valid");e.subschema({schema:l,schemaPath:n.nil,errSchemaPath:`${a.errSchemaPath}/${i}`,topSchemaRef:u,compositeRule:!0},d),e.pass(d,(()=>e.error(!0)))},t.funcKeywordCode=function(e,t){var r;const{gen:l,keyword:u,schema:d,parentSchema:p,$data:h,it:f}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(f,t);const g=!h&&t.compile?t.compile.call(f.self,d,p,f):t.validate,m=c(l,u,g),y=l.let("valid");function v(r=(t.async?n._`await `:n.nil)){const s=f.opts.passContext?i.default.this:i.default.self,a=!("compile"in t&&!h||!1===t.schema);l.assign(y,n._`${r}${(0,o.callValidateCode)(e,m,s,a)}`,t.modifying)}function _(e){var r;l.if((0,n.not)(null!==(r=t.valid)&&void 0!==r?r:y),e)}e.block$data(y,(function(){if(!1===t.errors)v(),t.modifying&&a(e),_((()=>e.error()));else{const r=t.async?function(){const e=l.let("ruleErrs",null);return l.try((()=>v(n._`await `)),(t=>l.assign(y,!1).if(n._`${t} instanceof ${f.ValidationError}`,(()=>l.assign(e,n._`${t}.errors`)),(()=>l.throw(t))))),e}():function(){const e=n._`${m}.errors`;return l.assign(e,null),v(n.nil),e}();t.modifying&&a(e),_((()=>function(e,t){const{gen:r}=e;r.if(n._`Array.isArray(${t})`,(()=>{r.assign(i.default.vErrors,n._`${i.default.vErrors} === null ? ${t} : ${i.default.vErrors}.concat(${t})`).assign(i.default.errors,n._`${i.default.vErrors}.length`),(0,s.extendErrors)(e)}),(()=>e.error()))}(e,r)))}})),e.ok(null!==(r=t.valid)&&void 0!==r?r:y)},t.validSchemaType=function(e,t,r=!1){return!t.length||t.some((t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||r&&void 0===e))},t.validateKeywordUsage=function({schema:e,opts:t,self:r,errSchemaPath:n},i,o){if(Array.isArray(i.keyword)?!i.keyword.includes(o):i.keyword!==o)throw new Error("ajv implementation error");const s=i.dependencies;if(null==s?void 0:s.some((t=>!Object.prototype.hasOwnProperty.call(e,t))))throw new Error(`parent schema must have dependencies of ${o}: ${s.join(",")}`);if(i.validateSchema&&!i.validateSchema(e[o])){const e=`keyword "${o}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);r.logger.error(e)}}},38878:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;const n=r(15669),i=r(88936);t.getSubschema=function(e,{keyword:t,schemaProp:r,schema:o,schemaPath:s,errSchemaPath:a,topSchemaRef:c}){if(void 0!==t&&void 0!==o)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){const o=e.schema[t];return void 0===r?{schema:o,schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:o[r],schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}${(0,n.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,i.escapeFragment)(r)}`}}if(void 0!==o){if(void 0===s||void 0===a||void 0===c)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:o,schemaPath:s,topSchemaRef:c,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function(e,t,{dataProp:r,dataPropType:o,data:s,dataTypes:a,propertyName:c}){if(void 0!==s&&void 0!==r)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:l}=t;if(void 0!==r){const{errorPath:s,dataPathArr:a,opts:c}=t;u(l.let("data",n._`${t.data}${(0,n.getProperty)(r)}`,!0)),e.errorPath=n.str`${s}${(0,i.getErrorPath)(r,o,c.jsPropertySyntax)}`,e.parentDataProperty=n._`${r}`,e.dataPathArr=[...a,e.parentDataProperty]}function u(r){e.data=r,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,r]}void 0!==s&&(u(s instanceof n.Name?s:l.let("data",s,!0)),void 0!==c&&(e.propertyName=c)),a&&(e.dataTypes=a)},t.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:o}){void 0!==n&&(e.compositeRule=n),void 0!==i&&(e.createErrors=i),void 0!==o&&(e.allErrors=o),e.jtdDiscriminator=t,e.jtdMetadata=r}},38355:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var n=r(91686);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return n.KeywordCxt}});var i=r(15669);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return i.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return i.CodeGen}});const o=r(46448),s=r(91578),a=r(82881),c=r(87382),l=r(15669),u=r(96696),d=r(97332),p=r(88936),h=r(71143),f=r(10407),g=(e,t)=>new RegExp(e,t);g.code="new RegExp";const m=["removeAdditional","useDefaults","coerceTypes"],y=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),v={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},_={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function b(e){var t,r,n,i,o,s,a,c,l,u,d,p,h,m,y,v,_,b,w,C,E,T,S,x,k;const I=e.strict,A=null===(t=e.code)||void 0===t?void 0:t.optimize,P=!0===A||void 0===A?1:A||0,R=null!==(n=null===(r=e.code)||void 0===r?void 0:r.regExp)&&void 0!==n?n:g,N=null!==(i=e.uriResolver)&&void 0!==i?i:f.default;return{strictSchema:null===(s=null!==(o=e.strictSchema)&&void 0!==o?o:I)||void 0===s||s,strictNumbers:null===(c=null!==(a=e.strictNumbers)&&void 0!==a?a:I)||void 0===c||c,strictTypes:null!==(u=null!==(l=e.strictTypes)&&void 0!==l?l:I)&&void 0!==u?u:"log",strictTuples:null!==(p=null!==(d=e.strictTuples)&&void 0!==d?d:I)&&void 0!==p?p:"log",strictRequired:null!==(m=null!==(h=e.strictRequired)&&void 0!==h?h:I)&&void 0!==m&&m,code:e.code?{...e.code,optimize:P,regExp:R}:{optimize:P,regExp:R},loopRequired:null!==(y=e.loopRequired)&&void 0!==y?y:200,loopEnum:null!==(v=e.loopEnum)&&void 0!==v?v:200,meta:null===(_=e.meta)||void 0===_||_,messages:null===(b=e.messages)||void 0===b||b,inlineRefs:null===(w=e.inlineRefs)||void 0===w||w,schemaId:null!==(C=e.schemaId)&&void 0!==C?C:"$id",addUsedSchema:null===(E=e.addUsedSchema)||void 0===E||E,validateSchema:null===(T=e.validateSchema)||void 0===T||T,validateFormats:null===(S=e.validateFormats)||void 0===S||S,unicodeRegExp:null===(x=e.unicodeRegExp)||void 0===x||x,int32range:null===(k=e.int32range)||void 0===k||k,uriResolver:N}}class w{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...b(e)};const{es5:t,lines:r}=this.opts.code;this.scope=new l.ValueScope({scope:{},prefixes:y,es5:t,lines:r}),this.logger=function(e){if(!1===e)return I;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const n=e.validateFormats;e.validateFormats=!1,this.RULES=(0,a.getRules)(),C.call(this,v,e,"NOT SUPPORTED"),C.call(this,_,e,"DEPRECATED","warn"),this._metaOpts=k.call(this),e.formats&&S.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&x.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),T.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:r}=this.opts;let n=h;"id"===r&&(n={...h},n.id=n.$id,delete n.$id),t&&e&&this.addMetaSchema(n,n[r],!1)}defaultMeta(){const{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let r;if("string"==typeof e){if(r=this.getSchema(e),!r)throw new Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);const n=r(t);return"$async"in r||(this.errors=r.errors),n}compile(e,t){const r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:r}=this.opts;return n.call(this,e,t);async function n(e,t){await i.call(this,e.$schema);const r=this._addSchema(e,t);return r.validate||o.call(this,r)}async function i(e){e&&!this.getSchema(e)&&await n.call(this,{$ref:e},!0)}async function o(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof s.default))throw t;return a.call(this,t),await c.call(this,t.missingSchema),o.call(this,e)}}function a({missingSchema:e,missingRef:t}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function c(e){const r=await l.call(this,e);this.refs[e]||await i.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function l(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=r(e))}finally{delete this._loading[e]}}}addSchema(e,t,r,n=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,r,n);return this}let i;if("object"==typeof e){const{schemaId:t}=this.opts;if(i=e[t],void 0!==i&&"string"!=typeof i)throw new Error(`schema ${t} must be string`)}return t=(0,u.normalizeId)(t||i),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,n,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let r;if(r=e.$schema,void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const n=this.validate(r,e);if(!n&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return n}getSchema(e){let t;for(;"string"==typeof(t=E.call(this,e));)e=t;if(void 0===t){const{schemaId:r}=this.opts,n=new c.SchemaEnv({schema:{},schemaId:r});if(t=c.resolveSchema.call(this,n,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const t=E.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{const t=e;this._cache.delete(t);let r=e[this.opts.schemaId];return r&&(r=(0,u.normalizeId)(r),delete this.schemas[r],delete this.refs[r]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if("string"==typeof e)r=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r);else{if("object"!=typeof e||void 0!==t)throw new Error("invalid addKeywords parameters");if(r=(t=e).keyword,Array.isArray(r)&&!r.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(P.call(this,r,t),!t)return(0,p.eachItem)(r,(e=>R.call(this,e))),this;O.call(this,t);const n={...t,type:(0,d.getJSONTypes)(t.type),schemaType:(0,d.getJSONTypes)(t.schemaType)};return(0,p.eachItem)(r,0===n.type.length?e=>R.call(this,e,n):e=>n.type.forEach((t=>R.call(this,e,n,t)))),this}getKeyword(e){const t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const r of t.rules){const t=r.rules.findIndex((t=>t.keyword===e));t>=0&&r.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return e&&0!==e.length?e.map((e=>`${r}${e.instancePath} ${e.message}`)).reduce(((e,r)=>e+t+r)):"No errors"}$dataMetaSchema(e,t){const r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const n of t){const t=n.split("/").slice(1);let i=e;for(const e of t)i=i[e];for(const e in r){const t=r[e];if("object"!=typeof t)continue;const{$data:n}=t.definition,o=i[e];n&&o&&(i[e]=L(o))}}return e}_removeAllSchemas(e,t){for(const r in e){const n=e[r];t&&!t.test(r)||("string"==typeof n?delete e[r]:n&&!n.meta&&(this._cache.delete(n.schema),delete e[r]))}}_addSchema(e,t,r,n=this.opts.validateSchema,i=this.opts.addUsedSchema){let o;const{schemaId:s}=this.opts;if("object"==typeof e)o=e[s];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}let a=this._cache.get(e);if(void 0!==a)return a;r=(0,u.normalizeId)(o||r);const l=u.getSchemaRefs.call(this,e,r);return a=new c.SchemaEnv({schema:e,schemaId:s,meta:t,baseId:r,localRefs:l}),this._cache.set(a.schema,a),i&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=a),n&&this.validateSchema(e,!0),a}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):c.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const t=this.opts;this.opts=this._metaOpts;try{c.compileSchema.call(this,e)}finally{this.opts=t}}}function C(e,t,r,n="error"){for(const i in e){const o=i;o in t&&this.logger[n](`${r}: option ${i}. ${e[o]}`)}}function E(e){return e=(0,u.normalizeId)(e),this.schemas[e]||this.refs[e]}function T(){const e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t)}function S(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function x(e){if(Array.isArray(e))this.addVocabulary(e);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}}function k(){const e={...this.opts};for(const t of m)delete e[t];return e}t.default=w,w.ValidationError=o.default,w.MissingRefError=s.default;const I={log(){},warn(){},error(){}},A=/^[a-z_$][a-z0-9_$:-]*$/i;function P(e,t){const{RULES:r}=this;if((0,p.eachItem)(e,(e=>{if(r.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!A.test(e))throw new Error(`Keyword ${e} has invalid name`)})),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function R(e,t,r){var n;const i=null==t?void 0:t.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:o}=this;let s=i?o.post:o.rules.find((({type:e})=>e===r));if(s||(s={type:r,rules:[]},o.rules.push(s)),o.keywords[e]=!0,!t)return;const a={keyword:e,definition:{...t,type:(0,d.getJSONTypes)(t.type),schemaType:(0,d.getJSONTypes)(t.schemaType)}};t.before?N.call(this,s,a,t.before):s.rules.push(a),o.all[e]=a,null===(n=t.implements)||void 0===n||n.forEach((e=>this.addKeyword(e)))}function N(e,t,r){const n=e.rules.findIndex((e=>e.keyword===r));n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function O(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=L(t)),e.validateSchema=this.compile(t,!0))}const D={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function L(e){return{anyOf:[e,D]}}},94285:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(66471);n.code='require("ajv/dist/runtime/equal").default',t.default=n},49161:(e,t)=>{"use strict";function r(e){const t=e.length;let r,n=0,i=0;for(;i=55296&&r<=56319&&i{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(22371);n.code='require("ajv/dist/runtime/uri").default',t.default=n},46448:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}t.default=r},78891:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;const n=r(15669),i=r(88936),o={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{parentSchema:t,it:r}=e,{items:n}=t;Array.isArray(n)?s(e,n):(0,i.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas')}};function s(e,t){const{gen:r,schema:o,data:s,keyword:a,it:c}=e;c.items=!0;const l=r.const("len",n._`${s}.length`);if(!1===o)e.setParams({len:t.length}),e.pass(n._`${l} <= ${t.length}`);else if("object"==typeof o&&!(0,i.alwaysValidSchema)(c,o)){const o=r.var("valid",n._`${l} <= ${t.length}`);r.if((0,n.not)(o),(()=>function(o){r.forRange("i",t.length,l,(t=>{e.subschema({keyword:a,dataProp:t,dataPropType:i.Type.Num},o),c.allErrors||r.if((0,n.not)(o),(()=>r.break()))}))}(o))),e.ok(o)}}t.validateAdditionalItems=s,t.default=o},24943:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3499),i=r(15669),o=r(17250),s=r(88936),a={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>i._`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:t,schema:r,parentSchema:a,data:c,errsCount:l,it:u}=e;if(!l)throw new Error("ajv implementation error");const{allErrors:d,opts:p}=u;if(u.props=!0,"all"!==p.removeAdditional&&(0,s.alwaysValidSchema)(u,r))return;const h=(0,n.allSchemaProperties)(a.properties),f=(0,n.allSchemaProperties)(a.patternProperties);function g(e){t.code(i._`delete ${c}[${e}]`)}function m(n){if("all"===p.removeAdditional||p.removeAdditional&&!1===r)g(n);else{if(!1===r)return e.setParams({additionalProperty:n}),e.error(),void(d||t.break());if("object"==typeof r&&!(0,s.alwaysValidSchema)(u,r)){const r=t.name("valid");"failing"===p.removeAdditional?(y(n,r,!1),t.if((0,i.not)(r),(()=>{e.reset(),g(n)}))):(y(n,r),d||t.if((0,i.not)(r),(()=>t.break())))}}}function y(t,r,n){const i={keyword:"additionalProperties",dataProp:t,dataPropType:s.Type.Str};!1===n&&Object.assign(i,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(i,r)}t.forIn("key",c,(r=>{h.length||f.length?t.if(function(r){let o;if(h.length>8){const e=(0,s.schemaRefOrVal)(u,a.properties,"properties");o=(0,n.isOwnProperty)(t,e,r)}else o=h.length?(0,i.or)(...h.map((e=>i._`${r} === ${e}`))):i.nil;return f.length&&(o=(0,i.or)(o,...f.map((t=>i._`${(0,n.usePattern)(e,t)}.test(${r})`)))),(0,i.not)(o)}(r),(()=>m(r))):m(r)})),e.ok(i._`${l} === ${o.default.errors}`)}};t.default=a},22609:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(88936),i={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const o=t.name("valid");r.forEach(((t,r)=>{if((0,n.alwaysValidSchema)(i,t))return;const s=e.subschema({keyword:"allOf",schemaProp:r},o);e.ok(o),e.mergeEvaluated(s)}))}};t.default=i},54279:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:r(3499).validateUnion,error:{message:"must match a schema in anyOf"}};t.default=n},95609:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(15669),i=r(88936),o={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?n.str`must contain at least ${e} valid item(s)`:n.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?n._`{minContains: ${e}}`:n._`{minContains: ${e}, maxContains: ${t}}`},code(e){const{gen:t,schema:r,parentSchema:o,data:s,it:a}=e;let c,l;const{minContains:u,maxContains:d}=o;a.opts.next?(c=void 0===u?1:u,l=d):c=1;const p=t.const("len",n._`${s}.length`);if(e.setParams({min:c,max:l}),void 0===l&&0===c)return void(0,i.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==l&&c>l)return(0,i.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,i.alwaysValidSchema)(a,r)){let t=n._`${p} >= ${c}`;return void 0!==l&&(t=n._`${t} && ${p} <= ${l}`),void e.pass(t)}a.items=!0;const h=t.name("valid");function f(){const e=t.name("_valid"),r=t.let("count",0);g(e,(()=>t.if(e,(()=>function(e){t.code(n._`${e}++`),void 0===l?t.if(n._`${e} >= ${c}`,(()=>t.assign(h,!0).break())):(t.if(n._`${e} > ${l}`,(()=>t.assign(h,!1).break())),1===c?t.assign(h,!0):t.if(n._`${e} >= ${c}`,(()=>t.assign(h,!0))))}(r)))))}function g(r,n){t.forRange("i",0,p,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:i.Type.Num,compositeRule:!0},r),n()}))}void 0===l&&1===c?g(h,(()=>t.if(h,(()=>t.break())))):0===c?(t.let(h,!0),void 0!==l&&t.if(n._`${s}.length > 0`,f)):(t.let(h,!1),f()),e.result(h,(()=>e.reset()))}};t.default=o},5463:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const n=r(15669),i=r(88936),o=r(3499);t.error={message:({params:{property:e,depsCount:t,deps:r}})=>{const i=1===t?"property":"properties";return n.str`must have ${i} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:i}})=>n._`{property: ${e}, + || ${a} === "boolean" || ${i} === null`).assign(c,s._`[${i}]`)}}n.else(),f(e),n.endIf(),n.if(s._`${c} !== undefined`,(()=>{n.assign(i,c),function({gen:e,parentData:t,parentDataProperty:r},n){e.if(s._`${t} !== undefined`,(()=>e.assign(s._`${t}[${r}]`,n)))}(e,c)}))}(e,t,a):f(e)}))}return l};const u=new Set(["string","number","integer","boolean","null"]);function d(e,t,r,n=c.Correct){const i=n===c.Correct?s.operators.EQ:s.operators.NEQ;let o;switch(e){case"null":return s._`${t} ${i} null`;case"array":o=s._`Array.isArray(${t})`;break;case"object":o=s._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":o=a(s._`!(${t} % 1) && !isNaN(${t})`);break;case"number":o=a();break;default:return s._`typeof ${t} ${i} ${e}`}return n===c.Correct?o:(0,s.not)(o);function a(e=s.nil){return(0,s.and)(s._`typeof ${t} == "number"`,e,r?s._`isFinite(${t})`:s.nil)}}function p(e,t,r,n){if(1===e.length)return d(e[0],t,r,n);let i;const o=(0,a.toHash)(e);if(o.array&&o.object){const e=s._`typeof ${t} != "object"`;i=o.null?e:s._`!${t} || ${e}`,delete o.null,delete o.array,delete o.object}else i=s.nil;o.number&&delete o.integer;for(const e in o)i=(0,s.and)(i,d(e,t,r,n));return i}t.checkDataType=d,t.checkDataTypes=p;const h={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?s._`{type: ${e}}`:s._`{type: ${t}}`};function f(e){const t=function(e){const{gen:t,data:r,schema:n}=e,i=(0,a.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:e}}(e);(0,o.reportError)(t,h)}t.reportTypeError=f},91481:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;const n=r(15669),i=r(88936);function o(e,t,r){const{gen:o,compositeRule:s,data:a,opts:c}=e;if(void 0===r)return;const l=n._`${a}${(0,n.getProperty)(t)}`;if(s)return void(0,i.checkStrictMode)(e,`default is ignored for: ${l}`);let u=n._`${l} === undefined`;"empty"===c.useDefaults&&(u=n._`${u} || ${l} === null || ${l} === ""`),o.if(u,n._`${l} = ${(0,n.stringify)(r)}`)}t.assignDefaults=function(e,t){const{properties:r,items:n}=e.schema;if("object"===t&&r)for(const t in r)o(e,t,r[t].default);else"array"===t&&Array.isArray(n)&&n.forEach(((t,r)=>o(e,r,t.default)))}},91686:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const n=r(12171),i=r(97332),o=r(89073),s=r(97332),a=r(91481),c=r(95782),l=r(38878),u=r(15669),d=r(17250),p=r(96696),h=r(88936),f=r(6930);function g({gen:e,validateName:t,schema:r,schemaEnv:n,opts:i},o){i.code.es5?e.func(t,u._`${d.default.data}, ${d.default.valCxt}`,n.$async,(()=>{e.code(u._`"use strict"; ${m(r,i)}`),function(e,t){e.if(d.default.valCxt,(()=>{e.var(d.default.instancePath,u._`${d.default.valCxt}.${d.default.instancePath}`),e.var(d.default.parentData,u._`${d.default.valCxt}.${d.default.parentData}`),e.var(d.default.parentDataProperty,u._`${d.default.valCxt}.${d.default.parentDataProperty}`),e.var(d.default.rootData,u._`${d.default.valCxt}.${d.default.rootData}`),t.dynamicRef&&e.var(d.default.dynamicAnchors,u._`${d.default.valCxt}.${d.default.dynamicAnchors}`)}),(()=>{e.var(d.default.instancePath,u._`""`),e.var(d.default.parentData,u._`undefined`),e.var(d.default.parentDataProperty,u._`undefined`),e.var(d.default.rootData,d.default.data),t.dynamicRef&&e.var(d.default.dynamicAnchors,u._`{}`)}))}(e,i),e.code(o)})):e.func(t,u._`${d.default.data}, ${function(e){return u._`{${d.default.instancePath}="", ${d.default.parentData}, ${d.default.parentDataProperty}, ${d.default.rootData}=${d.default.data}${e.dynamicRef?u._`, ${d.default.dynamicAnchors}={}`:u.nil}}={}`}(i)}`,n.$async,(()=>e.code(m(r,i)).code(o)))}function m(e,t){const r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?u._`/*# sourceURL=${r} */`:u.nil}function y({schema:e,self:t}){if("boolean"==typeof e)return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function v(e){return"boolean"!=typeof e.schema}function _(e){(0,h.checkUnknownRules)(e),function(e){const{schema:t,errSchemaPath:r,opts:n,self:i}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,h.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function b(e,t){if(e.opts.jtd)return C(e,[],!1,t);const r=(0,i.getSchemaTypes)(e.schema);C(e,r,!(0,i.coerceAndCheckDataType)(e,r),t)}function w({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:i}){const o=r.$comment;if(!0===i.$comment)e.code(u._`${d.default.self}.logger.log(${o})`);else if("function"==typeof i.$comment){const r=u.str`${n}/$comment`,i=e.scopeValue("root",{ref:t.root});e.code(u._`${d.default.self}.opts.$comment(${o}, ${r}, ${i}.schema)`)}}function C(e,t,r,n){const{gen:i,schema:a,data:c,allErrors:l,opts:p,self:f}=e,{RULES:g}=f;function m(h){(0,o.shouldUseGroup)(a,h)&&(h.type?(i.if((0,s.checkDataType)(h.type,c,p.strictNumbers)),E(e,h),1===t.length&&t[0]===h.type&&r&&(i.else(),(0,s.reportTypeError)(e)),i.endIf()):E(e,h),l||i.if(u._`${d.default.errors} === ${n||0}`))}!a.$ref||!p.ignoreKeywordsWithRef&&(0,h.schemaHasRulesButRef)(a,g)?(p.jtd||function(e,t){!e.schemaEnv.meta&&e.opts.strictTypes&&(function(e,t){t.length&&(e.dataTypes.length?(t.forEach((t=>{T(e.dataTypes,t)||S(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),e.dataTypes=e.dataTypes.filter((e=>T(t,e)))):e.dataTypes=t)}(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&S(e,"use allowUnionTypes to allow union type keyword")}(e,t),function(e,t){const r=e.self.RULES.all;for(const n in r){const i=r[n];if("object"==typeof i&&(0,o.shouldUseRule)(e.schema,i)){const{type:r}=i.definition;r.length&&!r.some((e=>{return n=e,(r=t).includes(n)||"number"===n&&r.includes("integer");var r,n}))&&S(e,`missing type "${r.join(",")}" for keyword "${n}"`)}}}(e,e.dataTypes))}(e,t),i.block((()=>{for(const e of g.rules)m(e);m(g.post)}))):i.block((()=>k(e,"$ref",g.all.$ref.definition)))}function E(e,t){const{gen:r,schema:n,opts:{useDefaults:i}}=e;i&&(0,a.assignDefaults)(e,t.type),r.block((()=>{for(const r of t.rules)(0,o.shouldUseRule)(n,r)&&k(e,r.keyword,r.definition,t.type)}))}function T(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function S(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,h.checkStrictMode)(e,t,e.opts.strictTypes)}t.validateFunctionCode=function(e){v(e)&&(_(e),y(e))?function(e){const{schema:t,opts:r,gen:n}=e;g(e,(()=>{r.$comment&&t.$comment&&w(e),function(e){const{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,h.checkStrictMode)(e,"default is ignored in the schema root")}(e),n.let(d.default.vErrors,null),n.let(d.default.errors,0),r.unevaluated&&function(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",u._`${r}.evaluated`),t.if(u._`${e.evaluated}.dynamicProps`,(()=>t.assign(u._`${e.evaluated}.props`,u._`undefined`))),t.if(u._`${e.evaluated}.dynamicItems`,(()=>t.assign(u._`${e.evaluated}.items`,u._`undefined`)))}(e),b(e),function(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:i,opts:o}=e;r.$async?t.if(u._`${d.default.errors} === 0`,(()=>t.return(d.default.data)),(()=>t.throw(u._`new ${i}(${d.default.vErrors})`))):(t.assign(u._`${n}.errors`,d.default.vErrors),o.unevaluated&&function({gen:e,evaluated:t,props:r,items:n}){r instanceof u.Name&&e.assign(u._`${t}.props`,r),n instanceof u.Name&&e.assign(u._`${t}.items`,n)}(e),t.return(u._`${d.default.errors} === 0`))}(e)}))}(e):g(e,(()=>(0,n.topBoolOrEmptySchema)(e)))};class x{constructor(e,t,r){if((0,c.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,h.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",P(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,c.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",d.default.errors))}result(e,t,r){this.failResult((0,u.not)(e),t,r)}failResult(e,t,r){this.gen.if(e),r?r():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,u.not)(e),void 0,t)}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail(u._`${t} !== undefined && (${(0,u.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t)return this.setParams(t),this._error(e,r),void this.setParams({});this._error(e,r)}_error(e,t){(e?f.reportExtraError:f.reportError)(this,this.def.error,t)}$dataError(){(0,f.reportError)(this,this.def.$dataError||f.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,f.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,r=u.nil){this.gen.block((()=>{this.check$data(e,r),t()}))}check$data(e=u.nil,t=u.nil){if(!this.$data)return;const{gen:r,schemaCode:n,schemaType:i,def:o}=this;r.if((0,u.or)(u._`${n} === undefined`,t)),e!==u.nil&&r.assign(e,!0),(i.length||o.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==u.nil&&r.assign(e,!1)),r.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:r,def:n,it:i}=this;return(0,u.or)(function(){if(r.length){if(!(t instanceof u.Name))throw new Error("ajv implementation error");const e=Array.isArray(r)?r:[r];return u._`${(0,s.checkDataTypes)(e,t,i.opts.strictNumbers,s.DataType.Wrong)}`}return u.nil}(),function(){if(n.validateSchema){const r=e.scopeValue("validate$data",{ref:n.validateSchema});return u._`!${r}(${t})`}return u.nil}())}subschema(e,t){const r=(0,l.getSubschema)(this.it,e);(0,l.extendSubschemaData)(r,this.it,e),(0,l.extendSubschemaMode)(r,e);const i={...this.it,...r,items:void 0,props:void 0};return function(e,t){v(e)&&(_(e),y(e))?function(e,t){const{schema:r,gen:n,opts:i}=e;i.$comment&&r.$comment&&w(e),function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,p.resolveUrl)(e.opts.uriResolver,e.baseId,t))}(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const o=n.const("_errs",d.default.errors);b(e,o),n.var(t,u._`${o} === ${d.default.errors}`)}(e,t):(0,n.boolOrEmptySchema)(e,t)}(i,t),i}mergeEvaluated(e,t){const{it:r,gen:n}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=h.mergeEvaluated.props(n,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=h.mergeEvaluated.items(n,e.items,r.items,t)))}mergeValidEvaluated(e,t){const{it:r,gen:n}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return n.if(t,(()=>this.mergeEvaluated(e,u.Name))),!0}}function k(e,t,r,n){const i=new x(e,r,t);"code"in r?r.code(i,n):i.$data&&r.validate?(0,c.funcKeywordCode)(i,r):"macro"in r?(0,c.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,c.funcKeywordCode)(i,r)}t.KeywordCxt=x;const I=/^\/(?:[^~]|~0|~1)*$/,A=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function P(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let i,o;if(""===e)return d.default.rootData;if("/"===e[0]){if(!I.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);i=e,o=d.default.rootData}else{const s=A.exec(e);if(!s)throw new Error(`Invalid JSON-pointer: ${e}`);const a=+s[1];if(i=s[2],"#"===i){if(a>=t)throw new Error(c("property/index",a));return n[t-a]}if(a>t)throw new Error(c("data",a));if(o=r[t-a],!i)return o}let s=o;const a=i.split("/");for(const e of a)e&&(o=u._`${o}${(0,u.getProperty)((0,h.unescapeJsonPointer)(e))}`,s=u._`${s} && ${o}`);return s;function c(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}t.getData=P},95782:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;const n=r(15669),i=r(17250),o=r(3499),s=r(6930);function a(e){const{gen:t,data:r,it:i}=e;t.if(i.parentData,(()=>t.assign(r,n._`${i.parentData}[${i.parentDataProperty}]`)))}function c(e,t,r){if(void 0===r)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof r?{ref:r}:{ref:r,code:(0,n.stringify)(r)})}t.macroKeywordCode=function(e,t){const{gen:r,keyword:i,schema:o,parentSchema:s,it:a}=e,l=t.macro.call(a.self,o,s,a),u=c(r,i,l);!1!==a.opts.validateSchema&&a.self.validateSchema(l,!0);const d=r.name("valid");e.subschema({schema:l,schemaPath:n.nil,errSchemaPath:`${a.errSchemaPath}/${i}`,topSchemaRef:u,compositeRule:!0},d),e.pass(d,(()=>e.error(!0)))},t.funcKeywordCode=function(e,t){var r;const{gen:l,keyword:u,schema:d,parentSchema:p,$data:h,it:f}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(f,t);const g=!h&&t.compile?t.compile.call(f.self,d,p,f):t.validate,m=c(l,u,g),y=l.let("valid");function v(r=(t.async?n._`await `:n.nil)){const s=f.opts.passContext?i.default.this:i.default.self,a=!("compile"in t&&!h||!1===t.schema);l.assign(y,n._`${r}${(0,o.callValidateCode)(e,m,s,a)}`,t.modifying)}function _(e){var r;l.if((0,n.not)(null!==(r=t.valid)&&void 0!==r?r:y),e)}e.block$data(y,(function(){if(!1===t.errors)v(),t.modifying&&a(e),_((()=>e.error()));else{const r=t.async?function(){const e=l.let("ruleErrs",null);return l.try((()=>v(n._`await `)),(t=>l.assign(y,!1).if(n._`${t} instanceof ${f.ValidationError}`,(()=>l.assign(e,n._`${t}.errors`)),(()=>l.throw(t))))),e}():function(){const e=n._`${m}.errors`;return l.assign(e,null),v(n.nil),e}();t.modifying&&a(e),_((()=>function(e,t){const{gen:r}=e;r.if(n._`Array.isArray(${t})`,(()=>{r.assign(i.default.vErrors,n._`${i.default.vErrors} === null ? ${t} : ${i.default.vErrors}.concat(${t})`).assign(i.default.errors,n._`${i.default.vErrors}.length`),(0,s.extendErrors)(e)}),(()=>e.error()))}(e,r)))}})),e.ok(null!==(r=t.valid)&&void 0!==r?r:y)},t.validSchemaType=function(e,t,r=!1){return!t.length||t.some((t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||r&&void 0===e))},t.validateKeywordUsage=function({schema:e,opts:t,self:r,errSchemaPath:n},i,o){if(Array.isArray(i.keyword)?!i.keyword.includes(o):i.keyword!==o)throw new Error("ajv implementation error");const s=i.dependencies;if(null==s?void 0:s.some((t=>!Object.prototype.hasOwnProperty.call(e,t))))throw new Error(`parent schema must have dependencies of ${o}: ${s.join(",")}`);if(i.validateSchema&&!i.validateSchema(e[o])){const e=`keyword "${o}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);r.logger.error(e)}}},38878:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;const n=r(15669),i=r(88936);t.getSubschema=function(e,{keyword:t,schemaProp:r,schema:o,schemaPath:s,errSchemaPath:a,topSchemaRef:c}){if(void 0!==t&&void 0!==o)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){const o=e.schema[t];return void 0===r?{schema:o,schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:o[r],schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}${(0,n.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,i.escapeFragment)(r)}`}}if(void 0!==o){if(void 0===s||void 0===a||void 0===c)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:o,schemaPath:s,topSchemaRef:c,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function(e,t,{dataProp:r,dataPropType:o,data:s,dataTypes:a,propertyName:c}){if(void 0!==s&&void 0!==r)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:l}=t;if(void 0!==r){const{errorPath:s,dataPathArr:a,opts:c}=t;u(l.let("data",n._`${t.data}${(0,n.getProperty)(r)}`,!0)),e.errorPath=n.str`${s}${(0,i.getErrorPath)(r,o,c.jsPropertySyntax)}`,e.parentDataProperty=n._`${r}`,e.dataPathArr=[...a,e.parentDataProperty]}function u(r){e.data=r,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,r]}void 0!==s&&(u(s instanceof n.Name?s:l.let("data",s,!0)),void 0!==c&&(e.propertyName=c)),a&&(e.dataTypes=a)},t.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:o}){void 0!==n&&(e.compositeRule=n),void 0!==i&&(e.createErrors=i),void 0!==o&&(e.allErrors=o),e.jtdDiscriminator=t,e.jtdMetadata=r}},38355:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var n=r(91686);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return n.KeywordCxt}});var i=r(15669);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return i.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return i.CodeGen}});const o=r(46448),s=r(91578),a=r(82881),c=r(87382),l=r(15669),u=r(96696),d=r(97332),p=r(88936),h=r(71143),f=r(10407),g=(e,t)=>new RegExp(e,t);g.code="new RegExp";const m=["removeAdditional","useDefaults","coerceTypes"],y=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),v={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},_={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function b(e){var t,r,n,i,o,s,a,c,l,u,d,p,h,m,y,v,_,b,w,C,E,T,S,x,k;const I=e.strict,A=null===(t=e.code)||void 0===t?void 0:t.optimize,P=!0===A||void 0===A?1:A||0,R=null!==(n=null===(r=e.code)||void 0===r?void 0:r.regExp)&&void 0!==n?n:g,N=null!==(i=e.uriResolver)&&void 0!==i?i:f.default;return{strictSchema:null===(s=null!==(o=e.strictSchema)&&void 0!==o?o:I)||void 0===s||s,strictNumbers:null===(c=null!==(a=e.strictNumbers)&&void 0!==a?a:I)||void 0===c||c,strictTypes:null!==(u=null!==(l=e.strictTypes)&&void 0!==l?l:I)&&void 0!==u?u:"log",strictTuples:null!==(p=null!==(d=e.strictTuples)&&void 0!==d?d:I)&&void 0!==p?p:"log",strictRequired:null!==(m=null!==(h=e.strictRequired)&&void 0!==h?h:I)&&void 0!==m&&m,code:e.code?{...e.code,optimize:P,regExp:R}:{optimize:P,regExp:R},loopRequired:null!==(y=e.loopRequired)&&void 0!==y?y:200,loopEnum:null!==(v=e.loopEnum)&&void 0!==v?v:200,meta:null===(_=e.meta)||void 0===_||_,messages:null===(b=e.messages)||void 0===b||b,inlineRefs:null===(w=e.inlineRefs)||void 0===w||w,schemaId:null!==(C=e.schemaId)&&void 0!==C?C:"$id",addUsedSchema:null===(E=e.addUsedSchema)||void 0===E||E,validateSchema:null===(T=e.validateSchema)||void 0===T||T,validateFormats:null===(S=e.validateFormats)||void 0===S||S,unicodeRegExp:null===(x=e.unicodeRegExp)||void 0===x||x,int32range:null===(k=e.int32range)||void 0===k||k,uriResolver:N}}class w{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...b(e)};const{es5:t,lines:r}=this.opts.code;this.scope=new l.ValueScope({scope:{},prefixes:y,es5:t,lines:r}),this.logger=function(e){if(!1===e)return I;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const n=e.validateFormats;e.validateFormats=!1,this.RULES=(0,a.getRules)(),C.call(this,v,e,"NOT SUPPORTED"),C.call(this,_,e,"DEPRECATED","warn"),this._metaOpts=k.call(this),e.formats&&S.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&x.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),T.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:r}=this.opts;let n=h;"id"===r&&(n={...h},n.id=n.$id,delete n.$id),t&&e&&this.addMetaSchema(n,n[r],!1)}defaultMeta(){const{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let r;if("string"==typeof e){if(r=this.getSchema(e),!r)throw new Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);const n=r(t);return"$async"in r||(this.errors=r.errors),n}compile(e,t){const r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:r}=this.opts;return n.call(this,e,t);async function n(e,t){await i.call(this,e.$schema);const r=this._addSchema(e,t);return r.validate||o.call(this,r)}async function i(e){e&&!this.getSchema(e)&&await n.call(this,{$ref:e},!0)}async function o(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof s.default))throw t;return a.call(this,t),await c.call(this,t.missingSchema),o.call(this,e)}}function a({missingSchema:e,missingRef:t}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function c(e){const r=await l.call(this,e);this.refs[e]||await i.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function l(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=r(e))}finally{delete this._loading[e]}}}addSchema(e,t,r,n=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,r,n);return this}let i;if("object"==typeof e){const{schemaId:t}=this.opts;if(i=e[t],void 0!==i&&"string"!=typeof i)throw new Error(`schema ${t} must be string`)}return t=(0,u.normalizeId)(t||i),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,n,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let r;if(r=e.$schema,void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const n=this.validate(r,e);if(!n&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return n}getSchema(e){let t;for(;"string"==typeof(t=E.call(this,e));)e=t;if(void 0===t){const{schemaId:r}=this.opts,n=new c.SchemaEnv({schema:{},schemaId:r});if(t=c.resolveSchema.call(this,n,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const t=E.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{const t=e;this._cache.delete(t);let r=e[this.opts.schemaId];return r&&(r=(0,u.normalizeId)(r),delete this.schemas[r],delete this.refs[r]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if("string"==typeof e)r=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r);else{if("object"!=typeof e||void 0!==t)throw new Error("invalid addKeywords parameters");if(r=(t=e).keyword,Array.isArray(r)&&!r.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(P.call(this,r,t),!t)return(0,p.eachItem)(r,(e=>R.call(this,e))),this;O.call(this,t);const n={...t,type:(0,d.getJSONTypes)(t.type),schemaType:(0,d.getJSONTypes)(t.schemaType)};return(0,p.eachItem)(r,0===n.type.length?e=>R.call(this,e,n):e=>n.type.forEach((t=>R.call(this,e,n,t)))),this}getKeyword(e){const t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const r of t.rules){const t=r.rules.findIndex((t=>t.keyword===e));t>=0&&r.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return e&&0!==e.length?e.map((e=>`${r}${e.instancePath} ${e.message}`)).reduce(((e,r)=>e+t+r)):"No errors"}$dataMetaSchema(e,t){const r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const n of t){const t=n.split("/").slice(1);let i=e;for(const e of t)i=i[e];for(const e in r){const t=r[e];if("object"!=typeof t)continue;const{$data:n}=t.definition,o=i[e];n&&o&&(i[e]=D(o))}}return e}_removeAllSchemas(e,t){for(const r in e){const n=e[r];t&&!t.test(r)||("string"==typeof n?delete e[r]:n&&!n.meta&&(this._cache.delete(n.schema),delete e[r]))}}_addSchema(e,t,r,n=this.opts.validateSchema,i=this.opts.addUsedSchema){let o;const{schemaId:s}=this.opts;if("object"==typeof e)o=e[s];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}let a=this._cache.get(e);if(void 0!==a)return a;r=(0,u.normalizeId)(o||r);const l=u.getSchemaRefs.call(this,e,r);return a=new c.SchemaEnv({schema:e,schemaId:s,meta:t,baseId:r,localRefs:l}),this._cache.set(a.schema,a),i&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=a),n&&this.validateSchema(e,!0),a}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):c.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const t=this.opts;this.opts=this._metaOpts;try{c.compileSchema.call(this,e)}finally{this.opts=t}}}function C(e,t,r,n="error"){for(const i in e){const o=i;o in t&&this.logger[n](`${r}: option ${i}. ${e[o]}`)}}function E(e){return e=(0,u.normalizeId)(e),this.schemas[e]||this.refs[e]}function T(){const e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t)}function S(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function x(e){if(Array.isArray(e))this.addVocabulary(e);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}}function k(){const e={...this.opts};for(const t of m)delete e[t];return e}t.default=w,w.ValidationError=o.default,w.MissingRefError=s.default;const I={log(){},warn(){},error(){}},A=/^[a-z_$][a-z0-9_$:-]*$/i;function P(e,t){const{RULES:r}=this;if((0,p.eachItem)(e,(e=>{if(r.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!A.test(e))throw new Error(`Keyword ${e} has invalid name`)})),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function R(e,t,r){var n;const i=null==t?void 0:t.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:o}=this;let s=i?o.post:o.rules.find((({type:e})=>e===r));if(s||(s={type:r,rules:[]},o.rules.push(s)),o.keywords[e]=!0,!t)return;const a={keyword:e,definition:{...t,type:(0,d.getJSONTypes)(t.type),schemaType:(0,d.getJSONTypes)(t.schemaType)}};t.before?N.call(this,s,a,t.before):s.rules.push(a),o.all[e]=a,null===(n=t.implements)||void 0===n||n.forEach((e=>this.addKeyword(e)))}function N(e,t,r){const n=e.rules.findIndex((e=>e.keyword===r));n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function O(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=D(t)),e.validateSchema=this.compile(t,!0))}const L={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function D(e){return{anyOf:[e,L]}}},94285:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(66471);n.code='require("ajv/dist/runtime/equal").default',t.default=n},49161:(e,t)=>{"use strict";function r(e){const t=e.length;let r,n=0,i=0;for(;i=55296&&r<=56319&&i{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(22371);n.code='require("ajv/dist/runtime/uri").default',t.default=n},46448:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}t.default=r},78891:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;const n=r(15669),i=r(88936),o={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{parentSchema:t,it:r}=e,{items:n}=t;Array.isArray(n)?s(e,n):(0,i.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas')}};function s(e,t){const{gen:r,schema:o,data:s,keyword:a,it:c}=e;c.items=!0;const l=r.const("len",n._`${s}.length`);if(!1===o)e.setParams({len:t.length}),e.pass(n._`${l} <= ${t.length}`);else if("object"==typeof o&&!(0,i.alwaysValidSchema)(c,o)){const o=r.var("valid",n._`${l} <= ${t.length}`);r.if((0,n.not)(o),(()=>function(o){r.forRange("i",t.length,l,(t=>{e.subschema({keyword:a,dataProp:t,dataPropType:i.Type.Num},o),c.allErrors||r.if((0,n.not)(o),(()=>r.break()))}))}(o))),e.ok(o)}}t.validateAdditionalItems=s,t.default=o},24943:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3499),i=r(15669),o=r(17250),s=r(88936),a={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>i._`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:t,schema:r,parentSchema:a,data:c,errsCount:l,it:u}=e;if(!l)throw new Error("ajv implementation error");const{allErrors:d,opts:p}=u;if(u.props=!0,"all"!==p.removeAdditional&&(0,s.alwaysValidSchema)(u,r))return;const h=(0,n.allSchemaProperties)(a.properties),f=(0,n.allSchemaProperties)(a.patternProperties);function g(e){t.code(i._`delete ${c}[${e}]`)}function m(n){if("all"===p.removeAdditional||p.removeAdditional&&!1===r)g(n);else{if(!1===r)return e.setParams({additionalProperty:n}),e.error(),void(d||t.break());if("object"==typeof r&&!(0,s.alwaysValidSchema)(u,r)){const r=t.name("valid");"failing"===p.removeAdditional?(y(n,r,!1),t.if((0,i.not)(r),(()=>{e.reset(),g(n)}))):(y(n,r),d||t.if((0,i.not)(r),(()=>t.break())))}}}function y(t,r,n){const i={keyword:"additionalProperties",dataProp:t,dataPropType:s.Type.Str};!1===n&&Object.assign(i,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(i,r)}t.forIn("key",c,(r=>{h.length||f.length?t.if(function(r){let o;if(h.length>8){const e=(0,s.schemaRefOrVal)(u,a.properties,"properties");o=(0,n.isOwnProperty)(t,e,r)}else o=h.length?(0,i.or)(...h.map((e=>i._`${r} === ${e}`))):i.nil;return f.length&&(o=(0,i.or)(o,...f.map((t=>i._`${(0,n.usePattern)(e,t)}.test(${r})`)))),(0,i.not)(o)}(r),(()=>m(r))):m(r)})),e.ok(i._`${l} === ${o.default.errors}`)}};t.default=a},22609:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(88936),i={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const o=t.name("valid");r.forEach(((t,r)=>{if((0,n.alwaysValidSchema)(i,t))return;const s=e.subschema({keyword:"allOf",schemaProp:r},o);e.ok(o),e.mergeEvaluated(s)}))}};t.default=i},54279:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:r(3499).validateUnion,error:{message:"must match a schema in anyOf"}};t.default=n},95609:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(15669),i=r(88936),o={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?n.str`must contain at least ${e} valid item(s)`:n.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?n._`{minContains: ${e}}`:n._`{minContains: ${e}, maxContains: ${t}}`},code(e){const{gen:t,schema:r,parentSchema:o,data:s,it:a}=e;let c,l;const{minContains:u,maxContains:d}=o;a.opts.next?(c=void 0===u?1:u,l=d):c=1;const p=t.const("len",n._`${s}.length`);if(e.setParams({min:c,max:l}),void 0===l&&0===c)return void(0,i.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==l&&c>l)return(0,i.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,i.alwaysValidSchema)(a,r)){let t=n._`${p} >= ${c}`;return void 0!==l&&(t=n._`${t} && ${p} <= ${l}`),void e.pass(t)}a.items=!0;const h=t.name("valid");function f(){const e=t.name("_valid"),r=t.let("count",0);g(e,(()=>t.if(e,(()=>function(e){t.code(n._`${e}++`),void 0===l?t.if(n._`${e} >= ${c}`,(()=>t.assign(h,!0).break())):(t.if(n._`${e} > ${l}`,(()=>t.assign(h,!1).break())),1===c?t.assign(h,!0):t.if(n._`${e} >= ${c}`,(()=>t.assign(h,!0))))}(r)))))}function g(r,n){t.forRange("i",0,p,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:i.Type.Num,compositeRule:!0},r),n()}))}void 0===l&&1===c?g(h,(()=>t.if(h,(()=>t.break())))):0===c?(t.let(h,!0),void 0!==l&&t.if(n._`${s}.length > 0`,f)):(t.let(h,!1),f()),e.result(h,(()=>e.reset()))}};t.default=o},5463:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const n=r(15669),i=r(88936),o=r(3499);t.error={message:({params:{property:e,depsCount:t,deps:r}})=>{const i=1===t?"property":"properties";return n.str`must have ${i} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:i}})=>n._`{property: ${e}, missingProperty: ${i}, depsCount: ${t}, - deps: ${r}}`};const s={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){const[t,r]=function({schema:e}){const t={},r={};for(const n in e)"__proto__"!==n&&((Array.isArray(e[n])?t:r)[n]=e[n]);return[t,r]}(e);a(e,t),c(e,r)}};function a(e,t=e.schema){const{gen:r,data:i,it:s}=e;if(0===Object.keys(t).length)return;const a=r.let("missing");for(const c in t){const l=t[c];if(0===l.length)continue;const u=(0,o.propertyInData)(r,i,c,s.opts.ownProperties);e.setParams({property:c,depsCount:l.length,deps:l.join(", ")}),s.allErrors?r.if(u,(()=>{for(const t of l)(0,o.checkReportMissingProp)(e,t)})):(r.if(n._`${u} && (${(0,o.checkMissingProp)(e,l,a)})`),(0,o.reportMissingProp)(e,a),r.else())}}function c(e,t=e.schema){const{gen:r,data:n,keyword:s,it:a}=e,c=r.name("valid");for(const l in t)(0,i.alwaysValidSchema)(a,t[l])||(r.if((0,o.propertyInData)(r,n,l,a.opts.ownProperties),(()=>{const t=e.subschema({keyword:s,schemaProp:l},c);e.mergeValidEvaluated(t,c)}),(()=>r.var(c,!0))),e.ok(c))}t.validatePropertyDeps=a,t.validateSchemaDeps=c,t.default=s},50076:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(15669),i=r(88936),o={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>n.str`must match "${e.ifClause}" schema`,params:({params:e})=>n._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:r,it:o}=e;void 0===r.then&&void 0===r.else&&(0,i.checkStrictMode)(o,'"if" without "then" and "else" is ignored');const a=s(o,"then"),c=s(o,"else");if(!a&&!c)return;const l=t.let("valid",!0),u=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(t)}(),e.reset(),a&&c){const r=t.let("ifClause");e.setParams({ifClause:r}),t.if(u,d("then",r),d("else",r))}else a?t.if(u,d("then")):t.if((0,n.not)(u),d("else"));function d(r,i){return()=>{const o=e.subschema({keyword:r},u);t.assign(l,u),e.mergeValidEvaluated(o,l),i?t.assign(i,n._`${r}`):e.setParams({ifClause:r})}}e.pass(l,(()=>e.error(!0)))}};function s(e,t){const r=e.schema[t];return void 0!==r&&!(0,i.alwaysValidSchema)(e,r)}t.default=o},46951:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(78891),i=r(21162),o=r(98634),s=r(65151),a=r(95609),c=r(5463),l=r(53021),u=r(24943),d=r(34243),p=r(98103),h=r(72869),f=r(54279),g=r(14880),m=r(22609),y=r(50076),v=r(25316);t.default=function(e=!1){const t=[h.default,f.default,g.default,m.default,y.default,v.default,l.default,u.default,c.default,d.default,p.default];return e?t.push(i.default,s.default):t.push(n.default,o.default),t.push(a.default),t}},98634:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;const n=r(15669),i=r(88936),o=r(3499),s={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return a(e,"additionalItems",t);r.items=!0,(0,i.alwaysValidSchema)(r,t)||e.ok((0,o.validateArray)(e))}};function a(e,t,r=e.schema){const{gen:o,parentSchema:s,data:a,keyword:c,it:l}=e;!function(e){const{opts:n,errSchemaPath:o}=l,s=r.length,a=s===e.minItems&&(s===e.maxItems||!1===e[t]);if(n.strictTuples&&!a){const e=`"${c}" is ${s}-tuple, but minItems or maxItems/${t} are not specified or different at path "${o}"`;(0,i.checkStrictMode)(l,e,n.strictTuples)}}(s),l.opts.unevaluated&&r.length&&!0!==l.items&&(l.items=i.mergeEvaluated.items(o,r.length,l.items));const u=o.name("valid"),d=o.const("len",n._`${a}.length`);r.forEach(((t,r)=>{(0,i.alwaysValidSchema)(l,t)||(o.if(n._`${d} > ${r}`,(()=>e.subschema({keyword:c,schemaProp:r,dataProp:r},u))),e.ok(u))}))}t.validateTuple=a,t.default=s},65151:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(15669),i=r(88936),o=r(3499),s=r(78891),a={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:r,it:n}=e,{prefixItems:a}=r;n.items=!0,(0,i.alwaysValidSchema)(n,t)||(a?(0,s.validateAdditionalItems)(e,a):e.ok((0,o.validateArray)(e)))}};t.default=a},72869:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(88936),i={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:i}=e;if((0,n.alwaysValidSchema)(i,r))return void e.fail();const o=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),e.failResult(o,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};t.default=i},14880:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(15669),i=r(88936),o={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>n._`{passingSchemas: ${e.passing}}`},code(e){const{gen:t,schema:r,parentSchema:o,it:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(s.opts.discriminator&&o.discriminator)return;const a=r,c=t.let("valid",!1),l=t.let("passing",null),u=t.name("_valid");e.setParams({passing:l}),t.block((function(){a.forEach(((r,o)=>{let a;(0,i.alwaysValidSchema)(s,r)?t.var(u,!0):a=e.subschema({keyword:"oneOf",schemaProp:o,compositeRule:!0},u),o>0&&t.if(n._`${u} && ${c}`).assign(c,!1).assign(l,n._`[${l}, ${o}]`).else(),t.if(u,(()=>{t.assign(c,!0),t.assign(l,o),a&&e.mergeEvaluated(a,n.Name)}))}))})),e.result(c,(()=>e.reset()),(()=>e.error(!0)))}};t.default=o},98103:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3499),i=r(15669),o=r(88936),s=r(88936),a={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:a,parentSchema:c,it:l}=e,{opts:u}=l,d=(0,n.allSchemaProperties)(r),p=d.filter((e=>(0,o.alwaysValidSchema)(l,r[e])));if(0===d.length||p.length===d.length&&(!l.opts.unevaluated||!0===l.props))return;const h=u.strictSchema&&!u.allowMatchingProperties&&c.properties,f=t.name("valid");!0===l.props||l.props instanceof i.Name||(l.props=(0,s.evaluatedPropsToName)(t,l.props));const{props:g}=l;function m(e){for(const t in h)new RegExp(e).test(t)&&(0,o.checkStrictMode)(l,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function y(r){t.forIn("key",a,(o=>{t.if(i._`${(0,n.usePattern)(e,r)}.test(${o})`,(()=>{const n=p.includes(r);n||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:o,dataPropType:s.Type.Str},f),l.opts.unevaluated&&!0!==g?t.assign(i._`${g}[${o}]`,!0):n||l.allErrors||t.if((0,i.not)(f),(()=>t.break()))}))}))}!function(){for(const e of d)h&&m(e),l.allErrors?y(e):(t.var(f,!0),y(e),t.if(f))}()}};t.default=a},21162:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(98634),i={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,n.validateTuple)(e,"items")};t.default=i},34243:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(91686),i=r(3499),o=r(88936),s=r(24943),a={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:a,data:c,it:l}=e;"all"===l.opts.removeAdditional&&void 0===a.additionalProperties&&s.default.code(new n.KeywordCxt(l,s.default,"additionalProperties"));const u=(0,i.allSchemaProperties)(r);for(const e of u)l.definedProperties.add(e);l.opts.unevaluated&&u.length&&!0!==l.props&&(l.props=o.mergeEvaluated.props(t,(0,o.toHash)(u),l.props));const d=u.filter((e=>!(0,o.alwaysValidSchema)(l,r[e])));if(0===d.length)return;const p=t.name("valid");for(const r of d)h(r)?f(r):(t.if((0,i.propertyInData)(t,c,r,l.opts.ownProperties)),f(r),l.allErrors||t.else().var(p,!0),t.endIf()),e.it.definedProperties.add(r),e.ok(p);function h(e){return l.opts.useDefaults&&!l.compositeRule&&void 0!==r[e].default}function f(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},p)}}};t.default=a},53021:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(15669),i=r(88936),o={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>n._`{propertyName: ${e.propertyName}}`},code(e){const{gen:t,schema:r,data:o,it:s}=e;if((0,i.alwaysValidSchema)(s,r))return;const a=t.name("valid");t.forIn("key",o,(r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},a),t.if((0,n.not)(a),(()=>{e.error(!0),s.allErrors||t.break()}))})),e.ok(a)}};t.default=o},25316:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(88936),i={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){void 0===t.if&&(0,n.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};t.default=i},3499:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;const n=r(15669),i=r(88936),o=r(17250),s=r(88936);function a(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:n._`Object.prototype.hasOwnProperty`})}function c(e,t,r){return n._`${a(e)}.call(${t}, ${r})`}function l(e,t,r,i){const o=n._`${t}${(0,n.getProperty)(r)} === undefined`;return i?(0,n.or)(o,(0,n.not)(c(e,t,r))):o}function u(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}t.checkReportMissingProp=function(e,t){const{gen:r,data:i,it:o}=e;r.if(l(r,i,t,o.opts.ownProperties),(()=>{e.setParams({missingProperty:n._`${t}`},!0),e.error()}))},t.checkMissingProp=function({gen:e,data:t,it:{opts:r}},i,o){return(0,n.or)(...i.map((i=>(0,n.and)(l(e,t,i,r.ownProperties),n._`${o} = ${i}`))))},t.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=a,t.isOwnProperty=c,t.propertyInData=function(e,t,r,i){const o=n._`${t}${(0,n.getProperty)(r)} !== undefined`;return i?n._`${o} && ${c(e,t,r)}`:o},t.noPropertyInData=l,t.allSchemaProperties=u,t.schemaProperties=function(e,t){return u(t).filter((r=>!(0,i.alwaysValidSchema)(e,t[r])))},t.callValidateCode=function({schemaCode:e,data:t,it:{gen:r,topSchemaRef:i,schemaPath:s,errorPath:a},it:c},l,u,d){const p=d?n._`${e}, ${t}, ${i}${s}`:t,h=[[o.default.instancePath,(0,n.strConcat)(o.default.instancePath,a)],[o.default.parentData,c.parentData],[o.default.parentDataProperty,c.parentDataProperty],[o.default.rootData,o.default.rootData]];c.opts.dynamicRef&&h.push([o.default.dynamicAnchors,o.default.dynamicAnchors]);const f=n._`${p}, ${r.object(...h)}`;return u!==n.nil?n._`${l}.call(${u}, ${f})`:n._`${l}(${f})`};const d=n._`new RegExp`;t.usePattern=function({gen:e,it:{opts:t}},r){const i=t.unicodeRegExp?"u":"",{regExp:o}=t.code,a=o(r,i);return e.scopeValue("pattern",{key:a.toString(),ref:a,code:n._`${"new RegExp"===o.code?d:(0,s.useFunc)(e,o)}(${r}, ${i})`})},t.validateArray=function(e){const{gen:t,data:r,keyword:o,it:s}=e,a=t.name("valid");if(s.allErrors){const e=t.let("valid",!0);return c((()=>t.assign(e,!1))),e}return t.var(a,!0),c((()=>t.break())),a;function c(s){const c=t.const("len",n._`${r}.length`);t.forRange("i",0,c,(r=>{e.subschema({keyword:o,dataProp:r,dataPropType:i.Type.Num},a),t.if((0,n.not)(a),s)}))}},t.validateUnion=function(e){const{gen:t,schema:r,keyword:o,it:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some((e=>(0,i.alwaysValidSchema)(s,e)))&&!s.opts.unevaluated)return;const a=t.let("valid",!1),c=t.name("_valid");t.block((()=>r.forEach(((r,i)=>{const s=e.subschema({keyword:o,schemaProp:i,compositeRule:!0},c);t.assign(a,n._`${a} || ${c}`),e.mergeValidEvaluated(s,c)||t.if((0,n.not)(a))})))),e.result(a,(()=>e.reset()),(()=>e.error(!0)))}},71018:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t.default=r},32101:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(71018),i=r(41939),o=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",n.default,i.default];t.default=o},41939:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;const n=r(91578),i=r(3499),o=r(15669),s=r(17250),a=r(87382),c=r(88936),l={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:i}=e,{baseId:s,schemaEnv:c,validateName:l,opts:p,self:h}=i,{root:f}=c;if(("#"===r||"#/"===r)&&s===f.baseId)return function(){if(c===f)return d(e,l,c,c.$async);const r=t.scopeValue("root",{ref:f});return d(e,o._`${r}.validate`,f,f.$async)}();const g=a.resolveRef.call(h,f,s,r);if(void 0===g)throw new n.default(i.opts.uriResolver,s,r);return g instanceof a.SchemaEnv?function(t){const r=u(e,t);d(e,r,t,t.$async)}(g):function(n){const i=t.scopeValue("schema",!0===p.code.source?{ref:n,code:(0,o.stringify)(n)}:{ref:n}),s=t.name("valid"),a=e.subschema({schema:n,dataTypes:[],schemaPath:o.nil,topSchemaRef:i,errSchemaPath:r},s);e.mergeEvaluated(a),e.ok(s)}(g)}};function u(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):o._`${r.scopeValue("wrapper",{ref:t})}.validate`}function d(e,t,r,n){const{gen:a,it:l}=e,{allErrors:u,schemaEnv:d,opts:p}=l,h=p.passContext?s.default.this:o.nil;function f(e){const t=o._`${e}.errors`;a.assign(s.default.vErrors,o._`${s.default.vErrors} === null ? ${t} : ${s.default.vErrors}.concat(${t})`),a.assign(s.default.errors,o._`${s.default.vErrors}.length`)}function g(e){var t;if(!l.opts.unevaluated)return;const n=null===(t=null==r?void 0:r.validate)||void 0===t?void 0:t.evaluated;if(!0!==l.props)if(n&&!n.dynamicProps)void 0!==n.props&&(l.props=c.mergeEvaluated.props(a,n.props,l.props));else{const t=a.var("props",o._`${e}.evaluated.props`);l.props=c.mergeEvaluated.props(a,t,l.props,o.Name)}if(!0!==l.items)if(n&&!n.dynamicItems)void 0!==n.items&&(l.items=c.mergeEvaluated.items(a,n.items,l.items));else{const t=a.var("items",o._`${e}.evaluated.items`);l.items=c.mergeEvaluated.items(a,t,l.items,o.Name)}}n?function(){if(!d.$async)throw new Error("async schema referenced by sync schema");const r=a.let("valid");a.try((()=>{a.code(o._`await ${(0,i.callValidateCode)(e,t,h)}`),g(t),u||a.assign(r,!0)}),(e=>{a.if(o._`!(${e} instanceof ${l.ValidationError})`,(()=>a.throw(e))),f(e),u||a.assign(r,!1)})),e.ok(r)}():e.result((0,i.callValidateCode)(e,t,h),(()=>g(t)),(()=>f(t)))}t.getValidate=u,t.callRef=d,t.default=l},30002:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(15669),i=r(77421),o=r(87382),s=r(88936),a={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===i.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>n._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},code(e){const{gen:t,data:r,schema:a,parentSchema:c,it:l}=e,{oneOf:u}=c;if(!l.opts.discriminator)throw new Error("discriminator: requires discriminator option");const d=a.propertyName;if("string"!=typeof d)throw new Error("discriminator: requires propertyName");if(a.mapping)throw new Error("discriminator: mapping is not supported");if(!u)throw new Error("discriminator: requires oneOf keyword");const p=t.let("valid",!1),h=t.const("tag",n._`${r}${(0,n.getProperty)(d)}`);function f(r){const i=t.name("valid"),o=e.subschema({keyword:"oneOf",schemaProp:r},i);return e.mergeEvaluated(o,n.Name),i}t.if(n._`typeof ${h} == "string"`,(()=>function(){const r=function(){var e;const t={},r=i(c);let n=!0;for(let t=0;te.error(!1,{discrError:i.DiscrError.Tag,tag:h,tagName:d}))),e.ok(p)}};t.default=a},77421:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,(r=t.DiscrError||(t.DiscrError={})).Tag="tag",r.Mapping="mapping"},35671:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(32101),i=r(37499),o=r(46951),s=r(4480),a=r(32480),c=[n.default,i.default,(0,o.default)(),s.default,a.metadataVocabulary,a.contentVocabulary];t.default=c},73599:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(15669),i={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>n.str`must match format "${e}"`,params:({schemaCode:e})=>n._`{format: ${e}}`},code(e,t){const{gen:r,data:i,$data:o,schema:s,schemaCode:a,it:c}=e,{opts:l,errSchemaPath:u,schemaEnv:d,self:p}=c;l.validateFormats&&(o?function(){const o=r.scopeValue("formats",{ref:p.formats,code:l.code.formats}),s=r.const("fDef",n._`${o}[${a}]`),c=r.let("fType"),u=r.let("format");r.if(n._`typeof ${s} == "object" && !(${s} instanceof RegExp)`,(()=>r.assign(c,n._`${s}.type || "string"`).assign(u,n._`${s}.validate`)),(()=>r.assign(c,n._`"string"`).assign(u,s))),e.fail$data((0,n.or)(!1===l.strictSchema?n.nil:n._`${a} && !${u}`,function(){const e=d.$async?n._`(${s}.async ? await ${u}(${i}) : ${u}(${i}))`:n._`${u}(${i})`,r=n._`(typeof ${u} == "function" ? ${e} : ${u}.test(${i}))`;return n._`${u} && ${u} !== true && ${c} === ${t} && !${r}`}()))}():function(){const o=p.formats[s];if(!o)return void function(){if(!1!==l.strictSchema)throw new Error(e());function e(){return`unknown format "${s}" ignored in schema at path "${u}"`}p.logger.warn(e())}();if(!0===o)return;const[a,c,h]=function(e){const t=e instanceof RegExp?(0,n.regexpCode)(e):l.code.formats?n._`${l.code.formats}${(0,n.getProperty)(s)}`:void 0,i=r.scopeValue("formats",{key:s,ref:e,code:t});return"object"!=typeof e||e instanceof RegExp?["string",e,i]:[e.type||"string",e.validate,n._`${i}.validate`]}(o);a===t&&e.pass(function(){if("object"==typeof o&&!(o instanceof RegExp)&&o.async){if(!d.$async)throw new Error("async format in sync schema");return n._`await ${h}(${i})`}return"function"==typeof c?n._`${h}(${i})`:n._`${h}.test(${i})`}())}())}};t.default=i},4480:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=[r(73599).default];t.default=n},32480:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},36577:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(15669),i=r(88936),o=r(94285),s={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>n._`{allowedValue: ${e}}`},code(e){const{gen:t,data:r,$data:s,schemaCode:a,schema:c}=e;s||c&&"object"==typeof c?e.fail$data(n._`!${(0,i.useFunc)(t,o.default)}(${r}, ${a})`):e.fail(n._`${c} !== ${r}`)}};t.default=s},59450:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(15669),i=r(88936),o=r(94285),s={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>n._`{allowedValues: ${e}}`},code(e){const{gen:t,data:r,$data:s,schema:a,schemaCode:c,it:l}=e;if(!s&&0===a.length)throw new Error("enum must have non-empty array");const u=a.length>=l.opts.loopEnum;let d;const p=()=>null!=d?d:d=(0,i.useFunc)(t,o.default);let h;if(u||s)h=t.let("valid"),e.block$data(h,(function(){t.assign(h,!1),t.forOf("v",c,(e=>t.if(n._`${p()}(${r}, ${e})`,(()=>t.assign(h,!0).break()))))}));else{if(!Array.isArray(a))throw new Error("ajv implementation error");const e=t.const("vSchema",c);h=(0,n.or)(...a.map(((t,i)=>function(e,t){const i=a[t];return"object"==typeof i&&null!==i?n._`${p()}(${r}, ${e}[${t}])`:n._`${r} === ${i}`}(e,i))))}e.pass(h)}};t.default=s},37499:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(31337),i=r(59706),o=r(99507),s=r(51216),a=r(70034),c=r(96962),l=r(61135),u=r(10194),d=r(36577),p=r(59450),h=[n.default,i.default,o.default,s.default,a.default,c.default,l.default,u.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},d.default,p.default];t.default=h},61135:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(15669),i={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxItems"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:i}=e,o="maxItems"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`${r}.length ${o} ${i}`)}};t.default=i},99507:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(15669),i=r(88936),o=r(49161),s={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxLength"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:s,it:a}=e,c="maxLength"===t?n.operators.GT:n.operators.LT,l=!1===a.opts.unicode?n._`${r}.length`:n._`${(0,i.useFunc)(e.gen,o.default)}(${r})`;e.fail$data(n._`${l} ${c} ${s}`)}};t.default=s},31337:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(15669),i=n.operators,o={maximum:{okStr:"<=",ok:i.LTE,fail:i.GT},minimum:{okStr:">=",ok:i.GTE,fail:i.LT},exclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},exclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}},s={message:({keyword:e,schemaCode:t})=>n.str`must be ${o[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>n._`{comparison: ${o[e].okStr}, limit: ${t}}`},a={keyword:Object.keys(o),type:"number",schemaType:"number",$data:!0,error:s,code(e){const{keyword:t,data:r,schemaCode:i}=e;e.fail$data(n._`${r} ${o[t].fail} ${i} || isNaN(${r})`)}};t.default=a},70034:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(15669),i={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxProperties"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:i}=e,o="maxProperties"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`Object.keys(${r}).length ${o} ${i}`)}};t.default=i},59706:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(15669),i={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>n.str`must be multiple of ${e}`,params:({schemaCode:e})=>n._`{multipleOf: ${e}}`},code(e){const{gen:t,data:r,schemaCode:i,it:o}=e,s=o.opts.multipleOfPrecision,a=t.let("res"),c=s?n._`Math.abs(Math.round(${a}) - ${a}) > 1e-${s}`:n._`${a} !== parseInt(${a})`;e.fail$data(n._`(${i} === 0 || (${a} = ${r}/${i}, ${c}))`)}};t.default=i},51216:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3499),i=r(15669),o={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>i.str`must match pattern "${e}"`,params:({schemaCode:e})=>i._`{pattern: ${e}}`},code(e){const{data:t,$data:r,schema:o,schemaCode:s,it:a}=e,c=a.opts.unicodeRegExp?"u":"",l=r?i._`(new RegExp(${s}, ${c}))`:(0,n.usePattern)(e,o);e.fail$data(i._`!${l}.test(${t})`)}};t.default=o},96962:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3499),i=r(15669),o=r(88936),s={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>i.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>i._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:r,schemaCode:s,data:a,$data:c,it:l}=e,{opts:u}=l;if(!c&&0===r.length)return;const d=r.length>=u.loopRequired;if(l.allErrors?function(){if(d||c)e.block$data(i.nil,p);else for(const t of r)(0,n.checkReportMissingProp)(e,t)}():function(){const o=t.let("missing");if(d||c){const r=t.let("valid",!0);e.block$data(r,(()=>function(r,o){e.setParams({missingProperty:r}),t.forOf(r,s,(()=>{t.assign(o,(0,n.propertyInData)(t,a,r,u.ownProperties)),t.if((0,i.not)(o),(()=>{e.error(),t.break()}))}),i.nil)}(o,r))),e.ok(r)}else t.if((0,n.checkMissingProp)(e,r,o)),(0,n.reportMissingProp)(e,o),t.else()}(),u.strictRequired){const t=e.parentSchema.properties,{definedProperties:n}=e.it;for(const e of r)if(void 0===(null==t?void 0:t[e])&&!n.has(e)){const t=`required property "${e}" is not defined at "${l.schemaEnv.baseId+l.errSchemaPath}" (strictRequired)`;(0,o.checkStrictMode)(l,t,l.opts.strictRequired)}}function p(){t.forOf("prop",s,(r=>{e.setParams({missingProperty:r}),t.if((0,n.noPropertyInData)(t,a,r,u.ownProperties),(()=>e.error()))}))}}};t.default=s},10194:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(97332),i=r(15669),o=r(88936),s=r(94285),a={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>i.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>i._`{i: ${e}, j: ${t}}`},code(e){const{gen:t,data:r,$data:a,schema:c,parentSchema:l,schemaCode:u,it:d}=e;if(!a&&!c)return;const p=t.let("valid"),h=l.items?(0,n.getSchemaTypes)(l.items):[];function f(o,s){const a=t.name("item"),c=(0,n.checkDataTypes)(h,a,d.opts.strictNumbers,n.DataType.Wrong),l=t.const("indices",i._`{}`);t.for(i._`;${o}--;`,(()=>{t.let(a,i._`${r}[${o}]`),t.if(c,i._`continue`),h.length>1&&t.if(i._`typeof ${a} == "string"`,i._`${a} += "_"`),t.if(i._`typeof ${l}[${a}] == "number"`,(()=>{t.assign(s,i._`${l}[${a}]`),e.error(),t.assign(p,!1).break()})).code(i._`${l}[${a}] = ${o}`)}))}function g(n,a){const c=(0,o.useFunc)(t,s.default),l=t.name("outer");t.label(l).for(i._`;${n}--;`,(()=>t.for(i._`${a} = ${n}; ${a}--;`,(()=>t.if(i._`${c}(${r}[${n}], ${r}[${a}])`,(()=>{e.error(),t.assign(p,!1).break(l)}))))))}e.block$data(p,(function(){const n=t.let("i",i._`${r}.length`),o=t.let("j");e.setParams({i:n,j:o}),t.assign(p,!0),t.if(i._`${n} > 1`,(()=>(h.length>0&&!h.some((e=>"object"===e||"array"===e))?f:g)(n,o)))}),i._`${u} === false`),e.ok(p)}};t.default=a},3245:(e,t,r)=>{"use strict";var n=r(1767),i=function(){function e(t){if(e.INSTANCE)throw new Error("Console logging adapter tracking should be configured from the applicationInsights object");this._client=t,e.INSTANCE=this}return e.prototype.enable=function(e,t){n.IsInitialized&&(r(72469).wp(e&&t,this._client),r(23805).wp(e,this._client),r(27916).wp(e,this._client))},e.prototype.isInitialized=function(){return this._isInitialized},e.prototype.dispose=function(){e.INSTANCE=null,this.enable(!1,!1)},e._methodNames=["debug","info","log","warn","error"],e}();e.exports=i},6751:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(12010),i=r(1767),o=function(){function e(){}return e.getCurrentContext=function(){if(!e.enabled)return null;var t=e.session.get(e.CONTEXT_NAME);return void 0===t?null:t},e.generateContextObject=function(e,t,r,n,i,o){return t=t||e,this.enabled?{operation:{name:r,id:e,parentId:t,traceparent:i,tracestate:o},customProperties:new s(n)}:null},e.runWithContext=function(t,r){return e.enabled?e.session.bind(r,((n={})[e.CONTEXT_NAME]=t,n))():r();var n},e.wrapEmitter=function(t){e.enabled&&e.session.bindEmitter(t)},e.wrapCallback=function(t){return e.enabled?e.session.bind(t):t},e.enable=function(t){this.enabled||(this.isNodeVersionCompatible()?(e.hasEverEnabled||(this.forceClsHooked=t,this.hasEverEnabled=!0,void 0===this.cls&&(!0===e.forceClsHooked||void 0===e.forceClsHooked&&e.shouldUseClsHooked()?this.cls=r(19172):this.cls=r(92611)),e.session=this.cls.createNamespace("AI-CLS-Session"),i.registerContextPreservation((function(t){return e.session.bind(t)}))),this.enabled=!0):this.enabled=!1)},e.disable=function(){this.enabled=!1},e.reset=function(){e.hasEverEnabled&&(e.session=null,e.session=this.cls.createNamespace("AI-CLS-Session"))},e.isNodeVersionCompatible=function(){var e=process.versions.node.split(".");return parseInt(e[0])>3||parseInt(e[0])>2&&parseInt(e[1])>2},e.shouldUseClsHooked=function(){var e=process.versions.node.split(".");return parseInt(e[0])>8||parseInt(e[0])>=8&&parseInt(e[1])>=2},e.canUseClsHooked=function(){var e=process.versions.node.split("."),t=parseInt(e[0])>8||parseInt(e[0])>=8&&parseInt(e[1])>=0,r=parseInt(e[0])<8||parseInt(e[0])<=8&&parseInt(e[1])<2,n=parseInt(e[0])>4||parseInt(e[0])>=4&&parseInt(e[1])>=7;return!(t&&r)&&n},e.enabled=!1,e.hasEverEnabled=!1,e.forceClsHooked=void 0,e.CONTEXT_NAME="ApplicationInsights-Context",e}();t.CorrelationContextManager=o;var s=function(){function e(e){this.props=[],this.addHeaderData(e)}return e.prototype.addHeaderData=function(e){var t=e?e.split(", "):[];this.props=t.map((function(e){var t=e.split("=");return{key:t[0],value:t[1]}})).concat(this.props)},e.prototype.serializeToHeader=function(){return this.props.map((function(e){return e.key+"="+e.value})).join(", ")},e.prototype.getProperty=function(e){for(var t=0;t0&&process.once("uncaughtException",(function(){e.post.call(l,p,!0),s.delete(h),e.destroy.call(null,p)}))}e.post.call(l,p,!1),u=null,(a||d)&&(d=!1,s.delete(h),e.destroy.call(null,p))},h=c.apply(n,r),s.set(h,p),h},n[i]=function(t){if(u===t&&null!==t)d=!0;else if(s.has(t)){const r=s.get(t);s.delete(t),e.destroy.call(null,r)}l.apply(n,arguments)}}e.exports=function(){p(this._hooks,this._state,"setTimeout","clearTimeout",i,a,!0),p(this._hooks,this._state,"setInterval","clearInterval",o,c,!1),p(this._hooks,this._state,"setImmediate","clearImmediate",s,l,!0),global.setTimeout=n.setTimeout,global.setInterval=n.setInterval,global.setImmediate=n.setImmediate,global.clearTimeout=n.clearTimeout,global.clearInterval=n.clearInterval,global.clearImmediate=n.clearImmediate}},57600:e=>{"use strict";e.exports=(e,t)=>class extends e{constructor(e){var r,n;super((function(e,o){r=this,n=[function(r){return t(i,!1),e(r)},function(e){return t(i,!1),o(e)}]}));var i=this;try{e.apply(r,n)}catch(e){n[1](e)}return i}}},61747:(e,t,r)=>{var n,i,o=r(94403).wrap,s=[],a=0,c=!1,l=[];function u(e,t){var r=e.length,n=t.length,i=[];if(0===r&&0===n)return i;for(var o=0;o0&&(s=l.pop()),d=void 0,r&&!c},i=function(e,t,r){var n=[];c=!0;for(var i=0;i0&&t[i].before(this,n[t[i].uid]);c=!1;var o=e.apply(this,arguments);for(c=!0,i=0;i0&&t[i].after(this,n[t[i].uid]);return c=!1,s=l.pop(),d=void 0,o}},o(process,"_fatalException",(function(e){return function(t){return n(t)||e(t)}}))}else{var h=!1;n=function(e){if(h)throw e;for(var t=!1,r=s.length,n=0;n0&&t[p].before(this,i[t[p].uid]);c=!1;try{o=e.apply(this,arguments)}catch(e){for(a=!0,p=0;p0&&t[p].after(this,i[t[p].uid]);c=!1}s=l.pop()}return o}},process.addListener("uncaughtException",n)}function f(e,t){"function"==typeof e.create&&(this.create=e.create,this.flags|=1),"function"==typeof e.before&&(this.before=e.before,this.flags|=2),"function"==typeof e.after&&(this.after=e.after,this.flags|=4),"function"==typeof e.error&&(this.error=e.error,this.flags|=8),this.uid=++a,this.data=void 0===t?null:t}function g(e,t){if("object"!=typeof e||!e)throw new TypeError("callbacks argument must be an object");return e instanceof f?e:new f(e,t)}f.prototype.create=void 0,f.prototype.before=void 0,f.prototype.after=void 0,f.prototype.error=void 0,f.prototype.data=void 0,f.prototype.uid=0,f.prototype.flags=0,process.createAsyncListener=g,process.addAsyncListener=function(e,t){var r;r=e instanceof f?e:g(e,t);for(var n=!1,i=0;i0)return i(e,r,t);return function(e,t,r){c=!0;for(var n=0;n{"use strict";if(process.addAsyncListener)throw new Error("Don't require polyfill unless needed");var n=r(94403),i=r(3341),o=n.wrap,s=n.massWrap,a=r(61747),c=r(73837),l=i.gte(process.version,"6.0.0"),u=i.gte(process.version,"7.0.0"),d=i.gte(process.version,"8.0.0"),p=i.gte(process.version,"11.0.0"),h=r(41808);function f(e){return function(){this.on("connection",(function(e){e._handle&&(e._handle.onread=a(e._handle.onread))}));try{return e.apply(this,arguments)}finally{this._handle&&this._handle.onconnection&&(this._handle.onconnection=a(this._handle.onconnection))}}}function g(e){if(e&&e._handle){var t=e._handle;t._originalOnread||(t._originalOnread=t.onread),t.onread=a(t._originalOnread)}}u&&!h._normalizeArgs?h._normalizeArgs=function(e){if(0===e.length)return[{},null];var t,r,n=e[0],i={};"object"==typeof n&&null!==n?i=n:"string"==typeof(t=n)&&!1===(r=t,(r=Number(r))>=0&&r)?i.path=n:(i.port=n,e.length>1&&"string"==typeof e[1]&&(i.host=e[1]));var o=e[e.length-1];return"function"!=typeof o?[i,null]:[i,o]}:u||h._normalizeConnectArgs||(h._normalizeConnectArgs=function(e){var t,r={};"object"==typeof e[0]&&null!==e[0]?r=e[0]:"string"==typeof e[0]&&!1===(t=e[0],(t=Number(t))>=0&&t)?r.path=e[0]:(r.port=e[0],"string"==typeof e[1]&&(r.host=e[1]));var n=e[e.length-1];return"function"==typeof n?[r,n]:[r]}),"_setUpListenHandle"in h.Server.prototype?o(h.Server.prototype,"_setUpListenHandle",f):o(h.Server.prototype,"_listen2",f),o(h.Socket.prototype,"connect",(function(e){return function(){var t;(t=d&&Array.isArray(arguments[0])&&Object.getOwnPropertySymbols(arguments[0]).length>0?arguments[0]:u?h._normalizeArgs(arguments):h._normalizeConnectArgs(arguments))[1]&&(t[1]=a(t[1]));var r=e.apply(this,t);return g(this),r}}));var m=r(13685);o(m.Agent.prototype,"addRequest",(function(e){return function(t){var r=t.onSocket;return t.onSocket=a((function(e){return g(e),r.apply(this,arguments)})),e.apply(this,arguments)}}));var y=r(32081);function v(e){Array.isArray(e.stdio)&&e.stdio.forEach((function(e){e&&e._handle&&(e._handle.onread=a(e._handle.onread),o(e._handle,"close",N))})),e._handle&&(e._handle.onexit=a(e._handle.onexit))}y.ChildProcess?o(y.ChildProcess.prototype,"spawn",(function(e){return function(){var t=e.apply(this,arguments);return v(this),t}})):s(y,["execFile","fork","spawn"],(function(e){return function(){var t=e.apply(this,arguments);return v(t),t}})),process._fatalException||(process._originalNextTick=process.nextTick);var _=[];process._nextDomainTick&&_.push("_nextDomainTick"),process._tickDomainCallback&&_.push("_tickDomainCallback"),s(process,_,R),o(process,"nextTick",N);var b=["setTimeout","setInterval"];global.setImmediate&&b.push("setImmediate");var w=r(39512),C=global.setTimeout===w.setTimeout;s(w,b,N),C&&s(global,b,N);var E=r(9523);s(E,["lookup","resolve","resolve4","resolve6","resolveCname","resolveMx","resolveNs","resolveTxt","resolveSrv","reverse"],R),E.resolveNaptr&&o(E,"resolveNaptr",R);var T,S,x=r(57147);s(x,["watch","rename","truncate","chown","fchown","chmod","fchmod","stat","lstat","fstat","link","symlink","readlink","realpath","unlink","rmdir","mkdir","readdir","close","open","utimes","futimes","fsync","write","read","readFile","writeFile","appendFile","watchFile","unwatchFile","exists"],R),x.lchown&&o(x,"lchown",R),x.lchmod&&o(x,"lchmod",R),x.ftruncate&&o(x,"ftruncate",R);try{T=r(59796)}catch(e){}if(T&&T.Deflate&&T.Deflate.prototype){var k=Object.getPrototypeOf(T.Deflate.prototype);k._transform?o(k,"_transform",R):k.write&&k.flush&&k.end&&s(k,["write","flush","end"],R)}try{S=r(6113)}catch(e){}if(S){var I=["pbkdf2","randomBytes"];p||I.push("pseudoRandomBytes"),s(S,I,R)}var A=!!global.Promise&&"function Promise() { [native code] }"===Promise.toString()&&"function toString() { [native code] }"===Promise.toString.toString();if(A){var P=process.addAsyncListener({create:function(){A=!1}});global.Promise.resolve(!0).then((function(){A=!1})),process.removeAsyncListener(P)}function R(e){var t=function(){var t,r=arguments.length-1;if("function"==typeof arguments[r]){t=Array(arguments.length);for(var n=0;n{var r;t=e.exports=K,r="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},t.SEMVER_SPEC_VERSION="2.0.0";var n=Number.MAX_SAFE_INTEGER||9007199254740991,i=t.re=[],o=t.src=[],s=0,a=s++;o[a]="0|[1-9]\\d*";var c=s++;o[c]="[0-9]+";var l=s++;o[l]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var u=s++;o[u]="("+o[a]+")\\.("+o[a]+")\\.("+o[a]+")";var d=s++;o[d]="("+o[c]+")\\.("+o[c]+")\\.("+o[c]+")";var p=s++;o[p]="(?:"+o[a]+"|"+o[l]+")";var h=s++;o[h]="(?:"+o[c]+"|"+o[l]+")";var f=s++;o[f]="(?:-("+o[p]+"(?:\\."+o[p]+")*))";var g=s++;o[g]="(?:-?("+o[h]+"(?:\\."+o[h]+")*))";var m=s++;o[m]="[0-9A-Za-z-]+";var y=s++;o[y]="(?:\\+("+o[m]+"(?:\\."+o[m]+")*))";var v=s++,_="v?"+o[u]+o[f]+"?"+o[y]+"?";o[v]="^"+_+"$";var b="[v=\\s]*"+o[d]+o[g]+"?"+o[y]+"?",w=s++;o[w]="^"+b+"$";var C=s++;o[C]="((?:<|>)?=?)";var E=s++;o[E]=o[c]+"|x|X|\\*";var T=s++;o[T]=o[a]+"|x|X|\\*";var S=s++;o[S]="[v=\\s]*("+o[T]+")(?:\\.("+o[T]+")(?:\\.("+o[T]+")(?:"+o[f]+")?"+o[y]+"?)?)?";var x=s++;o[x]="[v=\\s]*("+o[E]+")(?:\\.("+o[E]+")(?:\\.("+o[E]+")(?:"+o[g]+")?"+o[y]+"?)?)?";var k=s++;o[k]="^"+o[C]+"\\s*"+o[S]+"$";var I=s++;o[I]="^"+o[C]+"\\s*"+o[x]+"$";var A=s++;o[A]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var P=s++;o[P]="(?:~>?)";var R=s++;o[R]="(\\s*)"+o[P]+"\\s+",i[R]=new RegExp(o[R],"g");var N=s++;o[N]="^"+o[P]+o[S]+"$";var O=s++;o[O]="^"+o[P]+o[x]+"$";var D=s++;o[D]="(?:\\^)";var L=s++;o[L]="(\\s*)"+o[D]+"\\s+",i[L]=new RegExp(o[L],"g");var M=s++;o[M]="^"+o[D]+o[S]+"$";var B=s++;o[B]="^"+o[D]+o[x]+"$";var F=s++;o[F]="^"+o[C]+"\\s*("+b+")$|^$";var j=s++;o[j]="^"+o[C]+"\\s*("+_+")$|^$";var U=s++;o[U]="(\\s*)"+o[C]+"\\s*("+b+"|"+o[S]+")",i[U]=new RegExp(o[U],"g");var $=s++;o[$]="^\\s*("+o[S]+")\\s+-\\s+("+o[S]+")\\s*$";var q=s++;o[q]="^\\s*("+o[x]+")\\s+-\\s+("+o[x]+")\\s*$";var H=s++;o[H]="(<|>)?=?\\s*\\*";for(var V=0;V<35;V++)r(V,o[V]),i[V]||(i[V]=new RegExp(o[V]));function z(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof K)return e;if("string"!=typeof e)return null;if(e.length>256)return null;if(!(t.loose?i[w]:i[v]).test(e))return null;try{return new K(e,t)}catch(e){return null}}function K(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof K){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>256)throw new TypeError("version is longer than 256 characters");if(!(this instanceof K))return new K(e,t);r("SemVer",e,t),this.options=t,this.loose=!!t.loose;var o=e.trim().match(t.loose?i[w]:i[v]);if(!o)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);-1===r&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},t.inc=function(e,t,r,n){"string"==typeof r&&(n=r,r=void 0);try{return new K(e,r).inc(t,n).version}catch(e){return null}},t.diff=function(e,t){if(X(e,t))return null;var r=z(e),n=z(t),i="";if(r.prerelease.length||n.prerelease.length){i="pre";var o="prerelease"}for(var s in r)if(("major"===s||"minor"===s||"patch"===s)&&r[s]!==n[s])return i+s;return o},t.compareIdentifiers=G;var W=/^[0-9]+$/;function G(e,t){var r=W.test(e),n=W.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:e0}function J(e,t,r){return Q(e,t,r)<0}function X(e,t,r){return 0===Q(e,t,r)}function Z(e,t,r){return 0!==Q(e,t,r)}function ee(e,t,r){return Q(e,t,r)>=0}function te(e,t,r){return Q(e,t,r)<=0}function re(e,t,r,n){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return X(e,r,n);case"!=":return Z(e,r,n);case">":return Y(e,r,n);case">=":return ee(e,r,n);case"<":return J(e,r,n);case"<=":return te(e,r,n);default:throw new TypeError("Invalid operator: "+t)}}function ne(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof ne){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof ne))return new ne(e,t);r("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===ie?this.value="":this.value=this.operator+this.semver.version,r("comp",this)}t.rcompareIdentifiers=function(e,t){return G(t,e)},t.major=function(e,t){return new K(e,t).major},t.minor=function(e,t){return new K(e,t).minor},t.patch=function(e,t){return new K(e,t).patch},t.compare=Q,t.compareLoose=function(e,t){return Q(e,t,!0)},t.rcompare=function(e,t,r){return Q(t,e,r)},t.sort=function(e,r){return e.sort((function(e,n){return t.compare(e,n,r)}))},t.rsort=function(e,r){return e.sort((function(e,n){return t.rcompare(e,n,r)}))},t.gt=Y,t.lt=J,t.eq=X,t.neq=Z,t.gte=ee,t.lte=te,t.cmp=re,t.Comparator=ne;var ie={};function oe(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof oe)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new oe(e.raw,t);if(e instanceof ne)return new oe(e.value,t);if(!(this instanceof oe))return new oe(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function se(e){return!e||"x"===e.toLowerCase()||"*"===e}function ae(e,t,r,n,i,o,s,a,c,l,u,d,p){return((t=se(r)?"":se(n)?">="+r+".0.0":se(i)?">="+r+"."+n+".0":">="+t)+" "+(a=se(c)?"":se(l)?"<"+(+c+1)+".0.0":se(u)?"<"+c+"."+(+l+1)+".0":d?"<="+c+"."+l+"."+u+"-"+d:"<="+a)).trim()}function ce(e,t,n){for(var i=0;i0){var o=e[i].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch)return!0}return!1}return!0}function le(e,t,r){try{t=new oe(t,r)}catch(e){return!1}return t.test(e)}function ue(e,t,r,n){var i,o,s,a,c;switch(e=new K(e,n),t=new oe(t,n),r){case">":i=Y,o=te,s=J,a=">",c=">=";break;case"<":i=J,o=ee,s=Y,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(le(e,t,n))return!1;for(var l=0;l=0.0.0")),d=d||e,p=p||e,i(e.semver,d.semver,n)?d=e:s(e.semver,p.semver,n)&&(p=e)})),d.operator===a||d.operator===c)return!1;if((!p.operator||p.operator===a)&&o(e,p.semver))return!1;if(p.operator===c&&s(e,p.semver))return!1}return!0}ne.prototype.parse=function(e){var t=this.options.loose?i[F]:i[j],r=e.match(t);if(!r)throw new TypeError("Invalid comparator: "+e);this.operator=r[1],"="===this.operator&&(this.operator=""),r[2]?this.semver=new K(r[2],this.options.loose):this.semver=ie},ne.prototype.toString=function(){return this.value},ne.prototype.test=function(e){return r("Comparator.test",e,this.options.loose),this.semver===ie||("string"==typeof e&&(e=new K(e,this.options)),re(e,this.operator,this.semver,this.options))},ne.prototype.intersects=function(e,t){if(!(e instanceof ne))throw new TypeError("a Comparator is required");var r;if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return r=new oe(e.value,t),le(this.value,r,t);if(""===e.operator)return r=new oe(this.value,t),le(e.semver,r,t);var n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),o=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=re(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=re(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||i||o&&s||a||c},t.Range=oe,oe.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},oe.prototype.toString=function(){return this.range},oe.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var n=t?i[q]:i[$];e=e.replace(n,ae),r("hyphen replace",e),e=e.replace(i[U],"$1$2$3"),r("comparator trim",e,i[U]),e=(e=(e=e.replace(i[R],"$1~")).replace(i[L],"$1^")).split(/\s+/).join(" ");var o=t?i[F]:i[j],s=e.split(" ").map((function(e){return function(e,t){return r("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){r("caret",e,t);var n=t.loose?i[B]:i[M];return e.replace(n,(function(t,n,i,o,s){var a;return r("caret",e,t,n,i,o,s),se(n)?a="":se(i)?a=">="+n+".0.0 <"+(+n+1)+".0.0":se(o)?a="0"===n?">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0":">="+n+"."+i+".0 <"+(+n+1)+".0.0":s?(r("replaceCaret pr",s),a="0"===n?"0"===i?">="+n+"."+i+"."+o+"-"+s+" <"+n+"."+i+"."+(+o+1):">="+n+"."+i+"."+o+"-"+s+" <"+n+"."+(+i+1)+".0":">="+n+"."+i+"."+o+"-"+s+" <"+(+n+1)+".0.0"):(r("no pr"),a="0"===n?"0"===i?">="+n+"."+i+"."+o+" <"+n+"."+i+"."+(+o+1):">="+n+"."+i+"."+o+" <"+n+"."+(+i+1)+".0":">="+n+"."+i+"."+o+" <"+(+n+1)+".0.0"),r("caret return",a),a}))}(e,t)})).join(" ")}(e,t),r("caret",e),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){var n=t.loose?i[O]:i[N];return e.replace(n,(function(t,n,i,o,s){var a;return r("tilde",e,t,n,i,o,s),se(n)?a="":se(i)?a=">="+n+".0.0 <"+(+n+1)+".0.0":se(o)?a=">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0":s?(r("replaceTilde pr",s),a=">="+n+"."+i+"."+o+"-"+s+" <"+n+"."+(+i+1)+".0"):a=">="+n+"."+i+"."+o+" <"+n+"."+(+i+1)+".0",r("tilde return",a),a}))}(e,t)})).join(" ")}(e,t),r("tildes",e),e=function(e,t){return r("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return function(e,t){e=e.trim();var n=t.loose?i[I]:i[k];return e.replace(n,(function(t,n,i,o,s,a){r("xRange",e,t,n,i,o,s,a);var c=se(i),l=c||se(o),u=l||se(s);return"="===n&&u&&(n=""),c?t=">"===n||"<"===n?"<0.0.0":"*":n&&u?(l&&(o=0),s=0,">"===n?(n=">=",l?(i=+i+1,o=0,s=0):(o=+o+1,s=0)):"<="===n&&(n="<",l?i=+i+1:o=+o+1),t=n+i+"."+o+"."+s):l?t=">="+i+".0.0 <"+(+i+1)+".0.0":u&&(t=">="+i+"."+o+".0 <"+i+"."+(+o+1)+".0"),r("xRange return",t),t}))}(e,t)})).join(" ")}(e,t),r("xrange",e),e=function(e,t){return r("replaceStars",e,t),e.trim().replace(i[H],"")}(e,t),r("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(s=s.filter((function(e){return!!e.match(o)}))),s.map((function(e){return new ne(e,this.options)}),this)},oe.prototype.intersects=function(e,t){if(!(e instanceof oe))throw new TypeError("a Range is required");return this.set.some((function(r){return r.every((function(r){return e.set.some((function(e){return e.every((function(e){return r.intersects(e,t)}))}))}))}))},t.toComparators=function(e,t){return new oe(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},oe.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new K(e,this.options));for(var t=0;t":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":r&&!Y(r,t)||(r=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}));return r&&e.test(r)?r:null},t.validRange=function(e,t){try{return new oe(e,t).range||"*"}catch(e){return null}},t.ltr=function(e,t,r){return ue(e,t,"<",r)},t.gtr=function(e,t,r){return ue(e,t,">",r)},t.outside=ue,t.prerelease=function(e,t){var r=z(e,t);return r&&r.prerelease.length?r.prerelease:null},t.intersects=function(e,t,r){return e=new oe(e,r),t=new oe(t,r),e.intersects(t)},t.coerce=function(e){if(e instanceof K)return e;if("string"!=typeof e)return null;var t=e.match(i[A]);return null==t?null:z(t[1]+"."+(t[2]||"0")+"."+(t[3]||"0"))}},42172:(e,t,r)=>{"use strict";const n=r(73837),i=r(39491),o=r(7267),s=r(20632),a="cls@contexts",c="error@context",l=[];for(let e in s.providers)l[s.providers[e]]=e;const u=process.env.DEBUG_CLS_HOOKED;let d=-1;function p(e){this.name=e,this.active=null,this._set=[],this.id=null,this._contexts=new Map}function h(e){return process.namespaces[e]}function f(e){let t=h(e);i.ok(t,"can't delete nonexistent namespace! \""+e+'"'),i.ok(t.id,"don't assign to process.namespaces directly! "+n.inspect(t)),process.namespaces[e]=null}function g(e){process.env.DEBUG&&process._rawDebug(e)}function m(e){return e?"function"==typeof e?e.name?e.name:(e.toString().trim().match(/^function\s*([^\s(]+)/)||[])[1]:e.constructor&&e.constructor.name?e.constructor.name:void 0:e}if(e.exports={getNamespace:h,createNamespace:function(e){i.ok(e,"namespace must be given a name."),u&&g("CREATING NAMESPACE "+e);let t=new p(e);return t.id=d,s.addHooks({init(r,i,o,s,a){d=r,s?(t._contexts.set(r,t._contexts.get(s)),u&&g("PARENTID: "+e+" uid:"+r+" parent:"+s+" provider:"+o)):t._contexts.set(d,t.active),u&&g("INIT "+e+" uid:"+r+" parent:"+s+" provider:"+l[o]+" active:"+n.inspect(t.active,!0))},pre(r,i){d=r;let o=t._contexts.get(r);o?(u&&g(" PRE "+e+" uid:"+r+" handle:"+m(i)+" context:"+n.inspect(o)),t.enter(o)):u&&g(" PRE MISSING CONTEXT "+e+" uid:"+r+" handle:"+m(i))},post(r,i){d=r;let o=t._contexts.get(r);o?(u&&g(" POST "+e+" uid:"+r+" handle:"+m(i)+" context:"+n.inspect(o)),t.exit(o)):u&&g(" POST MISSING CONTEXT "+e+" uid:"+r+" handle:"+m(i))},destroy(r){d=r,u&&g("DESTROY "+e+" uid:"+r+" context:"+n.inspect(t._contexts.get(d))+" active:"+n.inspect(t.active,!0)),t._contexts.delete(r)}}),process.namespaces[e]=t,t},destroyNamespace:f,reset:function(){process.namespaces&&Object.keys(process.namespaces).forEach((function(e){f(e)})),process.namespaces=Object.create(null)},ERROR_SYMBOL:c},p.prototype.set=function(e,t){if(!this.active)throw new Error("No context available. ns.run() or ns.bind() must be called first.");return u&&g(" SETTING KEY:"+e+"="+t+" in ns:"+this.name+" uid:"+d+" active:"+n.inspect(this.active,!0)),this.active[e]=t,t},p.prototype.get=function(e){if(this.active)return u&&g(" GETTING KEY:"+e+"="+this.active[e]+" "+this.name+" uid:"+d+" active:"+n.inspect(this.active,!0)),this.active[e];u&&g(" GETTING KEY:"+e+"=undefined "+this.name+" uid:"+d+" active:"+n.inspect(this.active,!0))},p.prototype.createContext=function(){u&&g(" CREATING Context: "+this.name+" uid:"+d+" len:"+this._set.length+" active:"+n.inspect(this.active,!0,2,!0));let e=Object.create(this.active?this.active:Object.prototype);return e._ns_name=this.name,e.id=d,u&&g(" CREATED Context: "+this.name+" uid:"+d+" len:"+this._set.length+" context:"+n.inspect(e,!0,2,!0)),e},p.prototype.run=function(e){let t=this.createContext();this.enter(t);try{return u&&g(" BEFORE RUN: "+this.name+" uid:"+d+" len:"+this._set.length+" "+n.inspect(t)),e(t),t}catch(e){throw e&&(e[c]=t),e}finally{u&&g(" AFTER RUN: "+this.name+" uid:"+d+" len:"+this._set.length+" "+n.inspect(t)),this.exit(t)}},p.prototype.runAndReturn=function(e){var t;return this.run((function(r){t=e(r)})),t},p.prototype.runPromise=function(e){let t=this.createContext();this.enter(t);let r=e(t);if(!r||!r.then||!r.catch)throw new Error("fn must return a promise.");return u&&g(" BEFORE runPromise: "+this.name+" uid:"+d+" len:"+this._set.length+" "+n.inspect(t)),r.then((e=>(u&&g(" AFTER runPromise: "+this.name+" uid:"+d+" len:"+this._set.length+" "+n.inspect(t)),this.exit(t),e))).catch((e=>{throw e[c]=t,u&&g(" AFTER runPromise: "+this.name+" uid:"+d+" len:"+this._set.length+" "+n.inspect(t)),this.exit(t),e}))},p.prototype.bind=function(e,t){t||(t=this.active?this.active:this.createContext());let r=this;return function(){r.enter(t);try{return e.apply(this,arguments)}catch(e){throw e&&(e[c]=t),e}finally{r.exit(t)}}},p.prototype.enter=function(e){i.ok(e,"context must be provided for entering"),u&&g(" ENTER "+this.name+" uid:"+d+" len:"+this._set.length+" context: "+n.inspect(e)),this._set.push(this.active),this.active=e},p.prototype.exit=function(e){if(i.ok(e,"context must be provided for exiting"),u&&g(" EXIT "+this.name+" uid:"+d+" len:"+this._set.length+" context: "+n.inspect(e)),this.active===e)return i.ok(this._set.length,"can't remove top context"),void(this.active=this._set.pop());let t=this._set.lastIndexOf(e);t<0?(u&&g("??ERROR?? context exiting but not entered - ignoring: "+n.inspect(e)),i.ok(t>=0,"context not currently entered; can't exit. \n"+n.inspect(this)+"\n"+n.inspect(e))):(i.ok(t,"can't remove top context"),this._set.splice(t,1))},p.prototype.bindEmitter=function(e){i.ok(e.on&&e.addListener&&e.emit,"can only bind real EEs");let t=this,r="context@"+this.name;o(e,(function(e){e&&(e[a]||(e[a]=Object.create(null)),e[a][r]={namespace:t,context:t.active})}),(function(e){if(!e||!e[a])return e;let t=e,r=e[a];return Object.keys(r).forEach((function(e){let n=r[e];t=n.namespace.bind(t,n.context)})),t}))},p.prototype.fromException=function(e){return e[c]},process.namespaces={},s._state&&!s._state.enabled&&s.enable(),u){var y=r(26818);for(var v in y.filter._modifiers)y.filter.deattach(v)}},68423:(e,t,r)=>{"use strict";const n=r(73837),i=r(39491),o=r(7267),s=r(50852),a="cls@contexts",c="error@context",l=process.env.DEBUG_CLS_HOOKED;let u=-1;function d(e){this.name=e,this.active=null,this._set=[],this.id=null,this._contexts=new Map,this._indent=0}function p(e){return process.namespaces[e]}function h(e){let t=p(e);i.ok(t,"can't delete nonexistent namespace! \""+e+'"'),i.ok(t.id,"don't assign to process.namespaces directly! "+n.inspect(t)),process.namespaces[e]=null}function f(...e){l&&process._rawDebug(`${n.format(...e)}`)}e.exports={getNamespace:p,createNamespace:function(e){i.ok(e,"namespace must be given a name."),l&&f(`NS-CREATING NAMESPACE (${e})`);let t=new d(e);return t.id=u,s.createHook({init(r,i,o,a){if(u=s.executionAsyncId(),t.active){if(t._contexts.set(r,t.active),l){f(`${" ".repeat(t._indent<0?0:t._indent)}INIT [${i}] (${e}) asyncId:${r} currentUid:${u} triggerId:${o} active:${n.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} resource:${a}`)}}else if(0===u){const o=s.triggerAsyncId(),c=t._contexts.get(o);if(c){if(t._contexts.set(r,c),l){f(`${" ".repeat(t._indent<0?0:t._indent)}INIT USING CONTEXT FROM TRIGGERID [${i}] (${e}) asyncId:${r} currentUid:${u} triggerId:${o} active:${n.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} resource:${a}`)}}else if(l){f(`${" ".repeat(t._indent<0?0:t._indent)}INIT MISSING CONTEXT [${i}] (${e}) asyncId:${r} currentUid:${u} triggerId:${o} active:${n.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} resource:${a}`)}}if(l&&"PROMISE"===i){f(n.inspect(a,{showHidden:!0}));const s=a.parentId;f(`${" ".repeat(t._indent<0?0:t._indent)}INIT RESOURCE-PROMISE [${i}] (${e}) parentId:${s} asyncId:${r} currentUid:${u} triggerId:${o} active:${n.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} resource:${a}`)}},before(r){let i;if(u=s.executionAsyncId(),i=t._contexts.get(r)||t._contexts.get(u),i){if(l){const o=s.triggerAsyncId();f(`${" ".repeat(t._indent<0?0:t._indent)}BEFORE (${e}) asyncId:${r} currentUid:${u} triggerId:${o} active:${n.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} context:${n.inspect(i)}`),t._indent+=2}t.enter(i)}else if(l){const i=s.triggerAsyncId();f(`${" ".repeat(t._indent<0?0:t._indent)}BEFORE MISSING CONTEXT (${e}) asyncId:${r} currentUid:${u} triggerId:${i} active:${n.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} namespace._contexts:${n.inspect(t._contexts,{showHidden:!0,depth:2,colors:!0})}`),t._indent+=2}},after(r){let i;if(u=s.executionAsyncId(),i=t._contexts.get(r)||t._contexts.get(u),i){if(l){const o=s.triggerAsyncId();t._indent-=2;f(`${" ".repeat(t._indent<0?0:t._indent)}AFTER (${e}) asyncId:${r} currentUid:${u} triggerId:${o} active:${n.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} context:${n.inspect(i)}`)}t.exit(i)}else if(l){const o=s.triggerAsyncId();t._indent-=2;f(`${" ".repeat(t._indent<0?0:t._indent)}AFTER MISSING CONTEXT (${e}) asyncId:${r} currentUid:${u} triggerId:${o} active:${n.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} context:${n.inspect(i)}`)}},destroy(r){if(u=s.executionAsyncId(),l){const i=s.triggerAsyncId();f(`${" ".repeat(t._indent<0?0:t._indent)}DESTROY (${e}) currentUid:${u} asyncId:${r} triggerId:${i} active:${n.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} context:${n.inspect(t._contexts.get(u))}`)}t._contexts.delete(r)}}).enable(),process.namespaces[e]=t,t},destroyNamespace:h,reset:function(){process.namespaces&&Object.keys(process.namespaces).forEach((function(e){h(e)})),process.namespaces=Object.create(null)},ERROR_SYMBOL:c},d.prototype.set=function(e,t){if(!this.active)throw new Error("No context available. ns.run() or ns.bind() must be called first.");return this.active[e]=t,l&&f(" ".repeat(this._indent<0?0:this._indent)+"CONTEXT-SET KEY:"+e+"="+t+" in ns:"+this.name+" currentUid:"+u+" active:"+n.inspect(this.active,{showHidden:!0,depth:2,colors:!0})),t},d.prototype.get=function(e){if(this.active){if(l){const t=s.executionAsyncId(),r=s.triggerAsyncId(),i=" ".repeat(this._indent<0?0:this._indent);f(i+"CONTEXT-GETTING KEY:"+e+"="+this.active[e]+" ("+this.name+") currentUid:"+u+" active:"+n.inspect(this.active,{showHidden:!0,depth:2,colors:!0})),f(`${i}CONTEXT-GETTING KEY: (${this.name}) ${e}=${this.active[e]} currentUid:${u} asyncHooksCurrentId:${t} triggerId:${r} len:${this._set.length} active:${n.inspect(this.active)}`)}return this.active[e]}if(l){const t=s.currentId(),r=s.triggerAsyncId();f(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-GETTING KEY NO ACTIVE NS: (${this.name}) ${e}=undefined currentUid:${u} asyncHooksCurrentId:${t} triggerId:${r} len:${this._set.length}`)}},d.prototype.createContext=function(){let e=Object.create(this.active?this.active:Object.prototype);if(e._ns_name=this.name,e.id=u,l){const t=s.executionAsyncId(),r=s.triggerAsyncId();f(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-CREATED Context: (${this.name}) currentUid:${u} asyncHooksCurrentId:${t} triggerId:${r} len:${this._set.length} context:${n.inspect(e,{showHidden:!0,depth:2,colors:!0})}`)}return e},d.prototype.run=function(e){let t=this.createContext();this.enter(t);try{if(l){const e=s.triggerAsyncId(),r=s.executionAsyncId();f(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-RUN BEGIN: (${this.name}) currentUid:${u} triggerId:${e} asyncHooksCurrentId:${r} len:${this._set.length} context:${n.inspect(t)}`)}return e(t),t}catch(e){throw e&&(e[c]=t),e}finally{if(l){const e=s.triggerAsyncId(),r=s.executionAsyncId();f(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-RUN END: (${this.name}) currentUid:${u} triggerId:${e} asyncHooksCurrentId:${r} len:${this._set.length} ${n.inspect(t)}`)}this.exit(t)}},d.prototype.runAndReturn=function(e){let t;return this.run((function(r){t=e(r)})),t},d.prototype.runPromise=function(e){let t=this.createContext();this.enter(t);let r=e(t);if(!r||!r.then||!r.catch)throw new Error("fn must return a promise.");return l&&f("CONTEXT-runPromise BEFORE: ("+this.name+") currentUid:"+u+" len:"+this._set.length+" "+n.inspect(t)),r.then((e=>(l&&f("CONTEXT-runPromise AFTER then: ("+this.name+") currentUid:"+u+" len:"+this._set.length+" "+n.inspect(t)),this.exit(t),e))).catch((e=>{throw e[c]=t,l&&f("CONTEXT-runPromise AFTER catch: ("+this.name+") currentUid:"+u+" len:"+this._set.length+" "+n.inspect(t)),this.exit(t),e}))},d.prototype.bind=function(e,t){t||(t=this.active?this.active:this.createContext());let r=this;return function(){r.enter(t);try{return e.apply(this,arguments)}catch(e){throw e&&(e[c]=t),e}finally{r.exit(t)}}},d.prototype.enter=function(e){if(i.ok(e,"context must be provided for entering"),l){const t=s.executionAsyncId(),r=s.triggerAsyncId();f(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-ENTER: (${this.name}) currentUid:${u} triggerId:${r} asyncHooksCurrentId:${t} len:${this._set.length} ${n.inspect(e)}`)}this._set.push(this.active),this.active=e},d.prototype.exit=function(e){if(i.ok(e,"context must be provided for exiting"),l){const t=s.executionAsyncId(),r=s.triggerAsyncId();f(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-EXIT: (${this.name}) currentUid:${u} triggerId:${r} asyncHooksCurrentId:${t} len:${this._set.length} ${n.inspect(e)}`)}if(this.active===e)return i.ok(this._set.length,"can't remove top context"),void(this.active=this._set.pop());let t=this._set.lastIndexOf(e);t<0?(l&&f("??ERROR?? context exiting but not entered - ignoring: "+n.inspect(e)),i.ok(t>=0,"context not currently entered; can't exit. \n"+n.inspect(this)+"\n"+n.inspect(e))):(i.ok(t,"can't remove top context"),this._set.splice(t,1))},d.prototype.bindEmitter=function(e){i.ok(e.on&&e.addListener&&e.emit,"can only bind real EEs");let t=this,r="context@"+this.name;o(e,(function(e){e&&(e[a]||(e[a]=Object.create(null)),e[a][r]={namespace:t,context:t.active})}),(function(e){if(!e||!e[a])return e;let t=e,r=e[a];return Object.keys(r).forEach((function(e){let n=r[e];t=n.namespace.bind(t,n.context)})),t}))},d.prototype.fromException=function(e){return e[c]},process.namespaces={}},19172:(e,t,r)=>{"use strict";const n=r(22173);process&&n.gte(process.versions.node,"8.0.0")?e.exports=r(68423):e.exports=r(42172)},22173:(e,t)=>{var r;t=e.exports=K,r="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},t.SEMVER_SPEC_VERSION="2.0.0";var n=Number.MAX_SAFE_INTEGER||9007199254740991,i=t.re=[],o=t.src=[],s=0,a=s++;o[a]="0|[1-9]\\d*";var c=s++;o[c]="[0-9]+";var l=s++;o[l]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var u=s++;o[u]="("+o[a]+")\\.("+o[a]+")\\.("+o[a]+")";var d=s++;o[d]="("+o[c]+")\\.("+o[c]+")\\.("+o[c]+")";var p=s++;o[p]="(?:"+o[a]+"|"+o[l]+")";var h=s++;o[h]="(?:"+o[c]+"|"+o[l]+")";var f=s++;o[f]="(?:-("+o[p]+"(?:\\."+o[p]+")*))";var g=s++;o[g]="(?:-?("+o[h]+"(?:\\."+o[h]+")*))";var m=s++;o[m]="[0-9A-Za-z-]+";var y=s++;o[y]="(?:\\+("+o[m]+"(?:\\."+o[m]+")*))";var v=s++,_="v?"+o[u]+o[f]+"?"+o[y]+"?";o[v]="^"+_+"$";var b="[v=\\s]*"+o[d]+o[g]+"?"+o[y]+"?",w=s++;o[w]="^"+b+"$";var C=s++;o[C]="((?:<|>)?=?)";var E=s++;o[E]=o[c]+"|x|X|\\*";var T=s++;o[T]=o[a]+"|x|X|\\*";var S=s++;o[S]="[v=\\s]*("+o[T]+")(?:\\.("+o[T]+")(?:\\.("+o[T]+")(?:"+o[f]+")?"+o[y]+"?)?)?";var x=s++;o[x]="[v=\\s]*("+o[E]+")(?:\\.("+o[E]+")(?:\\.("+o[E]+")(?:"+o[g]+")?"+o[y]+"?)?)?";var k=s++;o[k]="^"+o[C]+"\\s*"+o[S]+"$";var I=s++;o[I]="^"+o[C]+"\\s*"+o[x]+"$";var A=s++;o[A]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var P=s++;o[P]="(?:~>?)";var R=s++;o[R]="(\\s*)"+o[P]+"\\s+",i[R]=new RegExp(o[R],"g");var N=s++;o[N]="^"+o[P]+o[S]+"$";var O=s++;o[O]="^"+o[P]+o[x]+"$";var D=s++;o[D]="(?:\\^)";var L=s++;o[L]="(\\s*)"+o[D]+"\\s+",i[L]=new RegExp(o[L],"g");var M=s++;o[M]="^"+o[D]+o[S]+"$";var B=s++;o[B]="^"+o[D]+o[x]+"$";var F=s++;o[F]="^"+o[C]+"\\s*("+b+")$|^$";var j=s++;o[j]="^"+o[C]+"\\s*("+_+")$|^$";var U=s++;o[U]="(\\s*)"+o[C]+"\\s*("+b+"|"+o[S]+")",i[U]=new RegExp(o[U],"g");var $=s++;o[$]="^\\s*("+o[S]+")\\s+-\\s+("+o[S]+")\\s*$";var q=s++;o[q]="^\\s*("+o[x]+")\\s+-\\s+("+o[x]+")\\s*$";var H=s++;o[H]="(<|>)?=?\\s*\\*";for(var V=0;V<35;V++)r(V,o[V]),i[V]||(i[V]=new RegExp(o[V]));function z(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof K)return e;if("string"!=typeof e)return null;if(e.length>256)return null;if(!(t.loose?i[w]:i[v]).test(e))return null;try{return new K(e,t)}catch(e){return null}}function K(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof K){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>256)throw new TypeError("version is longer than 256 characters");if(!(this instanceof K))return new K(e,t);r("SemVer",e,t),this.options=t,this.loose=!!t.loose;var o=e.trim().match(t.loose?i[w]:i[v]);if(!o)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);-1===r&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},t.inc=function(e,t,r,n){"string"==typeof r&&(n=r,r=void 0);try{return new K(e,r).inc(t,n).version}catch(e){return null}},t.diff=function(e,t){if(X(e,t))return null;var r=z(e),n=z(t),i="";if(r.prerelease.length||n.prerelease.length){i="pre";var o="prerelease"}for(var s in r)if(("major"===s||"minor"===s||"patch"===s)&&r[s]!==n[s])return i+s;return o},t.compareIdentifiers=G;var W=/^[0-9]+$/;function G(e,t){var r=W.test(e),n=W.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:e0}function J(e,t,r){return Q(e,t,r)<0}function X(e,t,r){return 0===Q(e,t,r)}function Z(e,t,r){return 0!==Q(e,t,r)}function ee(e,t,r){return Q(e,t,r)>=0}function te(e,t,r){return Q(e,t,r)<=0}function re(e,t,r,n){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return X(e,r,n);case"!=":return Z(e,r,n);case">":return Y(e,r,n);case">=":return ee(e,r,n);case"<":return J(e,r,n);case"<=":return te(e,r,n);default:throw new TypeError("Invalid operator: "+t)}}function ne(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof ne){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof ne))return new ne(e,t);r("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===ie?this.value="":this.value=this.operator+this.semver.version,r("comp",this)}t.rcompareIdentifiers=function(e,t){return G(t,e)},t.major=function(e,t){return new K(e,t).major},t.minor=function(e,t){return new K(e,t).minor},t.patch=function(e,t){return new K(e,t).patch},t.compare=Q,t.compareLoose=function(e,t){return Q(e,t,!0)},t.rcompare=function(e,t,r){return Q(t,e,r)},t.sort=function(e,r){return e.sort((function(e,n){return t.compare(e,n,r)}))},t.rsort=function(e,r){return e.sort((function(e,n){return t.rcompare(e,n,r)}))},t.gt=Y,t.lt=J,t.eq=X,t.neq=Z,t.gte=ee,t.lte=te,t.cmp=re,t.Comparator=ne;var ie={};function oe(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof oe)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new oe(e.raw,t);if(e instanceof ne)return new oe(e.value,t);if(!(this instanceof oe))return new oe(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function se(e){return!e||"x"===e.toLowerCase()||"*"===e}function ae(e,t,r,n,i,o,s,a,c,l,u,d,p){return((t=se(r)?"":se(n)?">="+r+".0.0":se(i)?">="+r+"."+n+".0":">="+t)+" "+(a=se(c)?"":se(l)?"<"+(+c+1)+".0.0":se(u)?"<"+c+"."+(+l+1)+".0":d?"<="+c+"."+l+"."+u+"-"+d:"<="+a)).trim()}function ce(e,t,n){for(var i=0;i0){var o=e[i].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch)return!0}return!1}return!0}function le(e,t,r){try{t=new oe(t,r)}catch(e){return!1}return t.test(e)}function ue(e,t,r,n){var i,o,s,a,c;switch(e=new K(e,n),t=new oe(t,n),r){case">":i=Y,o=te,s=J,a=">",c=">=";break;case"<":i=J,o=ee,s=Y,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(le(e,t,n))return!1;for(var l=0;l=0.0.0")),d=d||e,p=p||e,i(e.semver,d.semver,n)?d=e:s(e.semver,p.semver,n)&&(p=e)})),d.operator===a||d.operator===c)return!1;if((!p.operator||p.operator===a)&&o(e,p.semver))return!1;if(p.operator===c&&s(e,p.semver))return!1}return!0}ne.prototype.parse=function(e){var t=this.options.loose?i[F]:i[j],r=e.match(t);if(!r)throw new TypeError("Invalid comparator: "+e);this.operator=r[1],"="===this.operator&&(this.operator=""),r[2]?this.semver=new K(r[2],this.options.loose):this.semver=ie},ne.prototype.toString=function(){return this.value},ne.prototype.test=function(e){return r("Comparator.test",e,this.options.loose),this.semver===ie||("string"==typeof e&&(e=new K(e,this.options)),re(e,this.operator,this.semver,this.options))},ne.prototype.intersects=function(e,t){if(!(e instanceof ne))throw new TypeError("a Comparator is required");var r;if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return r=new oe(e.value,t),le(this.value,r,t);if(""===e.operator)return r=new oe(this.value,t),le(e.semver,r,t);var n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),o=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=re(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=re(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||i||o&&s||a||c},t.Range=oe,oe.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},oe.prototype.toString=function(){return this.range},oe.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var n=t?i[q]:i[$];e=e.replace(n,ae),r("hyphen replace",e),e=e.replace(i[U],"$1$2$3"),r("comparator trim",e,i[U]),e=(e=(e=e.replace(i[R],"$1~")).replace(i[L],"$1^")).split(/\s+/).join(" ");var o=t?i[F]:i[j],s=e.split(" ").map((function(e){return function(e,t){return r("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){r("caret",e,t);var n=t.loose?i[B]:i[M];return e.replace(n,(function(t,n,i,o,s){var a;return r("caret",e,t,n,i,o,s),se(n)?a="":se(i)?a=">="+n+".0.0 <"+(+n+1)+".0.0":se(o)?a="0"===n?">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0":">="+n+"."+i+".0 <"+(+n+1)+".0.0":s?(r("replaceCaret pr",s),a="0"===n?"0"===i?">="+n+"."+i+"."+o+"-"+s+" <"+n+"."+i+"."+(+o+1):">="+n+"."+i+"."+o+"-"+s+" <"+n+"."+(+i+1)+".0":">="+n+"."+i+"."+o+"-"+s+" <"+(+n+1)+".0.0"):(r("no pr"),a="0"===n?"0"===i?">="+n+"."+i+"."+o+" <"+n+"."+i+"."+(+o+1):">="+n+"."+i+"."+o+" <"+n+"."+(+i+1)+".0":">="+n+"."+i+"."+o+" <"+(+n+1)+".0.0"),r("caret return",a),a}))}(e,t)})).join(" ")}(e,t),r("caret",e),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){var n=t.loose?i[O]:i[N];return e.replace(n,(function(t,n,i,o,s){var a;return r("tilde",e,t,n,i,o,s),se(n)?a="":se(i)?a=">="+n+".0.0 <"+(+n+1)+".0.0":se(o)?a=">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0":s?(r("replaceTilde pr",s),a=">="+n+"."+i+"."+o+"-"+s+" <"+n+"."+(+i+1)+".0"):a=">="+n+"."+i+"."+o+" <"+n+"."+(+i+1)+".0",r("tilde return",a),a}))}(e,t)})).join(" ")}(e,t),r("tildes",e),e=function(e,t){return r("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return function(e,t){e=e.trim();var n=t.loose?i[I]:i[k];return e.replace(n,(function(t,n,i,o,s,a){r("xRange",e,t,n,i,o,s,a);var c=se(i),l=c||se(o),u=l||se(s);return"="===n&&u&&(n=""),c?t=">"===n||"<"===n?"<0.0.0":"*":n&&u?(l&&(o=0),s=0,">"===n?(n=">=",l?(i=+i+1,o=0,s=0):(o=+o+1,s=0)):"<="===n&&(n="<",l?i=+i+1:o=+o+1),t=n+i+"."+o+"."+s):l?t=">="+i+".0.0 <"+(+i+1)+".0.0":u&&(t=">="+i+"."+o+".0 <"+i+"."+(+o+1)+".0"),r("xRange return",t),t}))}(e,t)})).join(" ")}(e,t),r("xrange",e),e=function(e,t){return r("replaceStars",e,t),e.trim().replace(i[H],"")}(e,t),r("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(s=s.filter((function(e){return!!e.match(o)}))),s.map((function(e){return new ne(e,this.options)}),this)},oe.prototype.intersects=function(e,t){if(!(e instanceof oe))throw new TypeError("a Range is required");return this.set.some((function(r){return r.every((function(r){return e.set.some((function(e){return e.every((function(e){return r.intersects(e,t)}))}))}))}))},t.toComparators=function(e,t){return new oe(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},oe.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new K(e,this.options));for(var t=0;t":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":r&&!Y(r,t)||(r=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}));return r&&e.test(r)?r:null},t.validRange=function(e,t){try{return new oe(e,t).range||"*"}catch(e){return null}},t.ltr=function(e,t,r){return ue(e,t,"<",r)},t.gtr=function(e,t,r){return ue(e,t,">",r)},t.outside=ue,t.prerelease=function(e,t){var r=z(e,t);return r&&r.prerelease.length?r.prerelease:null},t.intersects=function(e,t,r){return e=new oe(e,r),t=new oe(t,r),e.intersects(t)},t.coerce=function(e){if(e instanceof K)return e;if("string"!=typeof e)return null;var t=e.match(i[A]);return null==t?null:z(t[1]+"."+(t[2]||"0")+"."+(t[3]||"0"))}},92611:(e,t,r)=>{"use strict";var n=r(39491),i=r(7267),o="cls@contexts",s="error@context";function a(e){this.name=e,this.active=null,this._set=[],this.id=null}function c(e){return process.namespaces[e]}function l(e){var t=c(e);n.ok(t,"can't delete nonexistent namespace!"),n.ok(t.id,"don't assign to process.namespaces directly!"),process.removeAsyncListener(t.id),process.namespaces[e]=null}function u(){process.namespaces&&Object.keys(process.namespaces).forEach((function(e){l(e)})),process.namespaces=Object.create(null)}process.addAsyncListener||r(71274),a.prototype.set=function(e,t){if(!this.active)throw new Error("No context available. ns.run() or ns.bind() must be called first.");return this.active[e]=t,t},a.prototype.get=function(e){if(this.active)return this.active[e]},a.prototype.createContext=function(){return Object.create(this.active)},a.prototype.run=function(e){var t=this.createContext();this.enter(t);try{return e(t),t}catch(e){throw e&&(e[s]=t),e}finally{this.exit(t)}},a.prototype.runAndReturn=function(e){var t;return this.run((function(r){t=e(r)})),t},a.prototype.bind=function(e,t){t||(t=this.active?this.active:this.createContext());var r=this;return function(){r.enter(t);try{return e.apply(this,arguments)}catch(e){throw e&&(e[s]=t),e}finally{r.exit(t)}}},a.prototype.enter=function(e){n.ok(e,"context must be provided for entering"),this._set.push(this.active),this.active=e},a.prototype.exit=function(e){if(n.ok(e,"context must be provided for exiting"),this.active===e)return n.ok(this._set.length,"can't remove top context"),void(this.active=this._set.pop());var t=this._set.lastIndexOf(e);n.ok(t>=0,"context not currently entered; can't exit"),n.ok(t,"can't remove top context"),this._set.splice(t,1)},a.prototype.bindEmitter=function(e){n.ok(e.on&&e.addListener&&e.emit,"can only bind real EEs");var t=this,r="context@"+this.name;i(e,(function(e){e&&(e[o]||(e[o]=Object.create(null)),e[o][r]={namespace:t,context:t.active})}),(function(e){if(!e||!e[o])return e;var t=e,r=e[o];return Object.keys(r).forEach((function(e){var n=r[e];t=n.namespace.bind(t,n.context)})),t}))},a.prototype.fromException=function(e){return e[s]},process.namespaces||u(),e.exports={getNamespace:c,createNamespace:function(e){n.ok(e,"namespace must be given a name!");var t=new a(e);return t.id=process.addAsyncListener({create:function(){return t.active},before:function(e,r){r&&t.enter(r)},after:function(e,r){r&&t.exit(r)},error:function(e){e&&t.exit(e)}}),process.namespaces[e]=t,t},destroyNamespace:l,reset:u}},46725:function(e,t,r){var n;e.exports=(n=r(58112),r(58885),r(74678),r(6165),r(78976),function(){var e=n,t=e.lib.BlockCipher,r=e.algo,i=[],o=[],s=[],a=[],c=[],l=[],u=[],d=[],p=[],h=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,n=0;for(t=0;t<256;t++){var f=n^n<<1^n<<2^n<<3^n<<4;f=f>>>8^255&f^99,i[r]=f,o[f]=r;var g=e[r],m=e[g],y=e[m],v=257*e[f]^16843008*f;s[r]=v<<24|v>>>8,a[r]=v<<16|v>>>16,c[r]=v<<8|v>>>24,l[r]=v,v=16843009*y^65537*m^257*g^16843008*r,u[f]=v<<24|v>>>8,d[f]=v<<16|v>>>16,p[f]=v<<8|v>>>24,h[f]=v,r?(r=g^e[e[e[y^g]]],n^=e[e[n]]):r=n=1}}();var f=[0,1,2,4,8,16,32,64,128,27,54],g=r.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4,n=4*((this._nRounds=r+6)+1),o=this._keySchedule=[],s=0;s6&&s%r==4&&(l=i[l>>>24]<<24|i[l>>>16&255]<<16|i[l>>>8&255]<<8|i[255&l]):(l=i[(l=l<<8|l>>>24)>>>24]<<24|i[l>>>16&255]<<16|i[l>>>8&255]<<8|i[255&l],l^=f[s/r|0]<<24),o[s]=o[s-r]^l);for(var a=this._invKeySchedule=[],c=0;c>>24]]^d[i[l>>>16&255]]^p[i[l>>>8&255]]^h[i[255&l]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,s,a,c,l,i)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,u,d,p,h,o),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,i,o,s,a){for(var c=this._nRounds,l=e[t]^r[0],u=e[t+1]^r[1],d=e[t+2]^r[2],p=e[t+3]^r[3],h=4,f=1;f>>24]^i[u>>>16&255]^o[d>>>8&255]^s[255&p]^r[h++],m=n[u>>>24]^i[d>>>16&255]^o[p>>>8&255]^s[255&l]^r[h++],y=n[d>>>24]^i[p>>>16&255]^o[l>>>8&255]^s[255&u]^r[h++],v=n[p>>>24]^i[l>>>16&255]^o[u>>>8&255]^s[255&d]^r[h++];l=g,u=m,d=y,p=v}g=(a[l>>>24]<<24|a[u>>>16&255]<<16|a[d>>>8&255]<<8|a[255&p])^r[h++],m=(a[u>>>24]<<24|a[d>>>16&255]<<16|a[p>>>8&255]<<8|a[255&l])^r[h++],y=(a[d>>>24]<<24|a[p>>>16&255]<<16|a[l>>>8&255]<<8|a[255&u])^r[h++],v=(a[p>>>24]<<24|a[l>>>16&255]<<16|a[u>>>8&255]<<8|a[255&d])^r[h++],e[t]=g,e[t+1]=m,e[t+2]=y,e[t+3]=v},keySize:8});e.AES=t._createHelper(g)}(),n.AES)},78976:function(e,t,r){var n,i,o,s,a,c,l,u,d,p,h,f,g,m,y,v,_,b,w;e.exports=(n=r(58112),r(6165),void(n.lib.Cipher||(i=n,o=i.lib,s=o.Base,a=o.WordArray,c=o.BufferedBlockAlgorithm,l=i.enc,l.Utf8,u=l.Base64,d=i.algo.EvpKDF,p=o.Cipher=c.extend({cfg:s.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,r){this.cfg=this.cfg.extend(r),this._xformMode=e,this._key=t,this.reset()},reset:function(){c.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?w:_}return function(t){return{encrypt:function(r,n,i){return e(n).encrypt(t,r,n,i)},decrypt:function(r,n,i){return e(n).decrypt(t,r,n,i)}}}}()}),o.StreamCipher=p.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),h=i.mode={},f=o.BlockCipherMode=s.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),g=h.CBC=function(){var e=f.extend();function t(e,t,r){var n,i=this._iv;i?(n=i,this._iv=void 0):n=this._prevBlock;for(var o=0;o>>2];e.sigBytes-=t}},o.BlockCipher=p.extend({cfg:p.cfg.extend({mode:g,padding:m}),reset:function(){var e;p.reset.call(this);var t=this.cfg,r=t.iv,n=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=n.createEncryptor:(e=n.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,r&&r.words):(this._mode=e.call(n,this,r&&r.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4}),y=o.CipherParams=s.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),v=(i.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,r=e.salt;return(r?a.create([1398893684,1701076831]).concat(r).concat(t):t).toString(u)},parse:function(e){var t,r=u.parse(e),n=r.words;return 1398893684==n[0]&&1701076831==n[1]&&(t=a.create(n.slice(2,4)),n.splice(0,4),r.sigBytes-=16),y.create({ciphertext:r,salt:t})}},_=o.SerializableCipher=s.extend({cfg:s.extend({format:v}),encrypt:function(e,t,r,n){n=this.cfg.extend(n);var i=e.createEncryptor(r,n),o=i.finalize(t),s=i.cfg;return y.create({ciphertext:o,key:r,iv:s.iv,algorithm:e,mode:s.mode,padding:s.padding,blockSize:e.blockSize,formatter:n.format})},decrypt:function(e,t,r,n){return n=this.cfg.extend(n),t=this._parse(t,n.format),e.createDecryptor(r,n).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),b=(i.kdf={}).OpenSSL={execute:function(e,t,r,n){n||(n=a.random(8));var i=d.create({keySize:t+r}).compute(e,n),o=a.create(i.words.slice(t),4*r);return i.sigBytes=4*t,y.create({key:i,iv:o,salt:n})}},w=o.PasswordBasedCipher=_.extend({cfg:_.cfg.extend({kdf:b}),encrypt:function(e,t,r,n){var i=(n=this.cfg.extend(n)).kdf.execute(r,e.keySize,e.ivSize);n.iv=i.iv;var o=_.encrypt.call(this,e,t,i.key,n);return o.mixIn(i),o},decrypt:function(e,t,r,n){n=this.cfg.extend(n),t=this._parse(t,n.format);var i=n.kdf.execute(r,e.keySize,e.ivSize,t.salt);return n.iv=i.iv,_.decrypt.call(this,e,t,i.key,n)}}))))},58112:function(e,t,r){var n;e.exports=(n=n||function(e,t){var n;if("undefined"!=typeof window&&window.crypto&&(n=window.crypto),!n&&"undefined"!=typeof window&&window.msCrypto&&(n=window.msCrypto),!n&&"undefined"!=typeof global&&global.crypto&&(n=global.crypto),!n)try{n=r(6113)}catch(e){}var i=function(){if(n){if("function"==typeof n.getRandomValues)try{return n.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof n.randomBytes)try{return n.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),s={},a=s.lib={},c=a.Base={extend:function(e){var t=o(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},l=a.WordArray=c.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||d).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes,i=e.sigBytes;if(this.clamp(),n%4)for(var o=0;o>>2]>>>24-o%4*8&255;t[n+o>>>2]|=s<<24-(n+o)%4*8}else for(o=0;o>>2]=r[o>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=c.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],r=0;r>>2]>>>24-i%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new l.init(r,t/2)}},p=u.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(o))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new l.init(r,t)}},h=u.Utf8={stringify:function(e){try{return decodeURIComponent(escape(p.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return p.parse(unescape(encodeURIComponent(e)))}},f=a.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new l.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=h.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r,n=this._data,i=n.words,o=n.sigBytes,s=this.blockSize,a=o/(4*s),c=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*s,u=e.min(4*c,o);if(c){for(var d=0;d>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,a=0;a<4&&o+.75*a>>6*(3-a)&63));var c=n.charAt(64);if(c)for(;i.length%4;)i.push(c);return i.join("")},parse:function(e){var t=e.length,r=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var i=0;i>>6-s%4*2;n[i>>>2]|=a<<24-i%4*8,i++}return o.create(n,i)}(e,t,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},n.enc.Base64)},18559:function(e,t,r){var n;e.exports=(n=r(58112),function(){var e=n,t=e.lib.WordArray,r=e.enc;function i(e){return e<<8&4278255360|e>>>8&16711935}r.Utf16=r.Utf16BE={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i>>2]>>>16-i%4*8&65535;n.push(String.fromCharCode(o))}return n.join("")},parse:function(e){for(var r=e.length,n=[],i=0;i>>1]|=e.charCodeAt(i)<<16-i%2*16;return t.create(n,2*r)}},r.Utf16LE={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],o=0;o>>2]>>>16-o%4*8&65535);n.push(String.fromCharCode(s))}return n.join("")},parse:function(e){for(var r=e.length,n=[],o=0;o>>1]|=i(e.charCodeAt(o)<<16-o%2*16);return t.create(n,2*r)}}}(),n.enc.Utf16)},6165:function(e,t,r){var n,i,o,s,a,c,l,u;e.exports=(u=r(58112),r(31284),r(73456),o=(i=(n=u).lib).Base,s=i.WordArray,c=(a=n.algo).MD5,l=a.EvpKDF=o.extend({cfg:o.extend({keySize:4,hasher:c,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r,n=this.cfg,i=n.hasher.create(),o=s.create(),a=o.words,c=n.keySize,l=n.iterations;a.lengthn&&(t=e.finalize(t)),t.clamp();for(var i=this._oKey=t.clone(),s=this._iKey=t.clone(),a=i.words,c=s.words,l=0;l>>2]|=e[i]<<24-i%4*8;t.call(this,n,r)}else t.apply(this,arguments)};r.prototype=e}}(),n.lib.WordArray)},74678:function(e,t,r){var n;e.exports=(n=r(58112),function(e){var t=n,r=t.lib,i=r.WordArray,o=r.Hasher,s=t.algo,a=[];!function(){for(var t=0;t<64;t++)a[t]=4294967296*e.abs(e.sin(t+1))|0}();var c=s.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,s=e[t+0],c=e[t+1],h=e[t+2],f=e[t+3],g=e[t+4],m=e[t+5],y=e[t+6],v=e[t+7],_=e[t+8],b=e[t+9],w=e[t+10],C=e[t+11],E=e[t+12],T=e[t+13],S=e[t+14],x=e[t+15],k=o[0],I=o[1],A=o[2],P=o[3];k=l(k,I,A,P,s,7,a[0]),P=l(P,k,I,A,c,12,a[1]),A=l(A,P,k,I,h,17,a[2]),I=l(I,A,P,k,f,22,a[3]),k=l(k,I,A,P,g,7,a[4]),P=l(P,k,I,A,m,12,a[5]),A=l(A,P,k,I,y,17,a[6]),I=l(I,A,P,k,v,22,a[7]),k=l(k,I,A,P,_,7,a[8]),P=l(P,k,I,A,b,12,a[9]),A=l(A,P,k,I,w,17,a[10]),I=l(I,A,P,k,C,22,a[11]),k=l(k,I,A,P,E,7,a[12]),P=l(P,k,I,A,T,12,a[13]),A=l(A,P,k,I,S,17,a[14]),k=u(k,I=l(I,A,P,k,x,22,a[15]),A,P,c,5,a[16]),P=u(P,k,I,A,y,9,a[17]),A=u(A,P,k,I,C,14,a[18]),I=u(I,A,P,k,s,20,a[19]),k=u(k,I,A,P,m,5,a[20]),P=u(P,k,I,A,w,9,a[21]),A=u(A,P,k,I,x,14,a[22]),I=u(I,A,P,k,g,20,a[23]),k=u(k,I,A,P,b,5,a[24]),P=u(P,k,I,A,S,9,a[25]),A=u(A,P,k,I,f,14,a[26]),I=u(I,A,P,k,_,20,a[27]),k=u(k,I,A,P,T,5,a[28]),P=u(P,k,I,A,h,9,a[29]),A=u(A,P,k,I,v,14,a[30]),k=d(k,I=u(I,A,P,k,E,20,a[31]),A,P,m,4,a[32]),P=d(P,k,I,A,_,11,a[33]),A=d(A,P,k,I,C,16,a[34]),I=d(I,A,P,k,S,23,a[35]),k=d(k,I,A,P,c,4,a[36]),P=d(P,k,I,A,g,11,a[37]),A=d(A,P,k,I,v,16,a[38]),I=d(I,A,P,k,w,23,a[39]),k=d(k,I,A,P,T,4,a[40]),P=d(P,k,I,A,s,11,a[41]),A=d(A,P,k,I,f,16,a[42]),I=d(I,A,P,k,y,23,a[43]),k=d(k,I,A,P,b,4,a[44]),P=d(P,k,I,A,E,11,a[45]),A=d(A,P,k,I,x,16,a[46]),k=p(k,I=d(I,A,P,k,h,23,a[47]),A,P,s,6,a[48]),P=p(P,k,I,A,v,10,a[49]),A=p(A,P,k,I,S,15,a[50]),I=p(I,A,P,k,m,21,a[51]),k=p(k,I,A,P,E,6,a[52]),P=p(P,k,I,A,f,10,a[53]),A=p(A,P,k,I,w,15,a[54]),I=p(I,A,P,k,c,21,a[55]),k=p(k,I,A,P,_,6,a[56]),P=p(P,k,I,A,x,10,a[57]),A=p(A,P,k,I,y,15,a[58]),I=p(I,A,P,k,T,21,a[59]),k=p(k,I,A,P,g,6,a[60]),P=p(P,k,I,A,C,10,a[61]),A=p(A,P,k,I,h,15,a[62]),I=p(I,A,P,k,b,21,a[63]),o[0]=o[0]+k|0,o[1]=o[1]+I|0,o[2]=o[2]+A|0,o[3]=o[3]+P|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;r[i>>>5]|=128<<24-i%32;var o=e.floor(n/4294967296),s=n;r[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),r[14+(i+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),t.sigBytes=4*(r.length+1),this._process();for(var a=this._hash,c=a.words,l=0;l<4;l++){var u=c[l];c[l]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return a},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function l(e,t,r,n,i,o,s){var a=e+(t&r|~t&n)+i+s;return(a<>>32-o)+t}function u(e,t,r,n,i,o,s){var a=e+(t&n|r&~n)+i+s;return(a<>>32-o)+t}function d(e,t,r,n,i,o,s){var a=e+(t^r^n)+i+s;return(a<>>32-o)+t}function p(e,t,r,n,i,o,s){var a=e+(r^(t|~n))+i+s;return(a<>>32-o)+t}t.MD5=o._createHelper(c),t.HmacMD5=o._createHmacHelper(c)}(Math),n.MD5)},98581:function(e,t,r){var n;e.exports=(n=r(58112),r(78976),n.mode.CFB=function(){var e=n.lib.BlockCipherMode.extend();function t(e,t,r,n){var i,o=this._iv;o?(i=o.slice(0),this._iv=void 0):i=this._prevBlock,n.encryptBlock(i,0);for(var s=0;s>24&255)){var t=e>>16&255,r=e>>8&255,n=255&e;255===t?(t=0,255===r?(r=0,255===n?n=0:++n):++r):++t,e=0,e+=t<<16,e+=r<<8,e+=n}else e+=1<<24;return e}var r=e.Encryptor=e.extend({processBlock:function(e,r){var n=this._cipher,i=n.blockSize,o=this._iv,s=this._counter;o&&(s=this._counter=o.slice(0),this._iv=void 0),function(e){0===(e[0]=t(e[0]))&&(e[1]=t(e[1]))}(s);var a=s.slice(0);n.encryptBlock(a,0);for(var c=0;c>>2]|=i<<24-o%4*8,e.sigBytes+=i},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},n.pad.Ansix923)},17051:function(e,t,r){var n;e.exports=(n=r(58112),r(78976),n.pad.Iso10126={pad:function(e,t){var r=4*t,i=r-e.sigBytes%r;e.concat(n.lib.WordArray.random(i-1)).concat(n.lib.WordArray.create([i<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},n.pad.Iso10126)},6863:function(e,t,r){var n;e.exports=(n=r(58112),r(78976),n.pad.Iso97971={pad:function(e,t){e.concat(n.lib.WordArray.create([2147483648],1)),n.pad.ZeroPadding.pad(e,t)},unpad:function(e){n.pad.ZeroPadding.unpad(e),e.sigBytes--}},n.pad.Iso97971)},56261:function(e,t,r){var n;e.exports=(n=r(58112),r(78976),n.pad.NoPadding={pad:function(){},unpad:function(){}},n.pad.NoPadding)},42864:function(e,t,r){var n;e.exports=(n=r(58112),r(78976),n.pad.ZeroPadding={pad:function(e,t){var r=4*t;e.clamp(),e.sigBytes+=r-(e.sigBytes%r||r)},unpad:function(e){var t=e.words,r=e.sigBytes-1;for(r=e.sigBytes-1;r>=0;r--)if(t[r>>>2]>>>24-r%4*8&255){e.sigBytes=r+1;break}}},n.pad.ZeroPadding)},59220:function(e,t,r){var n,i,o,s,a,c,l,u,d;e.exports=(d=r(58112),r(31284),r(73456),o=(i=(n=d).lib).Base,s=i.WordArray,c=(a=n.algo).SHA1,l=a.HMAC,u=a.PBKDF2=o.extend({cfg:o.extend({keySize:4,hasher:c,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r=this.cfg,n=l.create(r.hasher,e),i=s.create(),o=s.create([1]),a=i.words,c=o.words,u=r.keySize,d=r.iterations;a.length>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],n=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var i=0;i<4;i++)c.call(this);for(i=0;i<8;i++)n[i]^=r[i+4&7];if(t){var o=t.words,s=o[0],a=o[1],l=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),u=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),d=l>>>16|4294901760&u,p=u<<16|65535&l;for(n[0]^=l,n[1]^=d,n[2]^=u,n[3]^=p,n[4]^=l,n[5]^=d,n[6]^=u,n[7]^=p,i=0;i<4;i++)c.call(this)}},_doProcessBlock:function(e,t){var r=this._X;c.call(this),i[0]=r[0]^r[5]>>>16^r[3]<<16,i[1]=r[2]^r[7]>>>16^r[5]<<16,i[2]=r[4]^r[1]>>>16^r[7]<<16,i[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)i[n]=16711935&(i[n]<<8|i[n]>>>24)|4278255360&(i[n]<<24|i[n]>>>8),e[t+n]^=i[n]},blockSize:4,ivSize:2});function c(){for(var e=this._X,t=this._C,r=0;r<8;r++)o[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],i=65535&n,a=n>>>16,c=((i*i>>>17)+i*a>>>15)+a*a,l=((4294901760&n)*n|0)+((65535&n)*n|0);s[r]=c^l}e[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,e[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,e[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,e[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,e[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,e[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,e[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,e[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}e.RabbitLegacy=t._createHelper(a)}(),n.RabbitLegacy)},5129:function(e,t,r){var n;e.exports=(n=r(58112),r(58885),r(74678),r(6165),r(78976),function(){var e=n,t=e.lib.StreamCipher,r=e.algo,i=[],o=[],s=[],a=r.Rabbit=t.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,r=0;r<4;r++)e[r]=16711935&(e[r]<<8|e[r]>>>24)|4278255360&(e[r]<<24|e[r]>>>8);var n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],i=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,r=0;r<4;r++)c.call(this);for(r=0;r<8;r++)i[r]^=n[r+4&7];if(t){var o=t.words,s=o[0],a=o[1],l=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),u=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),d=l>>>16|4294901760&u,p=u<<16|65535&l;for(i[0]^=l,i[1]^=d,i[2]^=u,i[3]^=p,i[4]^=l,i[5]^=d,i[6]^=u,i[7]^=p,r=0;r<4;r++)c.call(this)}},_doProcessBlock:function(e,t){var r=this._X;c.call(this),i[0]=r[0]^r[5]>>>16^r[3]<<16,i[1]=r[2]^r[7]>>>16^r[5]<<16,i[2]=r[4]^r[1]>>>16^r[7]<<16,i[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)i[n]=16711935&(i[n]<<8|i[n]>>>24)|4278255360&(i[n]<<24|i[n]>>>8),e[t+n]^=i[n]},blockSize:4,ivSize:2});function c(){for(var e=this._X,t=this._C,r=0;r<8;r++)o[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],i=65535&n,a=n>>>16,c=((i*i>>>17)+i*a>>>15)+a*a,l=((4294901760&n)*n|0)+((65535&n)*n|0);s[r]=c^l}e[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,e[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,e[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,e[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,e[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,e[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,e[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,e[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}e.Rabbit=t._createHelper(a)}(),n.Rabbit)},53954:function(e,t,r){var n;e.exports=(n=r(58112),r(58885),r(74678),r(6165),r(78976),function(){var e=n,t=e.lib.StreamCipher,r=e.algo,i=r.RC4=t.extend({_doReset:function(){for(var e=this._key,t=e.words,r=e.sigBytes,n=this._S=[],i=0;i<256;i++)n[i]=i;i=0;for(var o=0;i<256;i++){var s=i%r,a=t[s>>>2]>>>24-s%4*8&255;o=(o+n[i]+a)%256;var c=n[i];n[i]=n[o],n[o]=c}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=o.call(this)},keySize:8,ivSize:0});function o(){for(var e=this._S,t=this._i,r=this._j,n=0,i=0;i<4;i++){r=(r+e[t=(t+1)%256])%256;var o=e[t];e[t]=e[r],e[r]=o,n|=e[(e[t]+e[r])%256]<<24-8*i}return this._i=t,this._j=r,n}e.RC4=t._createHelper(i);var s=r.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)o.call(this)}});e.RC4Drop=t._createHelper(s)}(),n.RC4)},23787:function(e,t,r){var n;e.exports=(n=r(58112),function(e){var t=n,r=t.lib,i=r.WordArray,o=r.Hasher,s=t.algo,a=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]),l=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]),u=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]),d=i.create([0,1518500249,1859775393,2400959708,2840853838]),p=i.create([1352829926,1548603684,1836072691,2053994217,0]),h=s.RIPEMD160=o.extend({_doReset:function(){this._hash=i.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o,s,h,b,w,C,E,T,S,x,k,I=this._hash.words,A=d.words,P=p.words,R=a.words,N=c.words,O=l.words,D=u.words;for(C=o=I[0],E=s=I[1],T=h=I[2],S=b=I[3],x=w=I[4],r=0;r<80;r+=1)k=o+e[t+R[r]]|0,k+=r<16?f(s,h,b)+A[0]:r<32?g(s,h,b)+A[1]:r<48?m(s,h,b)+A[2]:r<64?y(s,h,b)+A[3]:v(s,h,b)+A[4],k=(k=_(k|=0,O[r]))+w|0,o=w,w=b,b=_(h,10),h=s,s=k,k=C+e[t+N[r]]|0,k+=r<16?v(E,T,S)+P[0]:r<32?y(E,T,S)+P[1]:r<48?m(E,T,S)+P[2]:r<64?g(E,T,S)+P[3]:f(E,T,S)+P[4],k=(k=_(k|=0,D[r]))+x|0,C=x,x=S,S=_(T,10),T=E,E=k;k=I[1]+h+S|0,I[1]=I[2]+b+x|0,I[2]=I[3]+w+C|0,I[3]=I[4]+o+E|0,I[4]=I[0]+s+T|0,I[0]=k},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),e.sigBytes=4*(t.length+1),this._process();for(var i=this._hash,o=i.words,s=0;s<5;s++){var a=o[s];o[s]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}return i},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function f(e,t,r){return e^t^r}function g(e,t,r){return e&t|~e&r}function m(e,t,r){return(e|~t)^r}function y(e,t,r){return e&r|t&~r}function v(e,t,r){return e^(t|~r)}function _(e,t){return e<>>32-t}t.RIPEMD160=o._createHelper(h),t.HmacRIPEMD160=o._createHmacHelper(h)}(Math),n.RIPEMD160)},31284:function(e,t,r){var n,i,o,s,a,c,l,u;e.exports=(i=(n=u=r(58112)).lib,o=i.WordArray,s=i.Hasher,a=n.algo,c=[],l=a.SHA1=s.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],s=r[3],a=r[4],l=0;l<80;l++){if(l<16)c[l]=0|e[t+l];else{var u=c[l-3]^c[l-8]^c[l-14]^c[l-16];c[l]=u<<1|u>>>31}var d=(n<<5|n>>>27)+a+c[l];d+=l<20?1518500249+(i&o|~i&s):l<40?1859775393+(i^o^s):l<60?(i&o|i&s|o&s)-1894007588:(i^o^s)-899497514,a=s,s=o,o=i<<30|i>>>2,i=n,n=d}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+o|0,r[3]=r[3]+s|0,r[4]=r[4]+a|0},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=Math.floor(r/4294967296),t[15+(n+64>>>9<<4)]=r,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=s.clone.call(this);return e._hash=this._hash.clone(),e}}),n.SHA1=s._createHelper(l),n.HmacSHA1=s._createHmacHelper(l),u.SHA1)},83816:function(e,t,r){var n,i,o,s,a,c;e.exports=(c=r(58112),r(92232),i=(n=c).lib.WordArray,o=n.algo,s=o.SHA256,a=o.SHA224=s.extend({_doReset:function(){this._hash=new i.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=s._doFinalize.call(this);return e.sigBytes-=4,e}}),n.SHA224=s._createHelper(a),n.HmacSHA224=s._createHmacHelper(a),c.SHA224)},92232:function(e,t,r){var n;e.exports=(n=r(58112),function(e){var t=n,r=t.lib,i=r.WordArray,o=r.Hasher,s=t.algo,a=[],c=[];!function(){function t(t){for(var r=e.sqrt(t),n=2;n<=r;n++)if(!(t%n))return!1;return!0}function r(e){return 4294967296*(e-(0|e))|0}for(var n=2,i=0;i<64;)t(n)&&(i<8&&(a[i]=r(e.pow(n,.5))),c[i]=r(e.pow(n,1/3)),i++),n++}();var l=[],u=s.SHA256=o.extend({_doReset:function(){this._hash=new i.init(a.slice(0))},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],s=r[3],a=r[4],u=r[5],d=r[6],p=r[7],h=0;h<64;h++){if(h<16)l[h]=0|e[t+h];else{var f=l[h-15],g=(f<<25|f>>>7)^(f<<14|f>>>18)^f>>>3,m=l[h-2],y=(m<<15|m>>>17)^(m<<13|m>>>19)^m>>>10;l[h]=g+l[h-7]+y+l[h-16]}var v=n&i^n&o^i&o,_=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),b=p+((a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25))+(a&u^~a&d)+c[h]+l[h];p=d,d=u,u=a,a=s+b|0,s=o,o=i,i=n,n=b+(_+v)|0}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+o|0,r[3]=r[3]+s|0,r[4]=r[4]+a|0,r[5]=r[5]+u|0,r[6]=r[6]+d|0,r[7]=r[7]+p|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;return r[i>>>5]|=128<<24-i%32,r[14+(i+64>>>9<<4)]=e.floor(n/4294967296),r[15+(i+64>>>9<<4)]=n,t.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=o._createHelper(u),t.HmacSHA256=o._createHmacHelper(u)}(Math),n.SHA256)},71455:function(e,t,r){var n;e.exports=(n=r(58112),r(88400),function(e){var t=n,r=t.lib,i=r.WordArray,o=r.Hasher,s=t.x64.Word,a=t.algo,c=[],l=[],u=[];!function(){for(var e=1,t=0,r=0;r<24;r++){c[e+5*t]=(r+1)*(r+2)/2%64;var n=(2*e+3*t)%5;e=t%5,t=n}for(e=0;e<5;e++)for(t=0;t<5;t++)l[e+5*t]=t+(2*e+3*t)%5*5;for(var i=1,o=0;o<24;o++){for(var a=0,d=0,p=0;p<7;p++){if(1&i){var h=(1<>>24)|4278255360&(o<<24|o>>>8),s=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),(I=r[i]).high^=s,I.low^=o}for(var a=0;a<24;a++){for(var p=0;p<5;p++){for(var h=0,f=0,g=0;g<5;g++)h^=(I=r[p+5*g]).high,f^=I.low;var m=d[p];m.high=h,m.low=f}for(p=0;p<5;p++){var y=d[(p+4)%5],v=d[(p+1)%5],_=v.high,b=v.low;for(h=y.high^(_<<1|b>>>31),f=y.low^(b<<1|_>>>31),g=0;g<5;g++)(I=r[p+5*g]).high^=h,I.low^=f}for(var w=1;w<25;w++){var C=(I=r[w]).high,E=I.low,T=c[w];T<32?(h=C<>>32-T,f=E<>>32-T):(h=E<>>64-T,f=C<>>64-T);var S=d[l[w]];S.high=h,S.low=f}var x=d[0],k=r[0];for(x.high=k.high,x.low=k.low,p=0;p<5;p++)for(g=0;g<5;g++){var I=r[w=p+5*g],A=d[w],P=d[(p+1)%5+5*g],R=d[(p+2)%5+5*g];I.high=A.high^~P.high&R.high,I.low=A.low^~P.low&R.low}I=r[0];var N=u[a];I.high^=N.high,I.low^=N.low}},_doFinalize:function(){var t=this._data,r=t.words,n=(this._nDataBytes,8*t.sigBytes),o=32*this.blockSize;r[n>>>5]|=1<<24-n%32,r[(e.ceil((n+1)/o)*o>>>5)-1]|=128,t.sigBytes=4*r.length,this._process();for(var s=this._state,a=this.cfg.outputLength/8,c=a/8,l=[],u=0;u>>24)|4278255360&(p<<24|p>>>8),h=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8),l.push(h),l.push(p)}return new i.init(l,a)},clone:function(){for(var e=o.clone.call(this),t=e._state=this._state.slice(0),r=0;r<25;r++)t[r]=t[r].clone();return e}});t.SHA3=o._createHelper(p),t.HmacSHA3=o._createHmacHelper(p)}(Math),n.SHA3)},1007:function(e,t,r){var n,i,o,s,a,c,l,u;e.exports=(u=r(58112),r(88400),r(89039),i=(n=u).x64,o=i.Word,s=i.WordArray,a=n.algo,c=a.SHA512,l=a.SHA384=c.extend({_doReset:function(){this._hash=new s.init([new o.init(3418070365,3238371032),new o.init(1654270250,914150663),new o.init(2438529370,812702999),new o.init(355462360,4144912697),new o.init(1731405415,4290775857),new o.init(2394180231,1750603025),new o.init(3675008525,1694076839),new o.init(1203062813,3204075428)])},_doFinalize:function(){var e=c._doFinalize.call(this);return e.sigBytes-=16,e}}),n.SHA384=c._createHelper(l),n.HmacSHA384=c._createHmacHelper(l),u.SHA384)},89039:function(e,t,r){var n;e.exports=(n=r(58112),r(88400),function(){var e=n,t=e.lib.Hasher,r=e.x64,i=r.Word,o=r.WordArray,s=e.algo;function a(){return i.create.apply(i,arguments)}var c=[a(1116352408,3609767458),a(1899447441,602891725),a(3049323471,3964484399),a(3921009573,2173295548),a(961987163,4081628472),a(1508970993,3053834265),a(2453635748,2937671579),a(2870763221,3664609560),a(3624381080,2734883394),a(310598401,1164996542),a(607225278,1323610764),a(1426881987,3590304994),a(1925078388,4068182383),a(2162078206,991336113),a(2614888103,633803317),a(3248222580,3479774868),a(3835390401,2666613458),a(4022224774,944711139),a(264347078,2341262773),a(604807628,2007800933),a(770255983,1495990901),a(1249150122,1856431235),a(1555081692,3175218132),a(1996064986,2198950837),a(2554220882,3999719339),a(2821834349,766784016),a(2952996808,2566594879),a(3210313671,3203337956),a(3336571891,1034457026),a(3584528711,2466948901),a(113926993,3758326383),a(338241895,168717936),a(666307205,1188179964),a(773529912,1546045734),a(1294757372,1522805485),a(1396182291,2643833823),a(1695183700,2343527390),a(1986661051,1014477480),a(2177026350,1206759142),a(2456956037,344077627),a(2730485921,1290863460),a(2820302411,3158454273),a(3259730800,3505952657),a(3345764771,106217008),a(3516065817,3606008344),a(3600352804,1432725776),a(4094571909,1467031594),a(275423344,851169720),a(430227734,3100823752),a(506948616,1363258195),a(659060556,3750685593),a(883997877,3785050280),a(958139571,3318307427),a(1322822218,3812723403),a(1537002063,2003034995),a(1747873779,3602036899),a(1955562222,1575990012),a(2024104815,1125592928),a(2227730452,2716904306),a(2361852424,442776044),a(2428436474,593698344),a(2756734187,3733110249),a(3204031479,2999351573),a(3329325298,3815920427),a(3391569614,3928383900),a(3515267271,566280711),a(3940187606,3454069534),a(4118630271,4000239992),a(116418474,1914138554),a(174292421,2731055270),a(289380356,3203993006),a(460393269,320620315),a(685471733,587496836),a(852142971,1086792851),a(1017036298,365543100),a(1126000580,2618297676),a(1288033470,3409855158),a(1501505948,4234509866),a(1607167915,987167468),a(1816402316,1246189591)],l=[];!function(){for(var e=0;e<80;e++)l[e]=a()}();var u=s.SHA512=t.extend({_doReset:function(){this._hash=new o.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],s=r[3],a=r[4],u=r[5],d=r[6],p=r[7],h=n.high,f=n.low,g=i.high,m=i.low,y=o.high,v=o.low,_=s.high,b=s.low,w=a.high,C=a.low,E=u.high,T=u.low,S=d.high,x=d.low,k=p.high,I=p.low,A=h,P=f,R=g,N=m,O=y,D=v,L=_,M=b,B=w,F=C,j=E,U=T,$=S,q=x,H=k,V=I,z=0;z<80;z++){var K,W,G=l[z];if(z<16)W=G.high=0|e[t+2*z],K=G.low=0|e[t+2*z+1];else{var Q=l[z-15],Y=Q.high,J=Q.low,X=(Y>>>1|J<<31)^(Y>>>8|J<<24)^Y>>>7,Z=(J>>>1|Y<<31)^(J>>>8|Y<<24)^(J>>>7|Y<<25),ee=l[z-2],te=ee.high,re=ee.low,ne=(te>>>19|re<<13)^(te<<3|re>>>29)^te>>>6,ie=(re>>>19|te<<13)^(re<<3|te>>>29)^(re>>>6|te<<26),oe=l[z-7],se=oe.high,ae=oe.low,ce=l[z-16],le=ce.high,ue=ce.low;W=(W=(W=X+se+((K=Z+ae)>>>0>>0?1:0))+ne+((K+=ie)>>>0>>0?1:0))+le+((K+=ue)>>>0>>0?1:0),G.high=W,G.low=K}var de,pe=B&j^~B&$,he=F&U^~F&q,fe=A&R^A&O^R&O,ge=P&N^P&D^N&D,me=(A>>>28|P<<4)^(A<<30|P>>>2)^(A<<25|P>>>7),ye=(P>>>28|A<<4)^(P<<30|A>>>2)^(P<<25|A>>>7),ve=(B>>>14|F<<18)^(B>>>18|F<<14)^(B<<23|F>>>9),_e=(F>>>14|B<<18)^(F>>>18|B<<14)^(F<<23|B>>>9),be=c[z],we=be.high,Ce=be.low,Ee=H+ve+((de=V+_e)>>>0>>0?1:0),Te=ye+ge;H=$,V=q,$=j,q=U,j=B,U=F,B=L+(Ee=(Ee=(Ee=Ee+pe+((de+=he)>>>0>>0?1:0))+we+((de+=Ce)>>>0>>0?1:0))+W+((de+=K)>>>0>>0?1:0))+((F=M+de|0)>>>0>>0?1:0)|0,L=O,M=D,O=R,D=N,R=A,N=P,A=Ee+(me+fe+(Te>>>0>>0?1:0))+((P=de+Te|0)>>>0>>0?1:0)|0}f=n.low=f+P,n.high=h+A+(f>>>0

>>0?1:0),m=i.low=m+N,i.high=g+R+(m>>>0>>0?1:0),v=o.low=v+D,o.high=y+O+(v>>>0>>0?1:0),b=s.low=b+M,s.high=_+L+(b>>>0>>0?1:0),C=a.low=C+F,a.high=w+B+(C>>>0>>0?1:0),T=u.low=T+U,u.high=E+j+(T>>>0>>0?1:0),x=d.low=x+q,d.high=S+$+(x>>>0>>0?1:0),I=p.low=I+V,p.high=k+H+(I>>>0>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[30+(n+128>>>10<<5)]=Math.floor(r/4294967296),t[31+(n+128>>>10<<5)]=r,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=t.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});e.SHA512=t._createHelper(u),e.HmacSHA512=t._createHmacHelper(u)}(),n.SHA512)},69708:function(e,t,r){var n;e.exports=(n=r(58112),r(58885),r(74678),r(6165),r(78976),function(){var e=n,t=e.lib,r=t.WordArray,i=t.BlockCipher,o=e.algo,s=[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],a=[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],l=[{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}],u=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],d=o.DES=i.extend({_doReset:function(){for(var e=this._key.words,t=[],r=0;r<56;r++){var n=s[r]-1;t[r]=e[n>>>5]>>>31-n%32&1}for(var i=this._subKeys=[],o=0;o<16;o++){var l=i[o]=[],u=c[o];for(r=0;r<24;r++)l[r/6|0]|=t[(a[r]-1+u)%28]<<31-r%6,l[4+(r/6|0)]|=t[28+(a[r+24]-1+u)%28]<<31-r%6;for(l[0]=l[0]<<1|l[0]>>>31,r=1;r<7;r++)l[r]=l[r]>>>4*(r-1)+3;l[7]=l[7]<<5|l[7]>>>27}var d=this._invSubKeys=[];for(r=0;r<16;r++)d[r]=i[15-r]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,r){this._lBlock=e[t],this._rBlock=e[t+1],p.call(this,4,252645135),p.call(this,16,65535),h.call(this,2,858993459),h.call(this,8,16711935),p.call(this,1,1431655765);for(var n=0;n<16;n++){for(var i=r[n],o=this._lBlock,s=this._rBlock,a=0,c=0;c<8;c++)a|=l[c][((s^i[c])&u[c])>>>0];this._lBlock=s,this._rBlock=o^a}var d=this._lBlock;this._lBlock=this._rBlock,this._rBlock=d,p.call(this,1,1431655765),h.call(this,8,16711935),h.call(this,2,858993459),p.call(this,16,65535),p.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function p(e,t){var r=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=r,this._lBlock^=r<>>e^this._lBlock)&t;this._lBlock^=r,this._rBlock^=r<192.");var t=e.slice(0,2),n=e.length<4?e.slice(0,2):e.slice(2,4),i=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=d.createEncryptor(r.create(t)),this._des2=d.createEncryptor(r.create(n)),this._des3=d.createEncryptor(r.create(i))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2});e.TripleDES=i._createHelper(f)}(),n.TripleDES)},88400:function(e,t,r){var n,i,o,s,a,c;e.exports=(n=r(58112),o=(i=n).lib,s=o.Base,a=o.WordArray,(c=i.x64={}).Word=s.extend({init:function(e,t){this.high=e,this.low=t}}),c.WordArray=s.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:8*e.length},toX32:function(){for(var e=this.words,t=e.length,r=[],n=0;n{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(i=n))})),t.splice(i,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.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`."))}})(),t.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"],t.log=console.debug||console.log||(()=>{}),e.exports=r(29374)(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},29374:(e,t,r)=>{e.exports=function(e){function t(e){let r,i,o,s=null;function a(...e){if(!a.enabled)return;const n=a,i=Number(new Date),o=i-(r||i);n.diff=o,n.prev=r,n.curr=i,r=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,i)=>{if("%%"===r)return"%";s++;const o=t.formatters[i];if("function"==typeof o){const t=e[s];r=o.call(n,t),e.splice(s,1),s--}return r})),t.formatArgs.call(n,e),(n.log||t.log).apply(n,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=n,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(i!==t.namespaces&&(i=t.namespaces,o=t.enabled(e)),o),set:e=>{s=e}}),"function"==typeof t.init&&t.init(a),a}function n(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function i(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(i),...t.skips.map(i).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),i=n.length;for(r=0;r{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t{"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?e.exports=r(96292):e.exports=r(4428)},4428:(e,t,r)=>{const n=r(76224),i=r(73837);t.init=function(e){e.inspectOpts={};const r=Object.keys(t.inspectOpts);for(let n=0;n{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=r(56974);e&&(e.stderr||e).level>=2&&(t.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(e){}t.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const r=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let n=process.env[t];return n=!!/^(yes|on|true|enabled)$/i.test(n)||!/^(no|off|false|disabled)$/i.test(n)&&("null"===n?null:Number(n)),e[r]=n,e}),{}),e.exports=r(29374)(t);const{formatters:o}=e.exports;o.o=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},o.O=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts)}},71321:e=>{"use strict";e.exports=(e,t,r)=>{const n=r=>Object.defineProperty(e,t,{value:r,enumerable:!0,writable:!0});return Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get(){const e=r();return n(e),e},set(e){n(e)}}),e}},72784:function(e,t,r){"use strict";var n=this&&this.__assign||Object.assign||function(e){for(var t,r=1,n=arguments.length;r= 1.0.0 < 2.0.0",patch:function(e){try{var s=new(0,r(28028).BasicTracer)(i.channel.spanContextPropagator?{scopeManager:i.channel.spanContextPropagator}:void 0),a=s.startSpan;s.startSpan=function(e,t){if(!t||!t.parent){var r=s.getCurrentSpan();r&&r.operation&&r.operation.traceparent&&(t=n({},t,{parent:{traceId:r.operation.traceparent.traceId,spanId:r.operation.traceparent.spanId}}))}var i=a.call(this,e,t);return i.addEvent("Application Insights Integration enabled"),i},s.addSpanProcessor(new o),s[t.AzureMonitorSymbol]=!0,e.setTracer(s)}catch(e){}return e}},t.enable=function(){i.channel.registerMonkeyPatch("@azure/core-tracing",t.azureCoreTracing)}},70248:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(66932);t.bunyan={versionSpecifier:">= 1.0.0 < 2.0.0",patch:function(e){var t=e.prototype._emit;return e.prototype._emit=function(e,r){var i=t.apply(this,arguments);if(!r){var o=i;o||(o=t.call(this,e,!0)),n.channel.publish("bunyan",{level:e.level,result:o})}return i},e}},t.enable=function(){n.channel.registerMonkeyPatch("bunyan",t.bunyan)}},8159:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(66932),i=r(12781);t.console={versionSpecifier:">= 4.0.0",patch:function(e){var t=new i.Writable,r=new i.Writable;t.write=function(e){if(!e)return!0;var t=e.toString();return n.channel.publish("console",{message:t}),!0},r.write=function(e){if(!e)return!0;var t=e.toString();return n.channel.publish("console",{message:t,stderr:!0}),!0};for(var o=new e.Console(t,r),s=function(t){var r=e[t];r&&(e[t]=function(){if(o[t])try{o[t].apply(o,arguments)}catch(e){}return r.apply(e,arguments)})},a=0,c=["log","info","warn","error","dir","time","timeEnd","trace","assert"];a{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(72784);t.azuresdk=n;var i=r(70248);t.bunyan=i;var o=r(8159);t.console=o;var s=r(7834);t.mongodbCore=s;var a=r(44826);t.mongodb=a;var c=r(55856);t.mysql=c;var l=r(68345);t.pgPool=l;var u=r(67726);t.pg=u;var d=r(4765);t.redis=d;var p=r(61624);t.tedious=p;var h=r(88041);t.winston=h,t.enable=function(){i.enable(),o.enable(),s.enable(),a.enable(),c.enable(),u.enable(),l.enable(),d.enable(),h.enable(),n.enable(),p.enable()}},7834:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(66932);t.mongoCore={versionSpecifier:">= 2.0.0 < 4.0.0",patch:function(e){var t=e.Server.prototype.connect;return e.Server.prototype.connect=function(){var e=t.apply(this,arguments),r=this.s.pool.write;this.s.pool.write=function(){var e="function"==typeof arguments[1]?1:2;return"function"==typeof arguments[e]&&(arguments[e]=n.channel.bindToContext(arguments[e])),r.apply(this,arguments)};var i=this.s.pool.logout;return this.s.pool.logout=function(){return"function"==typeof arguments[1]&&(arguments[1]=n.channel.bindToContext(arguments[1])),i.apply(this,arguments)},e},e}},t.enable=function(){n.channel.registerMonkeyPatch("mongodb-core",t.mongoCore)}},44826:function(e,t,r){"use strict";var n=this&&this.__assign||Object.assign||function(e){for(var t,r=1,n=arguments.length;r= 2.0.0 <= 3.0.5",patch:function(e){var t=e.instrument({operationIdGenerator:{next:function(){return i.channel.bindToContext((function(e){return e()}))}}}),r={};return t.on("started",(function(e){r[e.requestId]||(r[e.requestId]=n({},e,{time:new Date}))})),t.on("succeeded",(function(e){var t=r[e.requestId];t&&delete r[e.requestId],"function"==typeof e.operationId?e.operationId((function(){return i.channel.publish("mongodb",{startedData:t,event:e,succeeded:!0})})):i.channel.publish("mongodb",{startedData:t,event:e,succeeded:!0})})),t.on("failed",(function(e){var t=r[e.requestId];t&&delete r[e.requestId],"function"==typeof e.operationId?e.operationId((function(){return i.channel.publish("mongodb",{startedData:t,event:e,succeeded:!1})})):i.channel.publish("mongodb",{startedData:t,event:e,succeeded:!1})})),e}},t.mongo3={versionSpecifier:"> 3.0.5 < 3.3.0",patch:function(e){var t=e.instrument(),r={},o={};return t.on("started",(function(e){r[e.requestId]||(o[e.requestId]=i.channel.bindToContext((function(e){return e()})),r[e.requestId]=n({},e,{time:new Date}))})),t.on("succeeded",(function(e){var t=r[e.requestId];t&&delete r[e.requestId],"object"==typeof e&&"function"==typeof o[e.requestId]&&(o[e.requestId]((function(){return i.channel.publish("mongodb",{startedData:t,event:e,succeeded:!0})})),delete o[e.requestId])})),t.on("failed",(function(e){var t=r[e.requestId];t&&delete r[e.requestId],"object"==typeof e&&"function"==typeof o[e.requestId]&&(o[e.requestId]((function(){return i.channel.publish("mongodb",{startedData:t,event:e,succeeded:!1})})),delete o[e.requestId])})),e}},t.mongo330={versionSpecifier:">= 3.3.0 < 4.0.0",patch:function(e){!function(e){var t=e.Server.prototype.connect;e.Server.prototype.connect=function(){var e=t.apply(this,arguments),r=this.s.coreTopology.s.pool.write;this.s.coreTopology.s.pool.write=function(){var e="function"==typeof arguments[1]?1:2;return"function"==typeof arguments[e]&&(arguments[e]=i.channel.bindToContext(arguments[e])),r.apply(this,arguments)};var n=this.s.coreTopology.s.pool.logout;return this.s.coreTopology.s.pool.logout=function(){return"function"==typeof arguments[1]&&(arguments[1]=i.channel.bindToContext(arguments[1])),n.apply(this,arguments)},e}}(e);var t=e.instrument(),r={},n={};return t.on("started",(function(e){r[e.requestId]||(n[e.requestId]=i.channel.bindToContext((function(e){return e()})),r[e.requestId]=e)})),t.on("succeeded",(function(e){var t=r[e.requestId];t&&delete r[e.requestId],"object"==typeof e&&"function"==typeof n[e.requestId]&&(n[e.requestId]((function(){return i.channel.publish("mongodb",{startedData:t,event:e,succeeded:!0})})),delete n[e.requestId])})),t.on("failed",(function(e){var t=r[e.requestId];t&&delete r[e.requestId],"object"==typeof e&&"function"==typeof n[e.requestId]&&(n[e.requestId]((function(){return i.channel.publish("mongodb",{startedData:t,event:e,succeeded:!1})})),delete n[e.requestId])})),e}},t.enable=function(){i.channel.registerMonkeyPatch("mongodb",t.mongo2),i.channel.registerMonkeyPatch("mongodb",t.mongo3),i.channel.registerMonkeyPatch("mongodb",t.mongo330)}},55856:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(66932),i=r(71017);t.mysql={versionSpecifier:">= 2.0.0 < 3.0.0",patch:function(e,t){var o=function(e,t){return function(t,r){var i=e[t];i&&(e[t]=function(){for(var e=arguments.length-1,t=arguments.length-1;t>=0;--t){if("function"==typeof arguments[t]){e=t;break}if(void 0!==arguments[t])break}var o=arguments[e],s={result:null,startTime:null,startDate:null};"function"==typeof o&&(r?(s.startTime=process.hrtime(),s.startDate=new Date,arguments[e]=n.channel.bindToContext(r(s,o))):arguments[e]=n.channel.bindToContext(o));var a=i.apply(this,arguments);return s.result=a,a})}},s=function(e,t){return o(e.prototype)},a=r(1055)(i.dirname(t)+"/lib/Connection");["connect","changeUser","ping","statistics","end"].forEach((function(e){return s(a)(e)})),o(a)("createQuery",(function(e,t){return function(r){var i=process.hrtime(e.startTime),o=1e3*i[0]+i[1]/1e6|0;n.channel.publish("mysql",{query:e.result,callbackArgs:arguments,err:r,duration:o,time:e.startDate}),t.apply(this,arguments)}}));var c=r(76990)(i.dirname(t)+"/lib/Pool");return["_enqueueCallback"].forEach((function(e){return s(c)(e)})),e}},t.enable=function(){n.channel.registerMonkeyPatch("mysql",t.mysql)}},68345:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(66932);t.postgresPool1={versionSpecifier:">= 1.0.0 < 3.0.0",patch:function(e){var t=e.prototype.connect;return e.prototype.connect=function(e){return e&&(arguments[0]=n.channel.bindToContext(e)),t.apply(this,arguments)},e}},t.enable=function(){n.channel.registerMonkeyPatch("pg-pool",t.postgresPool1)}},67726:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(66932),i=r(82361);t.postgres6={versionSpecifier:"6.*",patch:function(e,t){var r=e.Client.prototype.query,o="__diagnosticOriginalFunc";return e.Client.prototype.query=function(e,t,s){var a,c={query:{},database:{host:this.connectionParameters.host,port:this.connectionParameters.port},result:null,error:null,duration:0,time:new Date},l=process.hrtime();function u(e){e&&e[o]&&(e=e[o]);var t=n.channel.bindToContext((function(t,r){var o=process.hrtime(l);if(c.result=r&&{rowCount:r.rowCount,command:r.command},c.error=t,c.duration=Math.ceil(1e3*o[0]+o[1]/1e6),n.channel.publish("postgres",c),t){if(e)return e.apply(this,arguments);a&&a instanceof i.EventEmitter&&a.emit("error",t)}else e&&e.apply(this,arguments)}));try{return Object.defineProperty(t,o,{value:e}),t}catch(t){return e}}try{"string"==typeof e?t instanceof Array?(c.query.preparable={text:e,args:t},s=u(s)):(c.query.text=e,s?s=u(s):t=u(t)):("string"==typeof e.name?c.query.plan=e.name:e.values instanceof Array?c.query.preparable={text:e.text,args:e.values}:c.query.text=e.text,s?s=u(s):t?t=u(t):e.callback=u(e.callback))}catch(e){return r.apply(this,arguments)}return arguments[0]=e,arguments[1]=t,arguments[2]=s,arguments.length=arguments.length>3?arguments.length:3,a=r.apply(this,arguments)},e}},t.postgres7={versionSpecifier:">=7.* <=8.*",patch:function(e,t){var r=e.Client.prototype.query,o="__diagnosticOriginalFunc";return e.Client.prototype.query=function(e,t,s){var a,c=this,l=!!s,u={query:{},database:{host:this.connectionParameters.host,port:this.connectionParameters.port},result:null,error:null,duration:0,time:new Date},d=process.hrtime();function p(e){e&&e[o]&&(e=e[o]);var t=n.channel.bindToContext((function(t,r){var o=process.hrtime(d);if(u.result=r&&{rowCount:r.rowCount,command:r.command},u.error=t,u.duration=Math.ceil(1e3*o[0]+o[1]/1e6),n.channel.publish("postgres",u),t){if(e)return e.apply(this,arguments);a&&a instanceof i.EventEmitter&&a.emit("error",t)}else e&&e.apply(this,arguments)}));try{return Object.defineProperty(t,o,{value:e}),t}catch(t){return e}}try{"string"==typeof e?t instanceof Array?(u.query.preparable={text:e,args:t},s=(l="function"==typeof s)?p(s):s):(u.query.text=e,s?s=(l="function"==typeof s)?p(s):s:t=(l="function"==typeof t)?p(t):t):("string"==typeof e.name?u.query.plan=e.name:e.values instanceof Array?u.query.preparable={text:e.text,args:e.values}:u.query.text=e.text,s?(l="function"==typeof s,s=p(s)):t?t=(l="function"==typeof t)?p(t):t:(l="function"==typeof e.callback,e.callback=l?p(e.callback):e.callback))}catch(e){return r.apply(this,arguments)}return arguments[0]=e,arguments[1]=t,arguments[2]=s,arguments.length=arguments.length>3?arguments.length:3,a=r.apply(this,arguments),l?a:a.then((function(e){return p()(void 0,e),new c._Promise((function(t,r){t(e)}))})).catch((function(e){return p()(e,void 0),new c._Promise((function(t,r){r(e)}))}))},e}},t.enable=function(){n.channel.registerMonkeyPatch("pg",t.postgres6),n.channel.registerMonkeyPatch("pg",t.postgres7)}},4765:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(66932);t.redis={versionSpecifier:">= 2.0.0 < 4.0.0",patch:function(e){var t=e.RedisClient.prototype.internal_send_command;return e.RedisClient.prototype.internal_send_command=function(e){if(e){var r=e.callback;if(!r||!r.pubsubBound){var i=this.address,o=process.hrtime(),s=new Date;e.callback=n.channel.bindToContext((function(t,a){var c=process.hrtime(o),l=1e3*c[0]+c[1]/1e6|0;n.channel.publish("redis",{duration:l,address:i,commandObj:e,err:t,result:a,time:s}),"function"==typeof r&&r.apply(this,arguments)})),e.callback.pubsubBound=!0}}return t.call(this,e)},e}},t.enable=function(){n.channel.registerMonkeyPatch("redis",t.redis)}},61624:function(e,t,r){"use strict";var n=this&&this.__assign||Object.assign||function(e){for(var t,r=1,n=arguments.length;r= 6.0.0 < 9.0.0",patch:function(e){var t=e.Connection.prototype.makeRequest;return e.Connection.prototype.makeRequest=function(){function e(e){var t=process.hrtime(),r={query:{},database:{host:null,port:null},result:null,error:null,duration:0};return i.channel.bindToContext((function(o,s,a){var c=process.hrtime(t);r=n({},r,{database:{host:this.connection.config.server,port:this.connection.config.options.port},result:!o&&{rowCount:s,rows:a},query:{text:this.parametersByName.statement.value},error:o,duration:Math.ceil(1e3*c[0]+c[1]/1e6)}),i.channel.publish("tedious",r),e.call(this,o,s,a)}))}var r=arguments[0];arguments[0].callback=e(r.callback),t.apply(this,arguments)},e}},t.enable=function(){i.channel.registerMonkeyPatch("tedious",t.tedious)}},88041:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);in[r]?i:r);this.add(new t(e,{level:r}))}var n=e.createLogger;e.createLogger=function(){var i,o=arguments[0].levels||e.config.npm.levels;for(var s in o)o.hasOwnProperty(s)&&(i=void 0===i||o[s]>o[i]?s:i);var a=n.apply(this,arguments);a.add(new t(e,{level:i}));var c=a.configure;return a.configure=function(){c.apply(this,arguments),r.apply(this,arguments)},a};var a=e.createLogger;return e.configure=function(){a.apply(this,arguments),r.apply(this,arguments)},e.add(new t(e)),e}},t.winston2={versionSpecifier:"2.x",patch:function(e){var t,r=e.Logger.prototype.log,n=function(r,n,i){var o;return o=t===e.config.npm.levels?"npm":t===e.config.syslog.levels?"syslog":"unknown",s.channel.publish("winston",{level:r,message:n,meta:i,levelKind:o}),n};return e.Logger.prototype.log=function(){return t=this.levels,this.filters&&0!==this.filters.length?this.filters[this.filters.length-1]!==n&&(this.filters=this.filters.filter((function(e){return e!==n})),this.filters.push(n)):this.filters=[n],r.apply(this,arguments)},e}},t.enable=function(){s.channel.registerMonkeyPatch("winston",t.winston2),s.channel.registerMonkeyPatch("winston",t.winston3)}},1055:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=1055,e.exports=t},76990:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=76990,e.exports=t},66932:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(8497),i=r(8497);t.makePatchingRequire=i.makePatchingRequire;var o=function(e){return!0},s=function(){function e(){this.version=r(99674).i8,this.subscribers={},this.contextPreservationFunction=function(e){return e},this.knownPatches={},this.currentlyPublishing=!1}return e.prototype.shouldPublish=function(e){var t=this.subscribers[e];return!!t&&t.some((function(e){var t=e.filter;return!t||t(!1)}))},e.prototype.publish=function(e,t){if(!this.currentlyPublishing){var r=this.subscribers[e];if(r){var n={timestamp:Date.now(),data:t};this.currentlyPublishing=!0,r.forEach((function(e){var t=e.listener,r=e.filter;try{r&&r(!0)&&t(n)}catch(e){}})),this.currentlyPublishing=!1}}},e.prototype.subscribe=function(e,t,r){void 0===r&&(r=o),this.subscribers[e]||(this.subscribers[e]=[]),this.subscribers[e].push({listener:t,filter:r})},e.prototype.unsubscribe=function(e,t,r){void 0===r&&(r=o);var n=this.subscribers[e];if(n)for(var i=0;i{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(71017),i=r(56190),o=r(98188),s=Object.keys(process.binding("natives")),a=o.prototype.require;t.makePatchingRequire=function(e){var t={};return function(r){var c=a.apply(this,arguments);if(e[r]){var l=o._resolveFilename(r,this);if(t.hasOwnProperty(l))return t[l];var u=void 0;if(s.indexOf(r)<0)try{u=a.call(this,n.join(r,"package.json")).version}catch(e){return c}else u=process.version.substring(1);var d=u.indexOf("-");d>=0&&(u=u.substring(0,d));for(var p=c,h=0,f=e[r];h{var r;t=e.exports=K,r="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},t.SEMVER_SPEC_VERSION="2.0.0";var n=Number.MAX_SAFE_INTEGER||9007199254740991,i=t.re=[],o=t.src=[],s=0,a=s++;o[a]="0|[1-9]\\d*";var c=s++;o[c]="[0-9]+";var l=s++;o[l]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var u=s++;o[u]="("+o[a]+")\\.("+o[a]+")\\.("+o[a]+")";var d=s++;o[d]="("+o[c]+")\\.("+o[c]+")\\.("+o[c]+")";var p=s++;o[p]="(?:"+o[a]+"|"+o[l]+")";var h=s++;o[h]="(?:"+o[c]+"|"+o[l]+")";var f=s++;o[f]="(?:-("+o[p]+"(?:\\."+o[p]+")*))";var g=s++;o[g]="(?:-?("+o[h]+"(?:\\."+o[h]+")*))";var m=s++;o[m]="[0-9A-Za-z-]+";var y=s++;o[y]="(?:\\+("+o[m]+"(?:\\."+o[m]+")*))";var v=s++,_="v?"+o[u]+o[f]+"?"+o[y]+"?";o[v]="^"+_+"$";var b="[v=\\s]*"+o[d]+o[g]+"?"+o[y]+"?",w=s++;o[w]="^"+b+"$";var C=s++;o[C]="((?:<|>)?=?)";var E=s++;o[E]=o[c]+"|x|X|\\*";var T=s++;o[T]=o[a]+"|x|X|\\*";var S=s++;o[S]="[v=\\s]*("+o[T]+")(?:\\.("+o[T]+")(?:\\.("+o[T]+")(?:"+o[f]+")?"+o[y]+"?)?)?";var x=s++;o[x]="[v=\\s]*("+o[E]+")(?:\\.("+o[E]+")(?:\\.("+o[E]+")(?:"+o[g]+")?"+o[y]+"?)?)?";var k=s++;o[k]="^"+o[C]+"\\s*"+o[S]+"$";var I=s++;o[I]="^"+o[C]+"\\s*"+o[x]+"$";var A=s++;o[A]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var P=s++;o[P]="(?:~>?)";var R=s++;o[R]="(\\s*)"+o[P]+"\\s+",i[R]=new RegExp(o[R],"g");var N=s++;o[N]="^"+o[P]+o[S]+"$";var O=s++;o[O]="^"+o[P]+o[x]+"$";var D=s++;o[D]="(?:\\^)";var L=s++;o[L]="(\\s*)"+o[D]+"\\s+",i[L]=new RegExp(o[L],"g");var M=s++;o[M]="^"+o[D]+o[S]+"$";var B=s++;o[B]="^"+o[D]+o[x]+"$";var F=s++;o[F]="^"+o[C]+"\\s*("+b+")$|^$";var j=s++;o[j]="^"+o[C]+"\\s*("+_+")$|^$";var U=s++;o[U]="(\\s*)"+o[C]+"\\s*("+b+"|"+o[S]+")",i[U]=new RegExp(o[U],"g");var $=s++;o[$]="^\\s*("+o[S]+")\\s+-\\s+("+o[S]+")\\s*$";var q=s++;o[q]="^\\s*("+o[x]+")\\s+-\\s+("+o[x]+")\\s*$";var H=s++;o[H]="(<|>)?=?\\s*\\*";for(var V=0;V<35;V++)r(V,o[V]),i[V]||(i[V]=new RegExp(o[V]));function z(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof K)return e;if("string"!=typeof e)return null;if(e.length>256)return null;if(!(t.loose?i[w]:i[v]).test(e))return null;try{return new K(e,t)}catch(e){return null}}function K(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof K){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>256)throw new TypeError("version is longer than 256 characters");if(!(this instanceof K))return new K(e,t);r("SemVer",e,t),this.options=t,this.loose=!!t.loose;var o=e.trim().match(t.loose?i[w]:i[v]);if(!o)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);-1===r&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},t.inc=function(e,t,r,n){"string"==typeof r&&(n=r,r=void 0);try{return new K(e,r).inc(t,n).version}catch(e){return null}},t.diff=function(e,t){if(X(e,t))return null;var r=z(e),n=z(t),i="";if(r.prerelease.length||n.prerelease.length){i="pre";var o="prerelease"}for(var s in r)if(("major"===s||"minor"===s||"patch"===s)&&r[s]!==n[s])return i+s;return o},t.compareIdentifiers=G;var W=/^[0-9]+$/;function G(e,t){var r=W.test(e),n=W.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:e0}function J(e,t,r){return Q(e,t,r)<0}function X(e,t,r){return 0===Q(e,t,r)}function Z(e,t,r){return 0!==Q(e,t,r)}function ee(e,t,r){return Q(e,t,r)>=0}function te(e,t,r){return Q(e,t,r)<=0}function re(e,t,r,n){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return X(e,r,n);case"!=":return Z(e,r,n);case">":return Y(e,r,n);case">=":return ee(e,r,n);case"<":return J(e,r,n);case"<=":return te(e,r,n);default:throw new TypeError("Invalid operator: "+t)}}function ne(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof ne){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof ne))return new ne(e,t);r("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===ie?this.value="":this.value=this.operator+this.semver.version,r("comp",this)}t.rcompareIdentifiers=function(e,t){return G(t,e)},t.major=function(e,t){return new K(e,t).major},t.minor=function(e,t){return new K(e,t).minor},t.patch=function(e,t){return new K(e,t).patch},t.compare=Q,t.compareLoose=function(e,t){return Q(e,t,!0)},t.rcompare=function(e,t,r){return Q(t,e,r)},t.sort=function(e,r){return e.sort((function(e,n){return t.compare(e,n,r)}))},t.rsort=function(e,r){return e.sort((function(e,n){return t.rcompare(e,n,r)}))},t.gt=Y,t.lt=J,t.eq=X,t.neq=Z,t.gte=ee,t.lte=te,t.cmp=re,t.Comparator=ne;var ie={};function oe(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof oe)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new oe(e.raw,t);if(e instanceof ne)return new oe(e.value,t);if(!(this instanceof oe))return new oe(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function se(e){return!e||"x"===e.toLowerCase()||"*"===e}function ae(e,t,r,n,i,o,s,a,c,l,u,d,p){return((t=se(r)?"":se(n)?">="+r+".0.0":se(i)?">="+r+"."+n+".0":">="+t)+" "+(a=se(c)?"":se(l)?"<"+(+c+1)+".0.0":se(u)?"<"+c+"."+(+l+1)+".0":d?"<="+c+"."+l+"."+u+"-"+d:"<="+a)).trim()}function ce(e,t,n){for(var i=0;i0){var o=e[i].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch)return!0}return!1}return!0}function le(e,t,r){try{t=new oe(t,r)}catch(e){return!1}return t.test(e)}function ue(e,t,r,n){var i,o,s,a,c;switch(e=new K(e,n),t=new oe(t,n),r){case">":i=Y,o=te,s=J,a=">",c=">=";break;case"<":i=J,o=ee,s=Y,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(le(e,t,n))return!1;for(var l=0;l=0.0.0")),d=d||e,p=p||e,i(e.semver,d.semver,n)?d=e:s(e.semver,p.semver,n)&&(p=e)})),d.operator===a||d.operator===c)return!1;if((!p.operator||p.operator===a)&&o(e,p.semver))return!1;if(p.operator===c&&s(e,p.semver))return!1}return!0}ne.prototype.parse=function(e){var t=this.options.loose?i[F]:i[j],r=e.match(t);if(!r)throw new TypeError("Invalid comparator: "+e);this.operator=r[1],"="===this.operator&&(this.operator=""),r[2]?this.semver=new K(r[2],this.options.loose):this.semver=ie},ne.prototype.toString=function(){return this.value},ne.prototype.test=function(e){return r("Comparator.test",e,this.options.loose),this.semver===ie||("string"==typeof e&&(e=new K(e,this.options)),re(e,this.operator,this.semver,this.options))},ne.prototype.intersects=function(e,t){if(!(e instanceof ne))throw new TypeError("a Comparator is required");var r;if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return r=new oe(e.value,t),le(this.value,r,t);if(""===e.operator)return r=new oe(this.value,t),le(e.semver,r,t);var n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),o=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=re(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=re(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||i||o&&s||a||c},t.Range=oe,oe.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},oe.prototype.toString=function(){return this.range},oe.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var n=t?i[q]:i[$];e=e.replace(n,ae),r("hyphen replace",e),e=e.replace(i[U],"$1$2$3"),r("comparator trim",e,i[U]),e=(e=(e=e.replace(i[R],"$1~")).replace(i[L],"$1^")).split(/\s+/).join(" ");var o=t?i[F]:i[j],s=e.split(" ").map((function(e){return function(e,t){return r("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){r("caret",e,t);var n=t.loose?i[B]:i[M];return e.replace(n,(function(t,n,i,o,s){var a;return r("caret",e,t,n,i,o,s),se(n)?a="":se(i)?a=">="+n+".0.0 <"+(+n+1)+".0.0":se(o)?a="0"===n?">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0":">="+n+"."+i+".0 <"+(+n+1)+".0.0":s?(r("replaceCaret pr",s),a="0"===n?"0"===i?">="+n+"."+i+"."+o+"-"+s+" <"+n+"."+i+"."+(+o+1):">="+n+"."+i+"."+o+"-"+s+" <"+n+"."+(+i+1)+".0":">="+n+"."+i+"."+o+"-"+s+" <"+(+n+1)+".0.0"):(r("no pr"),a="0"===n?"0"===i?">="+n+"."+i+"."+o+" <"+n+"."+i+"."+(+o+1):">="+n+"."+i+"."+o+" <"+n+"."+(+i+1)+".0":">="+n+"."+i+"."+o+" <"+(+n+1)+".0.0"),r("caret return",a),a}))}(e,t)})).join(" ")}(e,t),r("caret",e),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){var n=t.loose?i[O]:i[N];return e.replace(n,(function(t,n,i,o,s){var a;return r("tilde",e,t,n,i,o,s),se(n)?a="":se(i)?a=">="+n+".0.0 <"+(+n+1)+".0.0":se(o)?a=">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0":s?(r("replaceTilde pr",s),a=">="+n+"."+i+"."+o+"-"+s+" <"+n+"."+(+i+1)+".0"):a=">="+n+"."+i+"."+o+" <"+n+"."+(+i+1)+".0",r("tilde return",a),a}))}(e,t)})).join(" ")}(e,t),r("tildes",e),e=function(e,t){return r("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return function(e,t){e=e.trim();var n=t.loose?i[I]:i[k];return e.replace(n,(function(t,n,i,o,s,a){r("xRange",e,t,n,i,o,s,a);var c=se(i),l=c||se(o),u=l||se(s);return"="===n&&u&&(n=""),c?t=">"===n||"<"===n?"<0.0.0":"*":n&&u?(l&&(o=0),s=0,">"===n?(n=">=",l?(i=+i+1,o=0,s=0):(o=+o+1,s=0)):"<="===n&&(n="<",l?i=+i+1:o=+o+1),t=n+i+"."+o+"."+s):l?t=">="+i+".0.0 <"+(+i+1)+".0.0":u&&(t=">="+i+"."+o+".0 <"+i+"."+(+o+1)+".0"),r("xRange return",t),t}))}(e,t)})).join(" ")}(e,t),r("xrange",e),e=function(e,t){return r("replaceStars",e,t),e.trim().replace(i[H],"")}(e,t),r("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(s=s.filter((function(e){return!!e.match(o)}))),s.map((function(e){return new ne(e,this.options)}),this)},oe.prototype.intersects=function(e,t){if(!(e instanceof oe))throw new TypeError("a Range is required");return this.set.some((function(r){return r.every((function(r){return e.set.some((function(e){return e.every((function(e){return r.intersects(e,t)}))}))}))}))},t.toComparators=function(e,t){return new oe(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},oe.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new K(e,this.options));for(var t=0;t":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":r&&!Y(r,t)||(r=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}));return r&&e.test(r)?r:null},t.validRange=function(e,t){try{return new oe(e,t).range||"*"}catch(e){return null}},t.ltr=function(e,t,r){return ue(e,t,"<",r)},t.gtr=function(e,t,r){return ue(e,t,">",r)},t.outside=ue,t.prerelease=function(e,t){var r=z(e,t);return r&&r.prerelease.length?r.prerelease:null},t.intersects=function(e,t,r){return e=new oe(e,r),t=new oe(t,r),e.intersects(t)},t.coerce=function(e){if(e instanceof K)return e;if("string"!=typeof e)return null;var t=e.match(i[A]);return null==t?null:z(t[1]+"."+(t[2]||"0")+"."+(t[3]||"0"))}},7267:(e,t,r)=>{"use strict";var n=r(94403),i=n.wrap,o=n.unwrap,s="wrap@before";function a(e,t,r){var n=!!e[t]&&e.propertyIsEnumerable(t);Object.defineProperty(e,t,{configurable:!0,enumerable:n,writable:!0,value:r})}function c(e,t){var r;return r=e._events&&e._events[t],Array.isArray(r)||(r=r?[r]:[]),r}function l(e,t){if(e){var r=e;if("function"==typeof e)r=t(e);else if(Array.isArray(e)){r=[];for(var n=0;n0&&function(e,t){for(var r=t.length,n=0;n{"use strict";e.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(i=n;0!=i--;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(o=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(i=n;0!=i--;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;0!=i--;){var s=o[i];if(!e(t[s],r[s]))return!1}return!0}return t!=t&&r!=r}},57418:(e,t,r)=>{"use strict";var n=r(91320),i=r(68049);e.exports=function(e){var t=n(e);return t.token="","x-oauth-basic"===t.password?t.token=t.user:"x-token-auth"===t.user&&(t.token=t.password),i(t.protocols)||0===t.protocols.length&&i(e)?t.protocol="ssh":t.protocols.length?t.protocol=t.protocols[0]:(t.protocol="file",t.protocols=["file"]),t.href=t.href.replace(/\/$/,""),t}},36314:(e,t,r)=>{"use strict";var n=r(57418);function i(e){if("string"!=typeof e)throw new Error("The url must be a string.");/^([a-z\d-]{1,39})\/([-\.\w]{1,100})$/i.test(e)&&(e="https://github.com/"+e);var t=n(e),r=t.resource.split("."),o=null;switch(t.toString=function(e){return i.stringify(this,e)},t.source=r.length>2?r.slice(1-r.length).join("."):t.source=t.resource,t.git_suffix=/\.git$/.test(t.pathname),t.name=decodeURIComponent((t.pathname||t.href).replace(/(^\/)|(\/$)/g,"").replace(/\.git$/,"")),t.owner=decodeURIComponent(t.user),t.source){case"git.cloudforge.com":t.owner=t.user,t.organization=r[0],t.source="cloudforge.com";break;case"visualstudio.com":if("vs-ssh.visualstudio.com"===t.resource){4===(o=t.name.split("/")).length&&(t.organization=o[1],t.owner=o[2],t.name=o[3],t.full_name=o[2]+"/"+o[3]);break}2===(o=t.name.split("/")).length?(t.owner=o[1],t.name=o[1],t.full_name="_git/"+t.name):3===o.length?(t.name=o[2],"DefaultCollection"===o[0]?(t.owner=o[2],t.organization=o[0],t.full_name=t.organization+"/_git/"+t.name):(t.owner=o[0],t.full_name=t.owner+"/_git/"+t.name)):4===o.length&&(t.organization=o[0],t.owner=o[1],t.name=o[3],t.full_name=t.organization+"/"+t.owner+"/_git/"+t.name);break;case"dev.azure.com":case"azure.com":if("ssh.dev.azure.com"===t.resource){4===(o=t.name.split("/")).length&&(t.organization=o[1],t.owner=o[2],t.name=o[3]);break}5===(o=t.name.split("/")).length?(t.organization=o[0],t.owner=o[1],t.name=o[4],t.full_name="_git/"+t.name):3===o.length?(t.name=o[2],"DefaultCollection"===o[0]?(t.owner=o[2],t.organization=o[0],t.full_name=t.organization+"/_git/"+t.name):(t.owner=o[0],t.full_name=t.owner+"/_git/"+t.name)):4===o.length&&(t.organization=o[0],t.owner=o[1],t.name=o[3],t.full_name=t.organization+"/"+t.owner+"/_git/"+t.name),t.query&&t.query.path&&(t.filepath=t.query.path.replace(/^\/+/g,"")),t.query&&t.query.version&&(t.ref=t.query.version.replace(/^GB/,""));break;default:var s=(o=t.name.split("/")).length-1;if(o.length>=2){var a=o.indexOf("-",2),c=o.indexOf("blob",2),l=o.indexOf("tree",2),u=o.indexOf("commit",2),d=o.indexOf("src",2),p=o.indexOf("raw",2),h=o.indexOf("edit",2);s=a>0?a-1:c>0?c-1:l>0?l-1:u>0?u-1:d>0?d-1:p>0?p-1:h>0?h-1:s,t.owner=o.slice(0,s).join("/"),t.name=o[s],u&&(t.commit=o[s+2])}t.ref="",t.filepathtype="",t.filepath="";var f=o.length>s&&"-"===o[s+1]?s+1:s;o.length>f+2&&["raw","src","blob","tree","edit"].indexOf(o[f+1])>=0&&(t.filepathtype=o[f+1],t.ref=o[f+2],o.length>f+3&&(t.filepath=o.slice(f+3).join("/"))),t.organization=t.owner}t.full_name||(t.full_name=t.owner,t.name&&(t.full_name&&(t.full_name+="/"),t.full_name+=t.name)),t.owner.startsWith("scm/")&&(t.source="bitbucket-server",t.owner=t.owner.replace("scm/",""),t.organization=t.owner,t.full_name=t.owner+"/"+t.name);var g=/(projects|users)\/(.*?)\/repos\/(.*?)((\/.*$)|$)/.exec(t.pathname);return null!=g&&(t.source="bitbucket-server","users"===g[1]?t.owner="~"+g[2]:t.owner=g[2],t.organization=t.owner,t.name=g[3],(o=g[4].split("/")).length>1&&(["raw","browse"].indexOf(o[1])>=0?(t.filepathtype=o[1],o.length>2&&(t.filepath=o.slice(2).join("/"))):"commits"===o[1]&&o.length>2&&(t.commit=o[2])),t.full_name=t.owner+"/"+t.name,t.query.at?t.ref=t.query.at:t.ref=""),t}i.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":return t+"://"+(e.token?function(e){return"bitbucket.org"===e.source?"x-token-auth:"+e.token+"@":e.token+"@"}(e):e.user&&(e.protocols.includes("http")||e.protocols.includes("https"))?e.user+"@":"")+e.resource+r+"/"+function(e){return"bitbucket-server"===e.source?"scm/"+e.full_name:""+e.full_name}(e)+i;default:return e.href}},e.exports=i},41875:e=>{"use strict";e.exports=(e,t)=>{t=t||process.argv;const r=e.startsWith("-")?"":1===e.length?"-":"--",n=t.indexOf(r+e),i=t.indexOf("--");return-1!==n&&(-1===i||n{"use strict";const t=new Set([200,203,204,206,300,301,404,405,410,414,501]),r=new Set([200,203,204,300,301,302,303,307,308,404,405,410,414,501]),n=new Set([500,502,503,504]),i={date:!0,connection:!0,"keep-alive":!0,"proxy-authenticate":!0,"proxy-authorization":!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0},o={"content-length":!0,"content-encoding":!0,"transfer-encoding":!0,"content-range":!0};function s(e){const t=parseInt(e,10);return isFinite(t)?t:0}function a(e){const t={};if(!e)return t;const r=e.trim().split(/\s*,\s*/);for(const e of r){const[r,n]=e.split(/\s*=\s*/,2);t[r]=void 0===n||n.replace(/^"|"$/g,"")}return t}function c(e){let t=[];for(const r in e){const n=e[r];t.push(!0===n?r:r+"="+n)}if(t.length)return t.join(", ")}e.exports=class{constructor(e,t,{shared:r,cacheHeuristic:n,immutableMinTimeToLive:i,ignoreCargoCult:o,_fromObject:s}={}){if(s)this._fromObject(s);else{if(!t||!t.headers)throw Error("Response headers missing");this._assertRequestHasHeaders(e),this._responseTime=this.now(),this._isShared=!1!==r,this._cacheHeuristic=void 0!==n?n:.1,this._immutableMinTtl=void 0!==i?i:864e5,this._status="status"in t?t.status:200,this._resHeaders=t.headers,this._rescc=a(t.headers["cache-control"]),this._method="method"in e?e.method:"GET",this._url=e.url,this._host=e.headers.host,this._noAuthorization=!e.headers.authorization,this._reqHeaders=t.headers.vary?e.headers:null,this._reqcc=a(e.headers["cache-control"]),o&&"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":c(this._rescc)}),delete this._resHeaders.expires,delete this._resHeaders.pragma),null==t.headers["cache-control"]&&/no-cache/.test(t.headers.pragma)&&(this._rescc["no-cache"]=!0)}}now(){return Date.now()}storable(){return!(this._reqcc["no-store"]||!("GET"===this._method||"HEAD"===this._method||"POST"===this._method&&this._hasExplicitExpiration())||!r.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||t.has(this._status)))}_hasExplicitExpiration(){return this._isShared&&this._rescc["s-maxage"]||this._rescc["max-age"]||this._resHeaders.expires}_assertRequestHasHeaders(e){if(!e||!e.headers)throw Error("Request headers missing")}satisfiesWithoutRevalidation(e){this._assertRequestHasHeaders(e);const t=a(e.headers["cache-control"]);return!t["no-cache"]&&!/no-cache/.test(e.headers.pragma)&&(!(t["max-age"]&&this.age()>t["max-age"])&&(!(t["min-fresh"]&&this.timeToLive()<1e3*t["min-fresh"])&&(!(this.stale()&&(!t["max-stale"]||this._rescc["must-revalidate"]||!(!0===t["max-stale"]||t["max-stale"]>this.age()-this.maxAge())))&&this._requestMatches(e,!1))))}_requestMatches(e,t){return(!this._url||this._url===e.url)&&this._host===e.headers.host&&(!e.method||this._method===e.method||t&&"HEAD"===e.method)&&this._varyMatches(e)}_allowsStoringAuthenticated(){return this._rescc["must-revalidate"]||this._rescc.public||this._rescc["s-maxage"]}_varyMatches(e){if(!this._resHeaders.vary)return!0;if("*"===this._resHeaders.vary)return!1;const t=this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/);for(const r of t)if(e.headers[r]!==this._reqHeaders[r])return!1;return!0}_copyWithoutHopByHopHeaders(e){const t={};for(const r in e)i[r]||(t[r]=e[r]);if(e.connection){const r=e.connection.trim().split(/\s*,\s*/);for(const e of r)delete t[e]}if(t.warning){const e=t.warning.split(/,/).filter((e=>!/^\s*1[0-9][0-9]/.test(e)));e.length?t.warning=e.join(",").trim():delete t.warning}return t}responseHeaders(){const e=this._copyWithoutHopByHopHeaders(this._resHeaders),t=this.age();return t>86400&&!this._hasExplicitExpiration()&&this.maxAge()>86400&&(e.warning=(e.warning?`${e.warning}, `:"")+'113 - "rfc7234 5.5.4"'),e.age=`${Math.round(t)}`,e.date=new Date(this.now()).toUTCString(),e}date(){const e=Date.parse(this._resHeaders.date);return isFinite(e)?e:this._responseTime}age(){return this._ageValue()+(this.now()-this._responseTime)/1e3}_ageValue(){return s(this._resHeaders.age)}maxAge(){if(!this.storable()||this._rescc["no-cache"])return 0;if(this._isShared&&this._resHeaders["set-cookie"]&&!this._rescc.public&&!this._rescc.immutable)return 0;if("*"===this._resHeaders.vary)return 0;if(this._isShared){if(this._rescc["proxy-revalidate"])return 0;if(this._rescc["s-maxage"])return s(this._rescc["s-maxage"])}if(this._rescc["max-age"])return s(this._rescc["max-age"]);const e=this._rescc.immutable?this._immutableMinTtl:0,t=this.date();if(this._resHeaders.expires){const r=Date.parse(this._resHeaders.expires);return Number.isNaN(r)||rr)return Math.max(e,(t-r)/1e3*this._cacheHeuristic)}return e}timeToLive(){const e=this.maxAge()-this.age(),t=e+s(this._rescc["stale-if-error"]),r=e+s(this._rescc["stale-while-revalidate"]);return 1e3*Math.max(0,e,t,r)}stale(){return this.maxAge()<=this.age()}_useStaleIfError(){return this.maxAge()+s(this._rescc["stale-if-error"])>this.age()}useStaleWhileRevalidate(){return this.maxAge()+s(this._rescc["stale-while-revalidate"])>this.age()}static fromObject(e){return new this(void 0,void 0,{_fromObject:e})}_fromObject(e){if(this._responseTime)throw Error("Reinitialized");if(!e||1!==e.v)throw Error("Invalid serialization");this._responseTime=e.t,this._isShared=e.sh,this._cacheHeuristic=e.ch,this._immutableMinTtl=void 0!==e.imm?e.imm:864e5,this._status=e.st,this._resHeaders=e.resh,this._rescc=e.rescc,this._method=e.m,this._url=e.u,this._host=e.h,this._noAuthorization=e.a,this._reqHeaders=e.reqh,this._reqcc=e.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(e){this._assertRequestHasHeaders(e);const t=this._copyWithoutHopByHopHeaders(e.headers);if(delete t["if-range"],!this._requestMatches(e,!0)||!this.storable())return delete t["if-none-match"],delete t["if-modified-since"],t;if(this._resHeaders.etag&&(t["if-none-match"]=t["if-none-match"]?`${t["if-none-match"]}, ${this._resHeaders.etag}`:this._resHeaders.etag),t["accept-ranges"]||t["if-match"]||t["if-unmodified-since"]||this._method&&"GET"!=this._method){if(delete t["if-modified-since"],t["if-none-match"]){const e=t["if-none-match"].split(/,/).filter((e=>!/^\s*W\//.test(e)));e.length?t["if-none-match"]=e.join(",").trim():delete t["if-none-match"]}}else this._resHeaders["last-modified"]&&!t["if-modified-since"]&&(t["if-modified-since"]=this._resHeaders["last-modified"]);return t}revalidatedPolicy(e,t){if(this._assertRequestHasHeaders(e),this._useStaleIfError()&&function(e){return!e||n.has(e.status)}(t))return{modified:!1,matches:!1,policy:this};if(!t||!t.headers)throw Error("Response headers missing");let r=!1;if(void 0!==t.status&&304!=t.status?r=!1:t.headers.etag&&!/^\s*W\//.test(t.headers.etag)?r=this._resHeaders.etag&&this._resHeaders.etag.replace(/^\s*W\//,"")===t.headers.etag:this._resHeaders.etag&&t.headers.etag?r=this._resHeaders.etag.replace(/^\s*W\//,"")===t.headers.etag.replace(/^\s*W\//,""):this._resHeaders["last-modified"]?r=this._resHeaders["last-modified"]===t.headers["last-modified"]:this._resHeaders.etag||this._resHeaders["last-modified"]||t.headers.etag||t.headers["last-modified"]||(r=!0),!r)return{policy:new this.constructor(e,t),modified:304!=t.status,matches:!1};const i={};for(const e in this._resHeaders)i[e]=e in t.headers&&!o[e]?t.headers[e]:this._resHeaders[e];const s=Object.assign({},t,{status:this._status,method:this._method,headers:i});return{policy:new this.constructor(e,s,{shared:this._isShared,cacheHeuristic:this._cacheHeuristic,immutableMinTimeToLive:this._immutableMinTtl}),modified:!1,matches:!0}}}},60660:()=>{},91225:()=>{},67546:(e,t,r)=>{"use strict";const n=r(57147);let i;e.exports=()=>(void 0===i&&(i=function(){try{return n.statSync("/.dockerenv"),!0}catch(e){return!1}}()||function(){try{return n.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch(e){return!1}}()),i)},53571:e=>{e.exports=function(){return"undefined"!=typeof window&&"object"==typeof window.process&&"renderer"===window.process.type||!("undefined"==typeof process||"object"!=typeof process.versions||!process.versions.electron)||"object"==typeof navigator&&"string"==typeof navigator.userAgent&&navigator.userAgent.indexOf("Electron")>=0}},68049:(e,t,r)=>{"use strict";var n=r(38173);e.exports=function e(t){if(Array.isArray(t))return-1!==t.indexOf("ssh")||-1!==t.indexOf("rsync");if("string"!=typeof t)return!1;var r=n(t);if(t=t.substring(t.indexOf("://")+3),e(r))return!0;var i=new RegExp(".([a-zA-Z\\d]+):(\\d+)/");return!t.match(i)&&t.indexOf("@"){"use strict";const n=r(22037),i=r(57147),o=r(67546),s=()=>{if("linux"!==process.platform)return!1;if(n.release().toLowerCase().includes("microsoft"))return!o();try{return!!i.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")&&!o()}catch(e){return!1}};process.env.__IS_WSL_TEST__?e.exports=s:e.exports=s()},25127:e=>{"use strict";var t=e.exports=function(e,t,n){"function"==typeof t&&(n=t,t={}),r(t,"function"==typeof(n=t.cb||n)?n:n.pre||function(){},n.post||function(){},e,"",e)};function r(e,n,i,o,s,a,c,l,u,d){if(o&&"object"==typeof o&&!Array.isArray(o)){for(var p in n(o,s,a,c,l,u,d),o){var h=o[p];if(Array.isArray(h)){if(p in t.arrayKeywords)for(var f=0;f{var t=1e3,r=60*t,n=60*r,i=24*n;function o(e,t,r,n){var i=t>=1.5*r;return Math.round(e/r)+" "+n+(i?"s":"")}e.exports=function(e,s){s=s||{};var a,c,l=typeof e;if("string"===l&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var o=/^(-?(?:\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(o){var s=parseFloat(o[1]);switch((o[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return 6048e5*s;case"days":case"day":case"d":return s*i;case"hours":case"hour":case"hrs":case"hr":case"h":return s*n;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(e);if("number"===l&&isFinite(e))return s.long?(a=e,(c=Math.abs(a))>=i?o(a,c,i,"day"):c>=n?o(a,c,n,"hour"):c>=r?o(a,c,r,"minute"):c>=t?o(a,c,t,"second"):a+" ms"):function(e){var o=Math.abs(e);return o>=i?Math.round(e/i)+"d":o>=n?Math.round(e/n)+"h":o>=r?Math.round(e/r)+"m":o>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},60070:(e,t,r)=>{var n=r(56105);function i(e,t){n.cipher.registerAlgorithm(e,(function(){return new n.aes.Algorithm(e,t)}))}r(27140),r(30445),r(56827),e.exports=n.aes=n.aes||{},n.aes.startEncrypting=function(e,t,r,n){var i=f({key:e,output:r,decrypt:!1,mode:n});return i.start(t),i},n.aes.createEncryptionCipher=function(e,t){return f({key:e,output:null,decrypt:!1,mode:t})},n.aes.startDecrypting=function(e,t,r,n){var i=f({key:e,output:r,decrypt:!0,mode:n});return i.start(t),i},n.aes.createDecryptionCipher=function(e,t){return f({key:e,output:null,decrypt:!0,mode:t})},n.aes.Algorithm=function(e,t){u||d();var r=this;r.name=e,r.mode=new t({blockSize:16,cipher:{encrypt:function(e,t){return h(r._w,e,t,!1)},decrypt:function(e,t){return h(r._w,e,t,!0)}}}),r._init=!1},n.aes.Algorithm.prototype.initialize=function(e){if(!this._init){var t,r=e.key;if("string"!=typeof r||16!==r.length&&24!==r.length&&32!==r.length){if(n.util.isArray(r)&&(16===r.length||24===r.length||32===r.length)){t=r,r=n.util.createBuffer();for(var i=0;i>>=2,i=0;i>8^255&d^99,o[g]=d,s[d]=g,h=(p=e[d])<<24^d<<16^d<<8^d^p,f=((r=e[g])^(n=e[r])^(i=e[n]))<<24^(g^i)<<16^(g^n^i)<<8^g^r^i;for(var y=0;y<4;++y)c[y][g]=h,l[y][d]=f,h=h<<24|h>>>8,f=f<<24|f>>>8;0===g?g=m=1:(g=r^e[e[e[r^i]]],m^=e[e[m]])}}function p(e,t){for(var r,n=e.slice(0),i=1,s=n.length,c=4*(s+6+1),u=s;u>>16&255]<<24^o[r>>>8&255]<<16^o[255&r]<<8^o[r>>>24]^a[i]<<24,i++):s>6&&u%s==4&&(r=o[r>>>24]<<24^o[r>>>16&255]<<16^o[r>>>8&255]<<8^o[255&r]),n[u]=n[u-s]^r;if(t){for(var d,p=l[0],h=l[1],f=l[2],g=l[3],m=n.slice(0),y=(u=0,(c=n.length)-4);u>>24]]^h[o[d>>>16&255]]^f[o[d>>>8&255]]^g[o[255&d]];n=m}return n}function h(e,t,r,n){var i,a,u,d,p,h,f,g,m,y,v,_,b=e.length/4-1;n?(i=l[0],a=l[1],u=l[2],d=l[3],p=s):(i=c[0],a=c[1],u=c[2],d=c[3],p=o),h=t[0]^e[0],f=t[n?3:1]^e[1],g=t[2]^e[2],m=t[n?1:3]^e[3];for(var w=3,C=1;C>>24]^a[f>>>16&255]^u[g>>>8&255]^d[255&m]^e[++w],v=i[f>>>24]^a[g>>>16&255]^u[m>>>8&255]^d[255&h]^e[++w],_=i[g>>>24]^a[m>>>16&255]^u[h>>>8&255]^d[255&f]^e[++w],m=i[m>>>24]^a[h>>>16&255]^u[f>>>8&255]^d[255&g]^e[++w],h=y,f=v,g=_;r[0]=p[h>>>24]<<24^p[f>>>16&255]<<16^p[g>>>8&255]<<8^p[255&m]^e[++w],r[n?3:1]=p[f>>>24]<<24^p[g>>>16&255]<<16^p[m>>>8&255]<<8^p[255&h]^e[++w],r[2]=p[g>>>24]<<24^p[m>>>16&255]<<16^p[h>>>8&255]<<8^p[255&f]^e[++w],r[n?1:3]=p[m>>>24]<<24^p[h>>>16&255]<<16^p[f>>>8&255]<<8^p[255&g]^e[++w]}function f(e){var t,r="AES-"+((e=e||{}).mode||"CBC").toUpperCase(),i=(t=e.decrypt?n.cipher.createDecipher(r,e.key):n.cipher.createCipher(r,e.key)).start;return t.start=function(e,r){var o=null;r instanceof n.util.ByteBuffer&&(o=r,r={}),(r=r||{}).output=o,r.iv=e,i.call(t,r)},t}},63063:(e,t,r)=>{var n=r(56105);r(60070),r(78653);var i=e.exports=n.tls;function o(e,t,r){var o=t.entity===n.tls.ConnectionEnd.client;e.read.cipherState={init:!1,cipher:n.cipher.createDecipher("AES-CBC",o?r.keys.server_write_key:r.keys.client_write_key),iv:o?r.keys.server_write_IV:r.keys.client_write_IV},e.write.cipherState={init:!1,cipher:n.cipher.createCipher("AES-CBC",o?r.keys.client_write_key:r.keys.server_write_key),iv:o?r.keys.client_write_IV:r.keys.server_write_IV},e.read.cipherFunction=l,e.write.cipherFunction=s,e.read.macLength=e.write.macLength=r.mac_length,e.read.macFunction=e.write.macFunction=i.hmac_sha1}function s(e,t){var r,o=!1,s=t.macFunction(t.macKey,t.sequenceNumber,e);e.fragment.putBytes(s),t.updateSequenceNumber(),r=e.version.minor===i.Versions.TLS_1_0.minor?t.cipherState.init?null:t.cipherState.iv:n.random.getBytesSync(16),t.cipherState.init=!0;var c=t.cipherState.cipher;return c.start({iv:r}),e.version.minor>=i.Versions.TLS_1_1.minor&&c.output.putBytes(r),c.update(e.fragment),c.finish(a)&&(e.fragment=c.output,e.length=e.fragment.length(),o=!0),o}function a(e,t,r){if(!r){var n=e-t.length()%e;t.fillWithByte(n-1,n)}return!0}function c(e,t,r){var n=!0;if(r){for(var i=t.length(),o=t.last(),s=i-1-o;s=a?(e.fragment=s.output.getBytes(u-a),l=s.output.getBytes(a)):e.fragment=s.output.getBytes(),e.fragment=n.util.createBuffer(e.fragment),e.length=e.fragment.length();var d=t.macFunction(t.macKey,t.sequenceNumber,e);return t.updateSequenceNumber(),o=function(e,t,r){var i=n.hmac.create();return i.start("SHA1",e),i.update(t),t=i.digest().getBytes(),i.start(null,null),i.update(r),t===(r=i.digest().getBytes())}(t.macKey,l,d)&&o,o}i.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:function(e){e.bulk_cipher_algorithm=i.BulkCipherAlgorithm.aes,e.cipher_type=i.CipherType.block,e.enc_key_length=16,e.block_length=16,e.fixed_iv_length=16,e.record_iv_length=16,e.mac_algorithm=i.MACAlgorithm.hmac_sha1,e.mac_length=20,e.mac_key_length=20},initConnectionState:o},i.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA={id:[0,53],name:"TLS_RSA_WITH_AES_256_CBC_SHA",initSecurityParameters:function(e){e.bulk_cipher_algorithm=i.BulkCipherAlgorithm.aes,e.cipher_type=i.CipherType.block,e.enc_key_length=32,e.block_length=16,e.fixed_iv_length=16,e.record_iv_length=16,e.mac_algorithm=i.MACAlgorithm.hmac_sha1,e.mac_length=20,e.mac_key_length=20},initConnectionState:o}},89796:(e,t,r)=>{var n=r(56105);r(61057);var i=n.asn1;t.privateKeyValidator={name:"PrivateKeyInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},t.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{tagClass:i.Class.UNIVERSAL,type:i.Type.BITSTRING,constructed:!1,composed:!0,captureBitStringValue:"ed25519PublicKey"}]}},61057:(e,t,r)=>{var n=r(56105);r(56827),r(81877);var i=e.exports=n.asn1=n.asn1||{};function o(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}}function s(e,t,r,n){var a;o(e,t,2);var c=e.getByte();t--;var l=192&c,u=31&c;a=e.length();var d,p,h=function(e,t){var r=e.getByte();if(t--,128!==r){var n;if(128&r){var i=127&r;o(e,t,i),n=e.getInt(i<<3)}else n=r;if(n<0)throw new Error("Negative length: "+n);return n}}(e,t);if(t-=a-e.length(),void 0!==h&&h>t){if(n.strict){var f=new Error("Too few bytes to read ASN.1 value.");throw f.available=e.length(),f.remaining=t,f.requested=h,f}h=t}var g=32==(32&c);if(g)if(d=[],void 0===h)for(;;){if(o(e,t,2),e.bytes(2)===String.fromCharCode(0,0)){e.getBytes(2),t-=2;break}a=e.length(),d.push(s(e,t,r+1,n)),t-=a-e.length()}else for(;h>0;)a=e.length(),d.push(s(e,h,r+1,n)),t-=a-e.length(),h-=a-e.length();if(void 0===d&&l===i.Class.UNIVERSAL&&u===i.Type.BITSTRING&&(p=e.bytes(h)),void 0===d&&n.decodeBitStrings&&l===i.Class.UNIVERSAL&&u===i.Type.BITSTRING&&h>1){var m=e.read,y=t,v=0;if(u===i.Type.BITSTRING&&(o(e,t,1),v=e.getByte(),t--),0===v)try{a=e.length();var _=s(e,t,r+1,{strict:!0,decodeBitStrings:!0}),b=a-e.length();t-=b,u==i.Type.BITSTRING&&b++;var w=_.tagClass;b!==h||w!==i.Class.UNIVERSAL&&w!==i.Class.CONTEXT_SPECIFIC||(d=[_])}catch(e){}void 0===d&&(e.read=m,t=y)}if(void 0===d){if(void 0===h){if(n.strict)throw new Error("Non-constructed ASN.1 object of indefinite length.");h=t}if(u===i.Type.BMPSTRING)for(d="";h>0;h-=2)o(e,t,2),d+=String.fromCharCode(e.getInt16()),t-=2;else d=e.getBytes(h),t-=h}var C=void 0===p?null:{bitStringContents:p};return i.create(l,u,g,d,C)}i.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192},i.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},i.create=function(e,t,r,o,s){if(n.util.isArray(o)){for(var a=[],c=0;c1&&(0===e.value.charCodeAt(0)&&0==(128&e.value.charCodeAt(1))||255===e.value.charCodeAt(0)&&128==(128&e.value.charCodeAt(1)))?o.putBytes(e.value.substr(1)):o.putBytes(e.value);if(t.putByte(r),o.length()<=127)t.putByte(127&o.length());else{var c=o.length(),l="";do{l+=String.fromCharCode(255&c),c>>>=8}while(c>0);for(t.putByte(128|l.length),a=l.length-1;a>=0;--a)t.putByte(l.charCodeAt(a))}return t.putBuffer(o),t},i.oidToDer=function(e){var t,r,i,o,s=e.split("."),a=n.util.createBuffer();a.putByte(40*parseInt(s[0],10)+parseInt(s[1],10));for(var c=2;c>>=7,t||(o|=128),r.push(o),t=!1}while(i>0);for(var l=r.length-1;l>=0;--l)a.putByte(r[l])}return a},i.derToOid=function(e){var t;"string"==typeof e&&(e=n.util.createBuffer(e));var r=e.getByte();t=Math.floor(r/40)+"."+r%40;for(var i=0;e.length()>0;)i<<=7,128&(r=e.getByte())?i+=127&r:(t+="."+(i+r),i=0);return t},i.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),s=parseInt(e.substr(8,2),10),a=0;if(e.length>11){var c=e.charAt(10),l=10;"+"!==c&&"-"!==c&&(a=parseInt(e.substr(10,2),10),l+=2)}if(t.setUTCFullYear(r,n,i),t.setUTCHours(o,s,a,0),l&&("+"===(c=e.charAt(l))||"-"===c)){var u=60*parseInt(e.substr(l+1,2),10)+parseInt(e.substr(l+4,2),10);u*=6e4,"+"===c?t.setTime(+t-u):t.setTime(+t+u)}return t},i.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),s=parseInt(e.substr(10,2),10),a=parseInt(e.substr(12,2),10),c=0,l=0,u=!1;"Z"===e.charAt(e.length-1)&&(u=!0);var d=e.length-5,p=e.charAt(d);return"+"!==p&&"-"!==p||(l=60*parseInt(e.substr(d+1,2),10)+parseInt(e.substr(d+4,2),10),l*=6e4,"+"===p&&(l*=-1),u=!0),"."===e.charAt(14)&&(c=1e3*parseFloat(e.substr(14),10)),u?(t.setUTCFullYear(r,n,i),t.setUTCHours(o,s,a,c),t.setTime(+t+l)):(t.setFullYear(r,n,i),t.setHours(o,s,a,c)),t},i.dateToUtcTime=function(e){if("string"==typeof e)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=-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},i.derToInteger=function(e){"string"==typeof e&&(e=n.util.createBuffer(e));var t=8*e.length();if(t>32)throw new Error("Integer too large; max is 32-bits.");return e.getSignedInt(t)},i.validate=function(e,t,r,o){var s=!1;if(e.tagClass!==t.tagClass&&void 0!==t.tagClass||e.type!==t.type&&void 0!==t.type)o&&(e.tagClass!==t.tagClass&&o.push("["+t.name+'] Expected tag class "'+t.tagClass+'", got "'+e.tagClass+'"'),e.type!==t.type&&o.push("["+t.name+'] Expected type "'+t.type+'", got "'+e.type+'"'));else if(e.constructed===t.constructed||void 0===t.constructed){if(s=!0,t.value&&n.util.isArray(t.value))for(var a=0,c=0;s&&c0&&(o+="\n");for(var s="",c=0;c1?o+="0x"+n.util.bytesToHex(e.value.slice(1)):o+="(none)",e.value.length>0){var p=e.value.charCodeAt(0);1==p?o+=" (1 unused bit shown)":p>1&&(o+=" ("+p+" unused bits shown)")}}else if(e.type===i.Type.OCTETSTRING)a.test(e.value)||(o+="("+e.value+") "),o+="0x"+n.util.bytesToHex(e.value);else if(e.type===i.Type.UTF8)try{o+=n.util.decodeUtf8(e.value)}catch(t){if("URI malformed"!==t.message)throw t;o+="0x"+n.util.bytesToHex(e.value)+" (malformed UTF8)"}else e.type===i.Type.PRINTABLESTRING||e.type===i.Type.IA5String?o+=e.value:a.test(e.value)?o+="0x"+n.util.bytesToHex(e.value):0===e.value.length?o+="[null]":o+=e.value}return o}},36147:e=>{var t={};e.exports=t;var r={};t.encode=function(e,t,r){if("string"!=typeof t)throw new TypeError('"alphabet" must be a string.');if(void 0!==r&&"number"!=typeof r)throw new TypeError('"maxline" must be a number.');var n="";if(e instanceof Uint8Array){var i=0,o=t.length,s=t.charAt(0),a=[0];for(i=0;i0;)a.push(l%o),l=l/o|0}for(i=0;0===e[i]&&i=0;--i)n+=t[a[i]]}else n=function(e,t){var r=0,n=t.length,i=t.charAt(0),o=[0];for(r=0;r0;)o.push(a%n),a=a/n|0}var c="";for(r=0;0===e.at(r)&&r=0;--r)c+=t[o[r]];return c}(e,t);if(r){var u=new RegExp(".{1,"+r+"}","g");n=n.match(u).join("\r\n")}return n},t.decode=function(e,t){if("string"!=typeof e)throw new TypeError('"input" must be a string.');if("string"!=typeof t)throw new TypeError('"alphabet" must be a string.');var n=r[t];if(!n){n=r[t]=[];for(var i=0;i>=8;for(;u>0;)a.push(255&u),u>>=8}for(var d=0;e[d]===s&&d{var n=r(56105);r(56827),e.exports=n.cipher=n.cipher||{},n.cipher.algorithms=n.cipher.algorithms||{},n.cipher.createCipher=function(e,t){var r=e;if("string"==typeof r&&(r=n.cipher.getAlgorithm(r))&&(r=r()),!r)throw new Error("Unsupported algorithm: "+e);return new n.cipher.BlockCipher({algorithm:r,key:t,decrypt:!1})},n.cipher.createDecipher=function(e,t){var r=e;if("string"==typeof r&&(r=n.cipher.getAlgorithm(r))&&(r=r()),!r)throw new Error("Unsupported algorithm: "+e);return new n.cipher.BlockCipher({algorithm:r,key:t,decrypt:!0})},n.cipher.registerAlgorithm=function(e,t){e=e.toUpperCase(),n.cipher.algorithms[e]=t},n.cipher.getAlgorithm=function(e){return(e=e.toUpperCase())in n.cipher.algorithms?n.cipher.algorithms[e]:null};var i=n.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)};i.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=n.util.createBuffer(),this.output=e.output||n.util.createBuffer(),this.mode.start(t)},i.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()},i.prototype.finish=function(e){!e||"ECB"!==this.mode.name&&"CBC"!==this.mode.name||(this.mode.pad=function(t){return e(this.blockSize,t,!1)},this.mode.unpad=function(t){return e(this.blockSize,t,!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)))}},30445:(e,t,r)=>{var n=r(56105);r(56827),n.cipher=n.cipher||{};var i=e.exports=n.cipher.modes=n.cipher.modes||{};function o(e,t){if("string"==typeof e&&(e=n.util.createBuffer(e)),n.util.isArray(e)&&e.length>4){var r=e;e=n.util.createBuffer();for(var i=0;i0))return!0;for(var n=0;n0))return!0;for(var n=0;n0)return!1;var r=e.length(),n=e.at(r-1);return!(n>this.blockSize<<2||(e.truncate(n),0))},i.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)},i.cbc.prototype.start=function(e){if(null===e.iv){if(!this._prev)throw new Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else{if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=o(e.iv,this.blockSize),this._prev=this._iv.slice(0)}},i.cbc.prototype.encrypt=function(e,t,r){if(e.length()0))return!0;for(var n=0;n0))return!0;for(var n=0;n0)return!1;var r=e.length(),n=e.at(r-1);return!(n>this.blockSize<<2||(e.truncate(n),0))},i.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=n.util.createBuffer(),this._partialBytes=0},i.cfb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=o(e.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.cfb.prototype.encrypt=function(e,t,r){var n=e.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i0&&(o=this.blockSize-o),this._partialOutput.clear(),i=0;i0)e.read-=this.blockSize;else for(i=0;i0&&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}},i.cfb.prototype.decrypt=function(e,t,r){var n=e.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i0&&(o=this.blockSize-o),this._partialOutput.clear(),i=0;i0)e.read-=this.blockSize;else for(i=0;i0&&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}},i.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=n.util.createBuffer(),this._partialBytes=0},i.ofb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=o(e.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.ofb.prototype.encrypt=function(e,t,r){var n=e.length();if(0===e.length())return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i0&&(o=this.blockSize-o),this._partialOutput.clear(),i=0;i0)e.read-=this.blockSize;else for(i=0;i0&&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}},i.ofb.prototype.decrypt=i.ofb.prototype.encrypt,i.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=n.util.createBuffer(),this._partialBytes=0},i.ctr.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=o(e.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.ctr.prototype.encrypt=function(e,t,r){var n=e.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i0&&(o=this.blockSize-o),this._partialOutput.clear(),i=0;i0&&(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}s(this._inBlock)},i.ctr.prototype.decrypt=i.ctr.prototype.encrypt,i.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=n.util.createBuffer(),this._partialBytes=0,this._R=3774873600},i.gcm.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");var t,r=n.util.createBuffer(e.iv);if(this._cipherLength=0,t="additionalData"in e?n.util.createBuffer(e.additionalData):n.util.createBuffer(),this._tagLength="tagLength"in e?e.tagLength:128,this._tag=null,e.decrypt&&(this._tag=n.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 i=r.length();if(12===i)this._j0=[r.getInt32(),r.getInt32(),r.getInt32(),1];else{for(this._j0=[0,0,0,0];r.length()>0;)this._j0=this.ghash(this._hashSubkey,this._j0,[r.getInt32(),r.getInt32(),r.getInt32(),r.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(a(8*i)))}this._inBlock=this._j0.slice(0),s(this._inBlock),this._partialBytes=0,t=n.util.createBuffer(t),this._aDataLength=a(8*t.length());var o=t.length()%this.blockSize;for(o&&t.fillWithByte(0,this.blockSize-o),this._s=[0,0,0,0];t.length()>0;)this._s=this.ghash(this._hashSubkey,this._s,[t.getInt32(),t.getInt32(),t.getInt32(),t.getInt32()])},i.gcm.prototype.encrypt=function(e,t,r){var n=e.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize){for(var i=0;i0&&(o=this.blockSize-o),this._partialOutput.clear(),i=0;i0&&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),s(this._inBlock)},i.gcm.prototype.decrypt=function(e,t,r){var n=e.length();if(n0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),s(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;i0;--n)t[n]=e[n]>>>1|(1&e[n-1])<<31;t[0]=e[0]>>>1,r&&(t[0]^=this._R)},i.gcm.prototype.tableMultiply=function(e){for(var t=[0,0,0,0],r=0;r<32;++r){var n=e[r/8|0]>>>4*(7-r%8)&15,i=this._m[r][n];t[0]^=i[0],t[1]^=i[1],t[2]^=i[2],t[3]^=i[3]}return t},i.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)},i.gcm.prototype.generateHashTable=function(e,t){for(var r=8/t,n=4*r,i=16*r,o=new Array(i),s=0;s>>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{var n=r(56105);function i(e,t){n.cipher.registerAlgorithm(e,(function(){return new n.des.Algorithm(e,t)}))}r(27140),r(30445),r(56827),e.exports=n.des=n.des||{},n.des.startEncrypting=function(e,t,r,n){var i=f({key:e,output:r,decrypt:!1,mode:n||(null===t?"ECB":"CBC")});return i.start(t),i},n.des.createEncryptionCipher=function(e,t){return f({key:e,output:null,decrypt:!1,mode:t})},n.des.startDecrypting=function(e,t,r,n){var i=f({key:e,output:r,decrypt:!0,mode:n||(null===t?"ECB":"CBC")});return i.start(t),i},n.des.createDecryptionCipher=function(e,t){return f({key:e,output:null,decrypt:!0,mode:t})},n.des.Algorithm=function(e,t){var r=this;r.name=e,r.mode=new t({blockSize:8,cipher:{encrypt:function(e,t){return h(r._keys,e,t,!1)},decrypt:function(e,t){return h(r._keys,e,t,!0)}}}),r._init=!1},n.des.Algorithm.prototype.initialize=function(e){if(!this._init){var t=n.util.createBuffer(e.key);if(0===this.name.indexOf("3DES")&&24!==t.length())throw new Error("Invalid Triple-DES key size: "+8*t.length());this._keys=function(e){for(var t,r=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],n=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],i=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],o=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],s=[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],c=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],l=[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],d=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],p=[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],f=[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],m=e.length()>8?3:1,y=[],v=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],_=0,b=0;b>>4^C))<<4,w^=t=65535&((C^=t)>>>-16^w),w^=(t=858993459&(w>>>2^(C^=t<<-16)))<<2,w^=t=65535&((C^=t)>>>-16^w),w^=(t=1431655765&(w>>>1^(C^=t<<-16)))<<1,w^=t=16711935&((C^=t)>>>8^w),t=(w^=(t=1431655765&(w>>>1^(C^=t<<8)))<<1)<<8|(C^=t)>>>20&240,w=C<<24|C<<8&16711680|C>>>8&65280|C>>>24&240,C=t;for(var E=0;E>>26,C=C<<2|C>>>26):(w=w<<1|w>>>27,C=C<<1|C>>>27);var T=r[(w&=-15)>>>28]|n[w>>>24&15]|i[w>>>20&15]|o[w>>>16&15]|s[w>>>12&15]|a[w>>>8&15]|c[w>>>4&15],S=l[(C&=-15)>>>28]|u[C>>>24&15]|d[C>>>20&15]|p[C>>>16&15]|h[C>>>12&15]|f[C>>>8&15]|g[C>>>4&15];t=65535&(S>>>16^T),y[_++]=T^t,y[_++]=S^t<<16}}return y}(t),this._init=!0}},i("DES-ECB",n.cipher.modes.ecb),i("DES-CBC",n.cipher.modes.cbc),i("DES-CFB",n.cipher.modes.cfb),i("DES-OFB",n.cipher.modes.ofb),i("DES-CTR",n.cipher.modes.ctr),i("3DES-ECB",n.cipher.modes.ecb),i("3DES-CBC",n.cipher.modes.cbc),i("3DES-CFB",n.cipher.modes.cfb),i("3DES-OFB",n.cipher.modes.ofb),i("3DES-CTR",n.cipher.modes.ctr);var o=[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],s=[-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],a=[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],c=[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],l=[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],u=[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],d=[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],p=[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 h(e,t,r,n){var i,h,f=32===e.length?3:9;i=3===f?n?[30,-2,-2]:[0,32,2]:n?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var g=t[0],m=t[1];g^=(h=252645135&(g>>>4^m))<<4,g^=(h=65535&(g>>>16^(m^=h)))<<16,g^=h=858993459&((m^=h)>>>2^g),g^=h=16711935&((m^=h<<2)>>>8^g),g=(g^=(h=1431655765&(g>>>1^(m^=h<<8)))<<1)<<1|g>>>31,m=(m^=h)<<1|m>>>31;for(var y=0;y>>4|m<<28)^e[b+1];h=g,g=m,m=h^(s[w>>>24&63]|c[w>>>16&63]|u[w>>>8&63]|p[63&w]|o[C>>>24&63]|a[C>>>16&63]|l[C>>>8&63]|d[63&C])}h=g,g=m,m=h}m=m>>>1|m<<31,m^=h=1431655765&((g=g>>>1|g<<31)>>>1^m),m^=(h=16711935&(m>>>8^(g^=h<<1)))<<8,m^=(h=858993459&(m>>>2^(g^=h)))<<2,m^=h=65535&((g^=h)>>>16^m),m^=h=252645135&((g^=h<<16)>>>4^m),g^=h<<4,r[0]=g,r[1]=m}function f(e){var t,r="DES-"+((e=e||{}).mode||"CBC").toUpperCase(),i=(t=e.decrypt?n.cipher.createDecipher(r,e.key):n.cipher.createCipher(r,e.key)).start;return t.start=function(e,r){var o=null;r instanceof n.util.ByteBuffer&&(o=r,r={}),(r=r||{}).output=o,r.iv=e,i.call(t,r)},t}},48757:(e,t,r)=>{var n=r(56105);r(10017),r(46572),r(593),r(56827);var i=r(89796),o=i.publicKeyValidator,s=i.privateKeyValidator;if(void 0===a)var a=n.jsbn.BigInteger;var c=n.util.ByteBuffer,l="undefined"==typeof Buffer?Uint8Array:Buffer;n.pki=n.pki||{},e.exports=n.pki.ed25519=n.ed25519=n.ed25519||{};var u=n.ed25519;function d(e){var t=e.message;if(t instanceof Uint8Array||t instanceof l)return t;var r=e.encoding;if(void 0===t){if(!e.md)throw new TypeError('"options.message" or "options.md" not specified.');t=e.md.digest().getBytes(),r="binary"}if("string"==typeof t&&!r)throw new TypeError('"options.encoding" must be "binary" or "utf8".');if("string"==typeof t){if("undefined"!=typeof Buffer)return Buffer.from(t,r);t=new c(t,r)}else if(!(t instanceof c))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 l(t.length()),i=0;i=0;--r)F(n,n),1!==r&&j(n,n,t);for(r=0;r<16;++r)e[r]=n[r]}(r,r),j(r,r,i),j(r,r,o),j(r,r,o),j(e[0],r,o),F(n,e[0]),j(n,n,o),k(n,i)&&j(e[0],e[0],_),F(n,e[0]),j(n,n,o),k(n,i)?-1:(A(e[0])===t[31]>>7&&B(e[0],p,e[0]),j(e[3],e[0],e[1]),0)}(a,n))return-1;for(i=0;i=0};var p=L(),h=L([1]),f=L([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),g=L([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),m=L([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),y=L([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),v=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]),_=L([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function b(e,t){var r=n.md.sha512.create(),i=new c(e);r.update(i.getBytes(t),"binary");var o=r.digest().getBytes();if("undefined"!=typeof Buffer)return Buffer.from(o,"binary");for(var s=new l(u.constants.HASH_BYTE_LENGTH),a=0;a<64;++a)s[a]=o.charCodeAt(a);return s}function w(e,t){var r,n,i,o;for(n=63;n>=32;--n){for(r=0,i=n-32,o=n-12;i>8,t[i]-=256*r;t[i]+=r,t[n]=0}for(r=0,i=0;i<32;++i)t[i]+=r-(t[31]>>4)*v[i],r=t[i]>>8,t[i]&=255;for(i=0;i<32;++i)t[i]-=r*v[i];for(n=0;n<32;++n)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function C(e){for(var t=new Float64Array(64),r=0;r<64;++r)t[r]=e[r],e[r]=0;w(e,t)}function E(e,t){var r=L(),n=L(),i=L(),o=L(),s=L(),a=L(),c=L(),l=L(),u=L();B(r,e[1],e[0]),B(u,t[1],t[0]),j(r,r,u),M(n,e[0],e[1]),M(u,t[0],t[1]),j(n,n,u),j(i,e[3],t[3]),j(i,i,g),j(o,e[2],t[2]),M(o,o,o),B(s,n,r),B(a,o,i),M(c,o,i),M(l,n,r),j(e[0],s,a),j(e[1],l,c),j(e[2],c,a),j(e[3],s,l)}function T(e,t,r){for(var n=0;n<4;++n)D(e[n],t[n],r)}function S(e,t){var r=L(),n=L(),i=L();!function(e,t){var r,n=L();for(r=0;r<16;++r)n[r]=t[r];for(r=253;r>=0;--r)F(n,n),2!==r&&4!==r&&j(n,n,t);for(r=0;r<16;++r)e[r]=n[r]}(i,t[2]),j(r,t[0],i),j(n,t[1],i),x(e,n),e[31]^=A(r)<<7}function x(e,t){var r,n,i,o=L(),s=L();for(r=0;r<16;++r)s[r]=t[r];for(O(s),O(s),O(s),n=0;n<2;++n){for(o[0]=s[0]-65517,r=1;r<15;++r)o[r]=s[r]-65535-(o[r-1]>>16&1),o[r-1]&=65535;o[15]=s[15]-32767-(o[14]>>16&1),i=o[15]>>16&1,o[14]&=65535,D(s,o,1-i)}for(r=0;r<16;r++)e[2*r]=255&s[r],e[2*r+1]=s[r]>>8}function k(e,t){var r=new l(32),n=new l(32);return x(r,e),x(n,t),I(r,0,n,0)}function I(e,t,r,n){return function(e,t,r,n,i){var o,s=0;for(o=0;o<32;++o)s|=e[t+o]^r[n+o];return(1&s-1>>>8)-1}(e,t,r,n)}function A(e){var t=new l(32);return x(t,e),1&t[0]}function P(e,t,r){var n,i;for(N(e[0],p),N(e[1],h),N(e[2],h),N(e[3],p),i=255;i>=0;--i)T(e,t,n=r[i/8|0]>>(7&i)&1),E(t,e),E(e,e),T(e,t,n)}function R(e,t){var r=[L(),L(),L(),L()];N(r[0],m),N(r[1],y),N(r[2],h),j(r[3],m,y),P(e,r,t)}function N(e,t){var r;for(r=0;r<16;r++)e[r]=0|t[r]}function O(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-65536*n;e[0]+=n-1+37*(n-1)}function D(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}function L(e){var t,r=new Float64Array(16);if(e)for(t=0;t{e.exports={options:{usePureJavaScript:!1}}},5945:(e,t,r)=>{var n=r(56105);r(91183),r(56827),(e.exports=n.hmac=n.hmac||{}).create=function(){var e=null,t=null,r=null,i=null,o={start:function(o,s){if(null!==o)if("string"==typeof o){if(!((o=o.toLowerCase())in n.md.algorithms))throw new Error('Unknown hash algorithm "'+o+'"');t=n.md.algorithms[o].create()}else t=o;if(null===s)s=e;else{if("string"==typeof s)s=n.util.createBuffer(s);else if(n.util.isArray(s)){var a=s;s=n.util.createBuffer();for(var c=0;ct.blockLength&&(t.start(),t.update(s.bytes()),s=t.digest()),r=n.util.createBuffer(),i=n.util.createBuffer(),l=s.length(),c=0;c{e.exports=r(56105),r(60070),r(63063),r(61057),r(27140),r(62148),r(48757),r(5945),r(29908),r(84401),r(63585),r(91003),r(72299),r(25661),r(30585),r(88577),r(45067),r(23245),r(77466),r(26759),r(51242),r(46572),r(50514),r(21431),r(78653),r(56827)},10017:(e,t,r)=>{var n,i=r(56105);function o(e,t,r){this.data=[],null!=e&&("number"==typeof e?this.fromNumber(e,t,r):null==t&&"string"!=typeof e?this.fromString(e,256):this.fromString(e,t))}function s(){return new o(null)}function a(e,t,r,n,i,o){for(var s=16383&t,a=t>>14;--o>=0;){var c=16383&this.data[e],l=this.data[e++]>>14,u=a*c+l*s;i=((c=s*c+((16383&u)<<14)+r.data[n]+i)>>28)+(u>>14)+a*l,r.data[n++]=268435455&c}return i}e.exports=i.jsbn=i.jsbn||{},i.jsbn.BigInteger=o,"undefined"==typeof navigator?(o.prototype.am=a,n=28):"Microsoft Internet Explorer"==navigator.appName?(o.prototype.am=function(e,t,r,n,i,o){for(var s=32767&t,a=t>>15;--o>=0;){var c=32767&this.data[e],l=this.data[e++]>>15,u=a*c+l*s;i=((c=s*c+((32767&u)<<15)+r.data[n]+(1073741823&i))>>>30)+(u>>>15)+a*l+(i>>>30),r.data[n++]=1073741823&c}return i},n=30):"Netscape"!=navigator.appName?(o.prototype.am=function(e,t,r,n,i,o){for(;--o>=0;){var s=t*this.data[e++]+r.data[n]+i;i=Math.floor(s/67108864),r.data[n++]=67108863&s}return i},n=26):(o.prototype.am=a,n=28),o.prototype.DB=n,o.prototype.DM=(1<>>16)&&(e=t,r+=16),0!=(t=e>>8)&&(e=t,r+=8),0!=(t=e>>4)&&(e=t,r+=4),0!=(t=e>>2)&&(e=t,r+=2),0!=(t=e>>1)&&(e=t,r+=1),r}function g(e){this.m=e}function m(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<>=16,t+=16),0==(255&e)&&(e>>=8,t+=8),0==(15&e)&&(e>>=4,t+=4),0==(3&e)&&(e>>=2,t+=2),0==(1&e)&&++t,t}function C(e){for(var t=0;0!=e;)e&=e-1,++t;return t}function E(){}function T(e){return e}function S(e){this.r2=s(),this.q3=s(),o.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}g.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},g.prototype.revert=function(e){return e},g.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},g.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},g.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},m.prototype.convert=function(e){var t=s();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(o.ZERO)>0&&this.m.subTo(t,t),t},m.prototype.revert=function(e){var t=s();return e.copyTo(t),this.reduce(t),t},m.prototype.reduce=function(e){for(;e.t<=this.mt2;)e.data[e.t++]=0;for(var t=0;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)},m.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},m.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},o.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e.data[t]=this.data[t];e.t=this.t,e.s=this.s},o.prototype.fromInt=function(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},o.prototype.fromString=function(e,t){var r;if(16==t)r=4;else if(8==t)r=3;else if(256==t)r=8;else if(2==t)r=1;else if(32==t)r=5;else{if(4!=t)return void this.fromRadix(e,t);r=2}this.t=0,this.s=0;for(var n=e.length,i=!1,s=0;--n>=0;){var a=8==r?255&e[n]:p(e,n);a<0?"-"==e.charAt(n)&&(i=!0):(i=!1,0==s?this.data[this.t++]=a:s+r>this.DB?(this.data[this.t-1]|=(a&(1<>this.DB-s):this.data[this.t-1]|=a<=this.DB&&(s-=this.DB))}8==r&&0!=(128&e[0])&&(this.s=-1,s>0&&(this.data[this.t-1]|=(1<0&&this.data[this.t-1]==e;)--this.t},o.prototype.dlShiftTo=function(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},o.prototype.drShiftTo=function(e,t){for(var r=e;r=0;--r)t.data[r+s+1]=this.data[r]>>i|a,a=(this.data[r]&o)<=0;--r)t.data[r]=0;t.data[s]=a,t.t=this.t+s+1,t.s=this.s,t.clamp()},o.prototype.rShiftTo=function(e,t){t.s=this.s;var r=Math.floor(e/this.DB);if(r>=this.t)t.t=0;else{var n=e%this.DB,i=this.DB-n,o=(1<>n;for(var s=r+1;s>n;n>0&&(t.data[this.t-r-1]|=(this.s&o)<>=this.DB;if(e.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=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()},o.prototype.multiplyTo=function(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=0;)e.data[r]=0;for(r=0;r=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()},o.prototype.divRemTo=function(e,t,r){var n=e.abs();if(!(n.t<=0)){var i=this.abs();if(i.t0?(n.lShiftTo(u,a),i.lShiftTo(u,r)):(n.copyTo(a),i.copyTo(r));var d=a.t,p=a.data[d-1];if(0!=p){var h=p*(1<1?a.data[d-2]>>this.F2:0),g=this.FV/h,m=(1<=0&&(r.data[r.t++]=1,r.subTo(b,r)),o.ONE.dlShiftTo(d,b),b.subTo(a,a);a.t=0;){var w=r.data[--v]==p?this.DM:Math.floor(r.data[v]*g+(r.data[v-1]+y)*m);if((r.data[v]+=a.am(0,w,r,_,0,d))0&&r.rShiftTo(u,r),c<0&&o.ZERO.subTo(r,r)}}},o.prototype.invDigit=function(){if(this.t<1)return 0;var e=this.data[0];if(0==(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},o.prototype.isEven=function(){return 0==(this.t>0?1&this.data[0]:this.s)},o.prototype.exp=function(e,t){if(e>4294967295||e<1)return o.ONE;var r=s(),n=s(),i=t.convert(this),a=f(e)-1;for(i.copyTo(r);--a>=0;)if(t.sqrTo(r,n),(e&1<0)t.mulTo(n,i,r);else{var c=r;r=n,n=c}return t.revert(r)},o.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var r,n=(1<0)for(a>a)>0&&(i=!0,o=d(r));s>=0;)a>(a+=this.DB-t)):(r=this.data[s]>>(a-=t)&n,a<=0&&(a+=this.DB,--s)),r>0&&(i=!0),i&&(o+=d(r));return i?o:"0"},o.prototype.negate=function(){var e=s();return o.ZERO.subTo(this,e),e},o.prototype.abs=function(){return this.s<0?this.negate():this},o.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var r=this.t;if(0!=(t=r-e.t))return this.s<0?-t:t;for(;--r>=0;)if(0!=(t=this.data[r]-e.data[r]))return t;return 0},o.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+f(this.data[this.t-1]^this.s&this.DM)},o.prototype.mod=function(e){var t=s();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(o.ZERO)>0&&e.subTo(t,t),t},o.prototype.modPowInt=function(e,t){var r;return r=e<256||t.isEven()?new g(t):new m(t),this.exp(e,r)},o.ZERO=h(0),o.ONE=h(1),E.prototype.convert=T,E.prototype.revert=T,E.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r)},E.prototype.sqrTo=function(e,t){e.squareTo(t)},S.prototype.convert=function(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=s();return e.copyTo(t),this.reduce(t),t},S.prototype.revert=function(e){return e},S.prototype.reduce=function(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.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},S.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)};var x=[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],k=(1<<26)/x[x.length-1];o.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},o.prototype.toRadix=function(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0";var t=this.chunkSize(e),r=Math.pow(e,t),n=h(r),i=s(),o=s(),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},o.prototype.fromRadix=function(e,t){this.fromInt(0),null==t&&(t=10);for(var r=this.chunkSize(t),n=Math.pow(t,r),i=!1,s=0,a=0,c=0;c=r&&(this.dMultiply(n),this.dAddOffset(a,0),s=0,a=0))}s>0&&(this.dMultiply(Math.pow(t,s)),this.dAddOffset(a,0)),i&&o.ZERO.subTo(this,this)},o.prototype.fromNumber=function(e,t,r){if("number"==typeof t)if(e<2)this.fromInt(1);else for(this.fromNumber(e,r),this.testBit(e-1)||this.bitwiseTo(o.ONE.shiftLeft(e-1),v,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(o.ONE.shiftLeft(e-1),this);else{var n=new Array,i=7&e;n.length=1+(e>>3),t.nextBytes(n),i>0?n[0]&=(1<>=this.DB;if(e.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=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()},o.prototype.dMultiply=function(e){this.data[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},o.prototype.dAddOffset=function(e,t){if(0!=e){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]}},o.prototype.multiplyLowerTo=function(e,t,r){var n,i=Math.min(this.t+e.t,t);for(r.s=0,r.t=i;i>0;)r.data[--i]=0;for(n=r.t-this.t;i=0;)r.data[n]=0;for(n=Math.max(t-this.t,0);n0)if(0==t)r=this.data[0]%e;else for(var n=this.t-1;n>=0;--n)r=(t*r+this.data[n])%e;return r},o.prototype.millerRabin=function(e){var t=this.subtract(o.ONE),r=t.getLowestSetBit();if(r<=0)return!1;for(var n,i=t.shiftRight(r),s={nextBytes:function(e){for(var t=0;t=0);var c=n.modPow(i,this);if(0!=c.compareTo(o.ONE)&&0!=c.compareTo(t)){for(var l=1;l++>24},o.prototype.shortValue=function(){return 0==this.t?this.s:this.data[0]<<16>>16},o.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this.data[0]<=0?0:1},o.prototype.toByteArray=function(){var e=this.t,t=new Array;t[0]=this.s;var r,n=this.DB-e*this.DB%8,i=0;if(e-- >0)for(n>n)!=(this.s&this.DM)>>n&&(t[i++]=r|this.s<=0;)n<8?(r=(this.data[e]&(1<>(n+=this.DB-8)):(r=this.data[e]>>(n-=8)&255,n<=0&&(n+=this.DB,--e)),0!=(128&r)&&(r|=-256),0==i&&(128&this.s)!=(128&r)&&++i,(i>0||r!=this.s)&&(t[i++]=r);return t},o.prototype.equals=function(e){return 0==this.compareTo(e)},o.prototype.min=function(e){return this.compareTo(e)<0?this:e},o.prototype.max=function(e){return this.compareTo(e)>0?this:e},o.prototype.and=function(e){var t=s();return this.bitwiseTo(e,y,t),t},o.prototype.or=function(e){var t=s();return this.bitwiseTo(e,v,t),t},o.prototype.xor=function(e){var t=s();return this.bitwiseTo(e,_,t),t},o.prototype.andNot=function(e){var t=s();return this.bitwiseTo(e,b,t),t},o.prototype.not=function(){for(var e=s(),t=0;t=this.t?0!=this.s:0!=(this.data[t]&1<1){var d=s();for(n.sqrTo(a[1],d);c<=u;)a[c]=s(),n.mulTo(d,a[c-2],a[c]),c+=2}var p,y,v=e.t-1,_=!0,b=s();for(i=f(e.data[v])-1;v>=0;){for(i>=l?p=e.data[v]>>i-l&u:(p=(e.data[v]&(1<0&&(p|=e.data[v-1]>>this.DB+i-l)),c=r;0==(1&p);)p>>=1,--c;if((i-=c)<0&&(i+=this.DB,--v),_)a[p].copyTo(o),_=!1;else{for(;c>1;)n.sqrTo(o,b),n.sqrTo(b,o),c-=2;c>0?n.sqrTo(o,b):(y=o,o=b,b=y),n.mulTo(b,a[p],o)}for(;v>=0&&0==(e.data[v]&1<=0?(r.subTo(n,r),t&&i.subTo(a,i),s.subTo(c,s)):(n.subTo(r,n),t&&a.subTo(i,a),c.subTo(s,c))}return 0!=n.compareTo(o.ONE)?o.ZERO:c.compareTo(e)>=0?c.subtract(e):c.signum()<0?(c.addTo(e,c),c.signum()<0?c.add(e):c):c},o.prototype.pow=function(e){return this.exp(e,new E)},o.prototype.gcd=function(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(i0&&(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},o.prototype.isProbablePrime=function(e){var t,r=this.abs();if(1==r.t&&r.data[0]<=x[x.length-1]){for(t=0;t{var n=r(56105);r(56827),r(46572),r(10017),e.exports=n.kem=n.kem||{};var i=n.jsbn.BigInteger;function o(e,t,r,i){e.generate=function(e,o){for(var s=new n.util.ByteBuffer,a=Math.ceil(o/i)+r,c=new n.util.ByteBuffer,l=r;l0&&(s=n.util.fillString(String.fromCharCode(0),c)+s),{encapsulation:t.encrypt(s,"NONE"),key:e.generate(s,o)}},decrypt:function(t,r,n){var i=t.decrypt(r,"NONE");return e.generate(i,n)}}},n.kem.kdf1=function(e,t){o(this,e,0,t||e.digestLength)},n.kem.kdf2=function(e,t){o(this,e,1,t||e.digestLength)}},84401:(e,t,r)=>{var n=r(56105);r(56827),e.exports=n.log=n.log||{},n.log.levels=["none","error","warning","info","debug","verbose","max"];var i={},o=[],s=null;n.log.LEVEL_LOCKED=2,n.log.NO_LEVEL_CHECK=4,n.log.INTERPOLATE=8;for(var a=0;a{e.exports=r(91183),r(54326),r(98967),r(12262),r(593)},91183:(e,t,r)=>{var n=r(56105);e.exports=n.md=n.md||{},n.md.algorithms=n.md.algorithms||{}},54326:(e,t,r)=>{var n=r(56105);r(91183),r(56827);var i=e.exports=n.md5=n.md5||{};n.md.md5=n.md.algorithms.md5=i,i.create=function(){l||function(){o=String.fromCharCode(128),o+=n.util.fillString(String.fromCharCode(0),64),s=[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],a=[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],c=new Array(64);for(var e=0;e<64;++e)c[e]=Math.floor(4294967296*Math.abs(Math.sin(e+1)));l=!0}();var e=null,t=n.util.createBuffer(),r=new Array(16),i={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){i.messageLength=0,i.fullMessageLength=i.messageLength64=[];for(var r=i.messageLengthSize/4,o=0;o>>0,a>>>0];for(var c=i.fullMessageLength.length-1;c>=0;--c)i.fullMessageLength[c]+=a[1],a[1]=a[0]+(i.fullMessageLength[c]/4294967296>>>0),i.fullMessageLength[c]=i.fullMessageLength[c]>>>0,a[0]=a[1]/4294967296>>>0;return t.putBytes(o),u(e,r,t),(t.read>2048||0===t.length())&&t.compact(),i},i.digest=function(){var s=n.util.createBuffer();s.putBytes(t.bytes());var a=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1;s.putBytes(o.substr(0,i.blockLength-a));for(var c,l=0,d=i.fullMessageLength.length-1;d>=0;--d)l=(c=8*i.fullMessageLength[d]+l)/4294967296>>>0,s.putInt32Le(c>>>0);var p={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3};u(p,r,s);var h=n.util.createBuffer();return h.putInt32Le(p.h0),h.putInt32Le(p.h1),h.putInt32Le(p.h2),h.putInt32Le(p.h3),h},i};var o=null,s=null,a=null,c=null,l=!1;function u(e,t,r){for(var n,i,o,l,u,d,p,h=r.length();h>=64;){for(i=e.h0,o=e.h1,l=e.h2,u=e.h3,p=0;p<16;++p)t[p]=r.getInt32Le(),n=i+(u^o&(l^u))+c[p]+t[p],i=u,u=l,l=o,o+=n<<(d=a[p])|n>>>32-d;for(;p<32;++p)n=i+(l^u&(o^l))+c[p]+t[s[p]],i=u,u=l,l=o,o+=n<<(d=a[p])|n>>>32-d;for(;p<48;++p)n=i+(o^l^u)+c[p]+t[s[p]],i=u,u=l,l=o,o+=n<<(d=a[p])|n>>>32-d;for(;p<64;++p)n=i+(l^(o|~u))+c[p]+t[s[p]],i=u,u=l,l=o,o+=n<<(d=a[p])|n>>>32-d;e.h0=e.h0+i|0,e.h1=e.h1+o|0,e.h2=e.h2+l|0,e.h3=e.h3+u|0,h-=64}}},9370:(e,t,r)=>{var n=r(56105);r(91003),e.exports=n.mgf=n.mgf||{},n.mgf.mgf1=n.mgf1},91003:(e,t,r)=>{var n=r(56105);r(56827),n.mgf=n.mgf||{},(e.exports=n.mgf.mgf1=n.mgf1=n.mgf1||{}).create=function(e){return{generate:function(t,r){for(var i=new n.util.ByteBuffer,o=Math.ceil(r/e.digestLength),s=0;s{var n=r(56105);n.pki=n.pki||{};var i=e.exports=n.pki.oids=n.oids=n.oids||{};function o(e,t){i[e]=t,i[t]=e}function s(e,t){i[e]=t}o("1.2.840.113549.1.1.1","rsaEncryption"),o("1.2.840.113549.1.1.4","md5WithRSAEncryption"),o("1.2.840.113549.1.1.5","sha1WithRSAEncryption"),o("1.2.840.113549.1.1.7","RSAES-OAEP"),o("1.2.840.113549.1.1.8","mgf1"),o("1.2.840.113549.1.1.9","pSpecified"),o("1.2.840.113549.1.1.10","RSASSA-PSS"),o("1.2.840.113549.1.1.11","sha256WithRSAEncryption"),o("1.2.840.113549.1.1.12","sha384WithRSAEncryption"),o("1.2.840.113549.1.1.13","sha512WithRSAEncryption"),o("1.3.101.112","EdDSA25519"),o("1.2.840.10040.4.3","dsa-with-sha1"),o("1.3.14.3.2.7","desCBC"),o("1.3.14.3.2.26","sha1"),o("1.3.14.3.2.29","sha1WithRSASignature"),o("2.16.840.1.101.3.4.2.1","sha256"),o("2.16.840.1.101.3.4.2.2","sha384"),o("2.16.840.1.101.3.4.2.3","sha512"),o("2.16.840.1.101.3.4.2.4","sha224"),o("2.16.840.1.101.3.4.2.5","sha512-224"),o("2.16.840.1.101.3.4.2.6","sha512-256"),o("1.2.840.113549.2.2","md2"),o("1.2.840.113549.2.5","md5"),o("1.2.840.113549.1.7.1","data"),o("1.2.840.113549.1.7.2","signedData"),o("1.2.840.113549.1.7.3","envelopedData"),o("1.2.840.113549.1.7.4","signedAndEnvelopedData"),o("1.2.840.113549.1.7.5","digestedData"),o("1.2.840.113549.1.7.6","encryptedData"),o("1.2.840.113549.1.9.1","emailAddress"),o("1.2.840.113549.1.9.2","unstructuredName"),o("1.2.840.113549.1.9.3","contentType"),o("1.2.840.113549.1.9.4","messageDigest"),o("1.2.840.113549.1.9.5","signingTime"),o("1.2.840.113549.1.9.6","counterSignature"),o("1.2.840.113549.1.9.7","challengePassword"),o("1.2.840.113549.1.9.8","unstructuredAddress"),o("1.2.840.113549.1.9.14","extensionRequest"),o("1.2.840.113549.1.9.20","friendlyName"),o("1.2.840.113549.1.9.21","localKeyId"),o("1.2.840.113549.1.9.22.1","x509Certificate"),o("1.2.840.113549.1.12.10.1.1","keyBag"),o("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag"),o("1.2.840.113549.1.12.10.1.3","certBag"),o("1.2.840.113549.1.12.10.1.4","crlBag"),o("1.2.840.113549.1.12.10.1.5","secretBag"),o("1.2.840.113549.1.12.10.1.6","safeContentsBag"),o("1.2.840.113549.1.5.13","pkcs5PBES2"),o("1.2.840.113549.1.5.12","pkcs5PBKDF2"),o("1.2.840.113549.1.12.1.1","pbeWithSHAAnd128BitRC4"),o("1.2.840.113549.1.12.1.2","pbeWithSHAAnd40BitRC4"),o("1.2.840.113549.1.12.1.3","pbeWithSHAAnd3-KeyTripleDES-CBC"),o("1.2.840.113549.1.12.1.4","pbeWithSHAAnd2-KeyTripleDES-CBC"),o("1.2.840.113549.1.12.1.5","pbeWithSHAAnd128BitRC2-CBC"),o("1.2.840.113549.1.12.1.6","pbewithSHAAnd40BitRC2-CBC"),o("1.2.840.113549.2.7","hmacWithSHA1"),o("1.2.840.113549.2.8","hmacWithSHA224"),o("1.2.840.113549.2.9","hmacWithSHA256"),o("1.2.840.113549.2.10","hmacWithSHA384"),o("1.2.840.113549.2.11","hmacWithSHA512"),o("1.2.840.113549.3.7","des-EDE3-CBC"),o("2.16.840.1.101.3.4.1.2","aes128-CBC"),o("2.16.840.1.101.3.4.1.22","aes192-CBC"),o("2.16.840.1.101.3.4.1.42","aes256-CBC"),o("2.5.4.3","commonName"),o("2.5.4.4","surname"),o("2.5.4.5","serialNumber"),o("2.5.4.6","countryName"),o("2.5.4.7","localityName"),o("2.5.4.8","stateOrProvinceName"),o("2.5.4.9","streetAddress"),o("2.5.4.10","organizationName"),o("2.5.4.11","organizationalUnitName"),o("2.5.4.12","title"),o("2.5.4.13","description"),o("2.5.4.15","businessCategory"),o("2.5.4.17","postalCode"),o("2.5.4.42","givenName"),o("1.3.6.1.4.1.311.60.2.1.2","jurisdictionOfIncorporationStateOrProvinceName"),o("1.3.6.1.4.1.311.60.2.1.3","jurisdictionOfIncorporationCountryName"),o("2.16.840.1.113730.1.1","nsCertType"),o("2.16.840.1.113730.1.13","nsComment"),s("2.5.29.1","authorityKeyIdentifier"),s("2.5.29.2","keyAttributes"),s("2.5.29.3","certificatePolicies"),s("2.5.29.4","keyUsageRestriction"),s("2.5.29.5","policyMapping"),s("2.5.29.6","subtreesConstraint"),s("2.5.29.7","subjectAltName"),s("2.5.29.8","issuerAltName"),s("2.5.29.9","subjectDirectoryAttributes"),s("2.5.29.10","basicConstraints"),s("2.5.29.11","nameConstraints"),s("2.5.29.12","policyConstraints"),s("2.5.29.13","basicConstraints"),o("2.5.29.14","subjectKeyIdentifier"),o("2.5.29.15","keyUsage"),s("2.5.29.16","privateKeyUsagePeriod"),o("2.5.29.17","subjectAltName"),o("2.5.29.18","issuerAltName"),o("2.5.29.19","basicConstraints"),s("2.5.29.20","cRLNumber"),s("2.5.29.21","cRLReason"),s("2.5.29.22","expirationDate"),s("2.5.29.23","instructionCode"),s("2.5.29.24","invalidityDate"),s("2.5.29.25","cRLDistributionPoints"),s("2.5.29.26","issuingDistributionPoint"),s("2.5.29.27","deltaCRLIndicator"),s("2.5.29.28","issuingDistributionPoint"),s("2.5.29.29","certificateIssuer"),s("2.5.29.30","nameConstraints"),o("2.5.29.31","cRLDistributionPoints"),o("2.5.29.32","certificatePolicies"),s("2.5.29.33","policyMappings"),s("2.5.29.34","policyConstraints"),o("2.5.29.35","authorityKeyIdentifier"),s("2.5.29.36","policyConstraints"),o("2.5.29.37","extKeyUsage"),s("2.5.29.46","freshestCRL"),s("2.5.29.54","inhibitAnyPolicy"),o("1.3.6.1.4.1.11129.2.4.2","timestampList"),o("1.3.6.1.5.5.7.1.1","authorityInfoAccess"),o("1.3.6.1.5.5.7.3.1","serverAuth"),o("1.3.6.1.5.5.7.3.2","clientAuth"),o("1.3.6.1.5.5.7.3.3","codeSigning"),o("1.3.6.1.5.5.7.3.4","emailProtection"),o("1.3.6.1.5.5.7.3.8","timeStamping")},4173:(e,t,r)=>{var n=r(56105);if(r(60070),r(61057),r(62148),r(91183),r(81877),r(72299),r(25661),r(46572),r(50514),r(69597),r(56827),void 0===i)var i=n.jsbn.BigInteger;var o=n.asn1,s=n.pki=n.pki||{};e.exports=s.pbe=n.pbe=n.pbe||{};var a=s.oids,c={name:"EncryptedPrivateKeyInfo",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"encryptionOid"},{name:"AlgorithmIdentifier.parameters",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:o.Class.UNIVERSAL,type:o.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},l={name:"PBES2Algorithms",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:o.Class.UNIVERSAL,type:o.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"kdfIterationCount"},{name:"PBES2Algorithms.params.keyLength",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,optional:!0,capture:"keyLength"},{name:"PBES2Algorithms.params.prf",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,optional:!0,value:[{name:"PBES2Algorithms.params.prf.algorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"prfOid"}]}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:o.Class.UNIVERSAL,type:o.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},u={name:"pkcs-12PbeParams",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:o.Class.UNIVERSAL,type:o.Type.OCTETSTRING,constructed:!1,capture:"salt"},{name:"pkcs-12PbeParams.iterations",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"iterations"}]};function d(e,t){return e.start().update(t).digest().getBytes()}function p(e){var t;if(e){if(!(t=s.oids[o.derToOid(e)])){var r=new Error("Unsupported PRF OID.");throw r.oid=e,r.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],r}}else t="hmacWithSHA1";return h(t)}function h(e){var t=n.md;switch(e){case"hmacWithSHA224":t=n.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.encryptPrivateKeyInfo=function(e,t,r){(r=r||{}).saltSize=r.saltSize||8,r.count=r.count||2048,r.algorithm=r.algorithm||"aes128",r.prfAlgorithm=r.prfAlgorithm||"sha1";var i,c,l,u=n.random.getBytesSync(r.saltSize),d=r.count,p=o.integerToDer(d);if(0===r.algorithm.indexOf("aes")||"des"===r.algorithm){var f,g,m;switch(r.algorithm){case"aes128":i=16,f=16,g=a["aes128-CBC"],m=n.aes.createEncryptionCipher;break;case"aes192":i=24,f=16,g=a["aes192-CBC"],m=n.aes.createEncryptionCipher;break;case"aes256":i=32,f=16,g=a["aes256-CBC"],m=n.aes.createEncryptionCipher;break;case"des":i=8,f=8,g=a.desCBC,m=n.des.createEncryptionCipher;break;default:throw(C=new Error("Cannot encrypt private key. Unknown encryption algorithm.")).algorithm=r.algorithm,C}var y="hmacWith"+r.prfAlgorithm.toUpperCase(),v=h(y),_=n.pkcs5.pbkdf2(t,u,d,i,v),b=n.random.getBytesSync(f);(E=m(_)).start(b),E.update(o.toDer(e)),E.finish(),l=E.output.getBytes();var w=function(e,t,r,i){var a=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,e),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,t.getBytes())]);return"hmacWithSHA1"!==i&&a.value.push(o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,n.util.hexToBytes(r.toString(16))),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(s.oids[i]).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.NULL,!1,"")])),a}(u,p,i,y);c=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(a.pkcs5PBES2).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(a.pkcs5PBKDF2).getBytes()),w]),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(g).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,b)])])])}else{var C;if("3des"!==r.algorithm)throw(C=new Error("Cannot encrypt private key. Unknown encryption algorithm.")).algorithm=r.algorithm,C;i=24;var E,T=new n.util.ByteBuffer(u);_=s.pbe.generatePkcs12Key(t,T,1,d,i),b=s.pbe.generatePkcs12Key(t,T,2,d,i),(E=n.des.createEncryptionCipher(_)).start(b),E.update(o.toDer(e)),E.finish(),l=E.output.getBytes(),c=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(a["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,u),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,p.getBytes())])])}return o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[c,o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,l)])},s.decryptPrivateKeyInfo=function(e,t){var r=null,i={},a=[];if(!o.validate(e,c,i,a)){var l=new Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw l.errors=a,l}var u=o.derToOid(i.encryptionOid),d=s.pbe.getCipher(u,i.encryptionParams,t),p=n.util.createBuffer(i.encryptedData);return d.update(p),d.finish()&&(r=o.fromDer(d.output)),r},s.encryptedPrivateKeyToPem=function(e,t){var r={type:"ENCRYPTED PRIVATE KEY",body:o.toDer(e).getBytes()};return n.pem.encode(r,{maxline:t})},s.encryptedPrivateKeyFromPem=function(e){var t=n.pem.decode(e)[0];if("ENCRYPTED PRIVATE KEY"!==t.type){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&&"ENCRYPTED"===t.procType.type)throw new Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return o.fromDer(t.body)},s.encryptRsaPrivateKey=function(e,t,r){if(!(r=r||{}).legacy){var i=s.wrapRsaPrivateKey(s.privateKeyToAsn1(e));return i=s.encryptPrivateKeyInfo(i,t,r),s.encryptedPrivateKeyToPem(i)}var a,c,l,u;switch(r.algorithm){case"aes128":a="AES-128-CBC",l=16,c=n.random.getBytesSync(16),u=n.aes.createEncryptionCipher;break;case"aes192":a="AES-192-CBC",l=24,c=n.random.getBytesSync(16),u=n.aes.createEncryptionCipher;break;case"aes256":a="AES-256-CBC",l=32,c=n.random.getBytesSync(16),u=n.aes.createEncryptionCipher;break;case"3des":a="DES-EDE3-CBC",l=24,c=n.random.getBytesSync(8),u=n.des.createEncryptionCipher;break;case"des":a="DES-CBC",l=8,c=n.random.getBytesSync(8),u=n.des.createEncryptionCipher;break;default:var d=new Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+r.algorithm+'".');throw d.algorithm=r.algorithm,d}var p=u(n.pbe.opensslDeriveBytes(t,c.substr(0,8),l));p.start(c),p.update(o.toDer(s.privateKeyToAsn1(e))),p.finish();var h={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:a,parameters:n.util.bytesToHex(c).toUpperCase()},body:p.output.getBytes()};return n.pem.encode(h)},s.decryptRsaPrivateKey=function(e,t){var r=null,i=n.pem.decode(e)[0];if("ENCRYPTED PRIVATE KEY"!==i.type&&"PRIVATE KEY"!==i.type&&"RSA PRIVATE KEY"!==i.type)throw(l=new Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".')).headerType=l,l;if(i.procType&&"ENCRYPTED"===i.procType.type){var a,c;switch(i.dekInfo.algorithm){case"DES-CBC":a=8,c=n.des.createDecryptionCipher;break;case"DES-EDE3-CBC":a=24,c=n.des.createDecryptionCipher;break;case"AES-128-CBC":a=16,c=n.aes.createDecryptionCipher;break;case"AES-192-CBC":a=24,c=n.aes.createDecryptionCipher;break;case"AES-256-CBC":a=32,c=n.aes.createDecryptionCipher;break;case"RC2-40-CBC":a=5,c=function(e){return n.rc2.createDecryptionCipher(e,40)};break;case"RC2-64-CBC":a=8,c=function(e){return n.rc2.createDecryptionCipher(e,64)};break;case"RC2-128-CBC":a=16,c=function(e){return n.rc2.createDecryptionCipher(e,128)};break;default:var l;throw(l=new Error('Could not decrypt private key; unsupported encryption algorithm "'+i.dekInfo.algorithm+'".')).algorithm=i.dekInfo.algorithm,l}var u=n.util.hexToBytes(i.dekInfo.parameters),d=c(n.pbe.opensslDeriveBytes(t,u.substr(0,8),a));if(d.start(u),d.update(n.util.createBuffer(i.body)),!d.finish())return r;r=d.output.getBytes()}else r=i.body;return null!==(r="ENCRYPTED PRIVATE KEY"===i.type?s.decryptPrivateKeyInfo(o.fromDer(r),t):o.fromDer(r))&&(r=s.privateKeyFromAsn1(r)),r},s.pbe.generatePkcs12Key=function(e,t,r,i,o,s){var a,c;if(null==s){if(!("sha1"in n.md))throw new Error('"sha1" hash algorithm unavailable.');s=n.md.sha1.create()}var l=s.digestLength,u=s.blockLength,d=new n.util.ByteBuffer,p=new n.util.ByteBuffer;if(null!=e){for(c=0;c=0;c--)A>>=8,A+=S.at(c)+I.at(c),I.setAt(c,255&A);k.putBuffer(I)}b=k,d.putBuffer(E)}return d.truncate(d.length()-o),d},s.pbe.getCipher=function(e,t,r){switch(e){case s.oids.pkcs5PBES2:return s.pbe.getCipherForPBES2(e,t,r);case s.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case s.oids["pbewithSHAAnd40BitRC2-CBC"]:return s.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}},s.pbe.getCipherForPBES2=function(e,t,r){var i,a={},c=[];if(!o.validate(t,l,a,c))throw(i=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.")).errors=c,i;if((e=o.derToOid(a.kdfOid))!==s.oids.pkcs5PBKDF2)throw(i=new Error("Cannot read encrypted private key. Unsupported key derivation function OID.")).oid=e,i.supportedOids=["pkcs5PBKDF2"],i;if((e=o.derToOid(a.encOid))!==s.oids["aes128-CBC"]&&e!==s.oids["aes192-CBC"]&&e!==s.oids["aes256-CBC"]&&e!==s.oids["des-EDE3-CBC"]&&e!==s.oids.desCBC)throw(i=new Error("Cannot read encrypted private key. Unsupported encryption scheme OID.")).oid=e,i.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],i;var u,d,h=a.kdfSalt,f=n.util.createBuffer(a.kdfIterationCount);switch(f=f.getInt(f.length()<<3),s.oids[e]){case"aes128-CBC":u=16,d=n.aes.createDecryptionCipher;break;case"aes192-CBC":u=24,d=n.aes.createDecryptionCipher;break;case"aes256-CBC":u=32,d=n.aes.createDecryptionCipher;break;case"des-EDE3-CBC":u=24,d=n.des.createDecryptionCipher;break;case"desCBC":u=8,d=n.des.createDecryptionCipher}var g=p(a.prfOid),m=n.pkcs5.pbkdf2(r,h,f,u,g),y=a.encIv,v=d(m);return v.start(y),v},s.pbe.getCipherForPKCS12PBE=function(e,t,r){var i={},a=[];if(!o.validate(t,u,i,a))throw(g=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.")).errors=a,g;var c,l,d,h=n.util.createBuffer(i.salt),f=n.util.createBuffer(i.iterations);switch(f=f.getInt(f.length()<<3),e){case s.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:c=24,l=8,d=n.des.startDecrypting;break;case s.oids["pbewithSHAAnd40BitRC2-CBC"]:c=5,l=8,d=function(e,t){var r=n.rc2.createDecryptionCipher(e,40);return r.start(t,null),r};break;default:var g;throw(g=new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.")).oid=e,g}var m=p(i.prfOid),y=s.pbe.generatePkcs12Key(r,h,1,f,c,m);return m.start(),d(y,s.pbe.generatePkcs12Key(r,h,2,f,l,m))},s.pbe.opensslDeriveBytes=function(e,t,r,i){if(null==i){if(!("md5"in n.md))throw new Error('"md5" hash algorithm unavailable.');i=n.md.md5.create()}null===t&&(t="");for(var o=[d(i,e+t)],s=16,a=1;s{var n=r(56105);r(5945),r(91183),r(56827);var i,o=n.pkcs5=n.pkcs5||{};n.util.isNodejs&&!n.options.usePureJavaScript&&(i=r(6113)),e.exports=n.pbkdf2=o.pbkdf2=function(e,t,r,o,s,a){if("function"==typeof s&&(a=s,s=null),n.util.isNodejs&&!n.options.usePureJavaScript&&i.pbkdf2&&(null===s||"object"!=typeof s)&&(i.pbkdf2Sync.length>4||!s||"sha1"===s))return"string"!=typeof s&&(s="sha1"),e=Buffer.from(e,"binary"),t=Buffer.from(t,"binary"),a?4===i.pbkdf2Sync.length?i.pbkdf2(e,t,r,o,(function(e,t){if(e)return a(e);a(null,t.toString("binary"))})):i.pbkdf2(e,t,r,o,s,(function(e,t){if(e)return a(e);a(null,t.toString("binary"))})):4===i.pbkdf2Sync.length?i.pbkdf2Sync(e,t,r,o).toString("binary"):i.pbkdf2Sync(e,t,r,o,s).toString("binary");if(null==s&&(s="sha1"),"string"==typeof s){if(!(s in n.md.algorithms))throw new Error("Unknown hash algorithm: "+s);s=n.md[s].create()}var c=s.digestLength;if(o>4294967295*c){var l=new Error("Derived key is too long.");if(a)return a(l);throw l}var u=Math.ceil(o/c),d=o-(u-1)*c,p=n.hmac.create();p.start(s,e);var h,f,g,m="";if(!a){for(var y=1;y<=u;++y){p.start(null,null),p.update(t),p.update(n.util.int32ToBytes(y)),h=g=p.digest().getBytes();for(var v=2;v<=r;++v)p.start(null,null),p.update(g),f=p.digest().getBytes(),h=n.util.xorBytes(h,f,c),g=f;m+=yu)return a(null,m);p.start(null,null),p.update(t),p.update(n.util.int32ToBytes(y)),h=g=p.digest().getBytes(),v=2,b()}function b(){if(v<=r)return p.start(null,null),p.update(g),f=p.digest().getBytes(),h=n.util.xorBytes(h,f,c),g=f,++v,n.util.setImmediate(b);m+=y{var n=r(56105);r(56827);var i=e.exports=n.pem=n.pem||{};function o(e){for(var t=e.name+": ",r=[],n=function(e,t){return" "+t},i=0;i65&&-1!==s){var a=t[s];","===a?(++s,t=t.substr(0,s)+"\r\n "+t.substr(s)):t=t.substr(0,s)+"\r\n"+a+t.substr(s+1),o=i-s-1,s=-1,++i}else" "!==t[i]&&"\t"!==t[i]&&","!==t[i]||(s=i);return t}function s(e){return e.replace(/^\s+/,"")}i.encode=function(e,t){t=t||{};var r,i="-----BEGIN "+e.type+"-----\r\n";if(e.procType&&(i+=o(r={name:"Proc-Type",values:[String(e.procType.version),e.procType.type]})),e.contentDomain&&(i+=o(r={name:"Content-Domain",values:[e.contentDomain]})),e.dekInfo&&(r={name:"DEK-Info",values:[e.dekInfo.algorithm]},e.dekInfo.parameters&&r.values.push(e.dekInfo.parameters),i+=o(r)),e.headers)for(var s=0;s{var n=r(56105);r(56827),r(46572),r(98967);var i=e.exports=n.pkcs1=n.pkcs1||{};function o(e,t,r){r||(r=n.md.sha1.create());for(var i="",o=Math.ceil(t/r.digestLength),s=0;s>24&255,s>>16&255,s>>8&255,255&s);r.start(),r.update(e+a),i+=r.digest().getBytes()}return i.substring(0,t)}i.encode_rsa_oaep=function(e,t,r){var i,s,a,c;"string"==typeof r?(i=r,s=arguments[3]||void 0,a=arguments[4]||void 0):r&&(i=r.label||void 0,s=r.seed||void 0,a=r.md||void 0,r.mgf1&&r.mgf1.md&&(c=r.mgf1.md)),a?a.start():a=n.md.sha1.create(),c||(c=a);var l=Math.ceil(e.n.bitLength()/8),u=l-2*a.digestLength-2;if(t.length>u)throw(m=new Error("RSAES-OAEP input message length is too long.")).length=t.length,m.maxLength=u,m;i||(i=""),a.update(i,"raw");for(var d=a.digest(),p="",h=u-t.length,f=0;f{var n=r(56105);r(61057),r(5945),r(81877),r(44207),r(4173),r(46572),r(69597),r(98967),r(56827),r(46461);var i=n.asn1,o=n.pki,s=e.exports=n.pkcs12=n.pkcs12||{},a={name:"ContentInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:i.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},c={name:"PFX",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},a,{name:"PFX.macData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",tagClass:i.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},l={name:"SafeBag",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SafeBag.bagId",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:i.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},u={name:"Attribute",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"oid"},{name:"Attribute.attrValues",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0,capture:"values"}]},d={name:"CertBag",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:i.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:i.Class.UNIVERSAL,type:i.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};function p(e,t,r,n){for(var i=[],o=0;o=0&&i.push(a):i.push(a))}return i}function h(e){if(e.composed||e.constructed){for(var t=n.util.createBuffer(),r=0;r0&&(c=i.create(i.Class.UNIVERSAL,i.Type.SET,!0,d));var p=[],h=[];null!==t&&(h=n.util.isArray(t)?t:[t]);for(var f=[],g=0;g0){var _=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,f),b=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.oids.data).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,i.toDer(_).getBytes())])]);p.push(b)}var w=null;if(null!==e){var C=o.wrapRsaPrivateKey(o.privateKeyToAsn1(e));w=null===r?i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.oids.keyBag).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[C]),c]):i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.oids.pkcs8ShroudedKeyBag).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[o.encryptPrivateKeyInfo(C,r,a)]),c]);var E=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[w]),T=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.oids.data).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,i.toDer(E).getBytes())])]);p.push(T)}var S,x=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,p);if(a.useMac){var k=n.md.sha1.create(),I=new n.util.ByteBuffer(n.random.getBytes(a.saltSize)),A=a.count,P=(e=s.generateKey(r,I,3,A,20),n.hmac.create());P.start(k,e),P.update(i.toDer(x).getBytes());var R=P.getMac();S=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.oids.sha1).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.NULL,!1,"")]),i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,R.getBytes())]),i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,I.getBytes()),i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(A).getBytes())])}return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(3).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.oids.data).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,i.toDer(x).getBytes())])]),S])},s.generateKey=n.pbe.generatePkcs12Key},45067:(e,t,r)=>{var n=r(56105);r(60070),r(61057),r(62148),r(81877),r(25661),r(44207),r(46572),r(56827),r(46461);var i=n.asn1,o=e.exports=n.pkcs7=n.pkcs7||{};function s(e){var t={},r=[];if(!i.validate(e,o.asn1.recipientInfoValidator,t,r)){var s=new Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo.");throw s.errors=r,s}return{version:t.version.charCodeAt(0),issuer:n.pki.RDNAttributesAsArray(t.issuer),serialNumber:n.util.createBuffer(t.serial).toHex(),encryptedContent:{algorithm:i.derToOid(t.encAlgorithm),parameter:t.encParameter?t.encParameter.value:void 0,content:t.encKey}}}function a(e){for(var t,r=[],o=0;o0){for(var r=i.create(i.Class.CONTEXT_SPECIFIC,1,!0,[]),o=0;o=r&&s0&&s.value[0].value.push(i.create(i.Class.CONTEXT_SPECIFIC,0,!0,t)),o.length>0&&s.value[0].value.push(i.create(i.Class.CONTEXT_SPECIFIC,1,!0,o)),s.value[0].value.push(i.create(i.Class.UNIVERSAL,i.Type.SET,!0,e.signerInfos)),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.type).getBytes()),s])},addSigner:function(t){var r=t.issuer,i=t.serialNumber;if(t.certificate){var o=t.certificate;"string"==typeof o&&(o=n.pki.certificateFromPem(o)),r=o.issuer.attributes,i=o.serialNumber}var s=t.key;if(!s)throw new Error("Could not add PKCS#7 signer; no private key specified.");"string"==typeof s&&(s=n.pki.privateKeyFromPem(s));var a=t.digestAlgorithm||n.pki.oids.sha1;switch(a){case n.pki.oids.sha1:case n.pki.oids.sha256:case n.pki.oids.sha384:case n.pki.oids.sha512:case n.pki.oids.md5:break;default:throw new Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+a)}var c=t.authenticatedAttributes||[];if(c.length>0){for(var l=!1,u=!1,d=0;d{var n=r(56105);r(61057),r(56827);var i=n.asn1,o=e.exports=n.pkcs7asn1=n.pkcs7asn1||{};n.pkcs7=n.pkcs7||{},n.pkcs7.asn1=o;var s={name:"ContentInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};o.contentInfoValidator=s;var a={name:"EncryptedContentInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:i.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};o.envelopedDataValidator={name:"EnvelopedData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(a)},o.encryptedDataValidator={name:"EncryptedData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"}].concat(a)};var c={name:"SignerInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:i.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:i.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]};o.signedDataValidator={name:"SignedData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0,captureAsn1:"digestAlgorithms"},s,{name:"SignedData.Certificates",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:i.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,capture:"signerInfos",optional:!0,value:[c]}]},o.recipientInfoValidator={name:"RecipientInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:i.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter",optional:!0}]},{name:"RecipientInfo.encryptedKey",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}},23245:(e,t,r)=>{var n=r(56105);r(61057),r(81877),r(4173),r(25661),r(72299),r(88577),r(51242),r(69597),r(56827),r(46461);var i=n.asn1,o=e.exports=n.pki=n.pki||{};o.pemToDer=function(e){var t=n.pem.decode(e)[0];if(t.procType&&"ENCRYPTED"===t.procType.type)throw new Error("Could not convert PEM to DER; PEM is encrypted.");return n.util.createBuffer(t.body)},o.privateKeyFromPem=function(e){var t=n.pem.decode(e)[0];if("PRIVATE KEY"!==t.type&&"RSA PRIVATE KEY"!==t.type){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&&"ENCRYPTED"===t.procType.type)throw new Error("Could not convert private key from PEM; PEM is encrypted.");var s=i.fromDer(t.body);return o.privateKeyFromAsn1(s)},o.privateKeyToPem=function(e,t){var r={type:"RSA PRIVATE KEY",body:i.toDer(o.privateKeyToAsn1(e)).getBytes()};return n.pem.encode(r,{maxline:t})},o.privateKeyInfoToPem=function(e,t){var r={type:"PRIVATE KEY",body:i.toDer(e).getBytes()};return n.pem.encode(r,{maxline:t})}},77466:(e,t,r)=>{var n=r(56105);r(56827),r(10017),r(46572),function(){if(n.prime)e.exports=n.prime;else{var t=e.exports=n.prime=n.prime||{},r=n.jsbn.BigInteger,i=[6,4,2,4,2,4,6,2],o=new r(null);o.fromInt(30);var s=function(e,t){return e|t};t.generateProbablePrime=function(e,t,i){"function"==typeof t&&(i=t,t={});var o=(t=t||{}).algorithm||"PRIMEINC";"string"==typeof o&&(o={name:o}),o.options=o.options||{};var s=t.prng||n.random,c={nextBytes:function(e){for(var t=s.getBytesSync(e.length),r=0;re&&(s=l(e,t));var h=s.toString(16);i.target.postMessage({hex:h,workLoad:u}),s.dAddOffset(d,0)}}}h()}(e,t,i,o):a(e,t,i,o)}(e,c,o.options,i);throw new Error("Invalid prime generation algorithm: "+o.name)}}function a(e,t,r,n){var i=l(e,t),o=function(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}(i.bitLength());"millerRabinTests"in r&&(o=r.millerRabinTests);var s=10;"maxBlockTime"in r&&(s=r.maxBlockTime),c(i,e,t,0,o,s,n)}function c(e,t,r,o,s,a,u){var d=+new Date;do{if(e.bitLength()>t&&(e=l(t,r)),e.isProbablePrime(s))return u(null,e);e.dAddOffset(i[o++%8],0)}while(a<0||+new Date-d{var n=r(56105);r(56827);var i=null;!n.util.isNodejs||n.options.usePureJavaScript||process.versions["node-webkit"]||(i=r(6113)),(e.exports=n.prng=n.prng||{}).create=function(e){for(var t={plugin:e,key:null,seed:null,time:null,reseeds:0,generated:0,keyBytes:""},r=e.md,o=new Array(32),s=0;s<32;++s)o[s]=r.create();function a(){if(t.pools[0].messageLength>=32)return c();var e=32-t.pools[0].messageLength<<5;t.collect(t.seedFileSync(e)),c()}function c(){t.reseeds=4294967295===t.reseeds?0:t.reseeds+1;var e=t.plugin.md.create();e.update(t.keyBytes);for(var r=1,n=0;n<32;++n)t.reseeds%r==0&&(e.update(t.pools[n].digest().getBytes()),t.pools[n].start()),r<<=1;t.keyBytes=e.digest().getBytes(),e.start(),e.update(t.keyBytes);var i=e.digest().getBytes();t.key=t.plugin.formatKey(t.keyBytes),t.seed=t.plugin.formatSeed(i),t.generated=0}function l(e){var t=null,r=n.util.globalScope,i=r.crypto||r.msCrypto;i&&i.getRandomValues&&(t=function(e){return i.getRandomValues(e)});var o=n.util.createBuffer();if(t)for(;o.length()>16)))<<16,p=4294967295&(u=(2147483647&(u+=l>>15))+(u>>31)),c=0;c<3;++c)d=p>>>(c<<3),d^=Math.floor(256*Math.random()),o.putByte(255&d);return o.getBytes(e)}return t.pools=o,t.pool=0,t.generate=function(e,r){if(!r)return t.generateSync(e);var i=t.plugin.cipher,o=t.plugin.increment,s=t.plugin.formatKey,a=t.plugin.formatSeed,l=n.util.createBuffer();t.key=null,function u(d){if(d)return r(d);if(l.length()>=e)return r(null,l.getBytes(e));if(t.generated>1048575&&(t.key=null),null===t.key)return n.util.nextTick((function(){!function(e){if(t.pools[0].messageLength>=32)return c(),e();var r=32-t.pools[0].messageLength<<5;t.seedFile(r,(function(r,n){if(r)return e(r);t.collect(n),c(),e()}))}(u)}));var p=i(t.key,t.seed);t.generated+=p.length,l.putBytes(p),t.key=s(i(t.key,o(t.seed))),t.seed=a(i(t.key,t.seed)),n.util.setImmediate(u)}()},t.generateSync=function(e){var r=t.plugin.cipher,i=t.plugin.increment,o=t.plugin.formatKey,s=t.plugin.formatSeed;t.key=null;for(var c=n.util.createBuffer();c.length()1048575&&(t.key=null),null===t.key&&a();var l=r(t.key,t.seed);t.generated+=l.length,c.putBytes(l),t.key=o(r(t.key,i(t.seed))),t.seed=s(r(t.key,t.seed))}return c.getBytes(e)},i?(t.seedFile=function(e,t){i.randomBytes(e,(function(e,r){if(e)return t(e);t(null,r.toString())}))},t.seedFileSync=function(e){return i.randomBytes(e).toString()}):(t.seedFile=function(e,t){try{t(null,l(e))}catch(e){t(e)}},t.seedFileSync=l),t.collect=function(e){for(var r=e.length,n=0;n>i&255);t.collect(n)},t.registerWorker=function(e){e===self?t.seedFile=function(e,t){self.addEventListener("message",(function e(r){var n=r.data;n.forge&&n.forge.prng&&(self.removeEventListener("message",e),t(n.forge.prng.err,n.forge.prng.bytes))})),self.postMessage({forge:{prng:{needed:e}}})}:e.addEventListener("message",(function(r){var n=r.data;n.forge&&n.forge.prng&&t.seedFile(n.forge.prng.needed,(function(t,r){e.postMessage({forge:{prng:{err:t,bytes:r}}})}))}))},t}},51242:(e,t,r)=>{var n=r(56105);r(46572),r(56827),(e.exports=n.pss=n.pss||{}).create=function(e){3===arguments.length&&(e={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var t,r=e.md,i=e.mgf,o=r.digestLength,s=e.salt||null;if("string"==typeof s&&(s=n.util.createBuffer(s)),"saltLength"in e)t=e.saltLength;else{if(null===s)throw new Error("Salt length not specified or specific salt not given.");t=s.length()}if(null!==s&&s.length()!==t)throw new Error("Given salt length does not match length of given salt.");var a=e.prng||n.random,c={encode:function(e,c){var l,u,d=c-1,p=Math.ceil(d/8),h=e.digest().getBytes();if(p>8*p-d&255;return(b=String.fromCharCode(b.charCodeAt(0)&~w)+b.substr(1))+g+String.fromCharCode(188)},verify:function(e,s,a){var c,l=a-1,u=Math.ceil(l/8);if(s=s.substr(-u),u>8*u-l&255;if(0!=(p.charCodeAt(0)&f))throw new Error("Bits beyond keysize not zero as expected.");var g=i.generate(h,d),m="";for(c=0;c{var n=r(56105);r(60070),r(12262),r(26759),r(56827),n.random&&n.random.getBytes?e.exports=n.random:function(t){var r={},i=new Array(4),o=n.util.createBuffer();function s(){var e=n.prng.create(r);return e.getBytes=function(t,r){return e.generate(t,r)},e.getBytesSync=function(t){return e.generate(t)},e}r.formatKey=function(e){var t=n.util.createBuffer(e);return(e=new Array(4))[0]=t.getInt32(),e[1]=t.getInt32(),e[2]=t.getInt32(),e[3]=t.getInt32(),n.aes._expandKey(e,!1)},r.formatSeed=function(e){var t=n.util.createBuffer(e);return(e=new Array(4))[0]=t.getInt32(),e[1]=t.getInt32(),e[2]=t.getInt32(),e[3]=t.getInt32(),e},r.cipher=function(e,t){return n.aes._updateBlock(e,t,i,!1),o.putInt32(i[0]),o.putInt32(i[1]),o.putInt32(i[2]),o.putInt32(i[3]),o.getBytes()},r.increment=function(e){return++e[3],e},r.md=n.md.sha256;var a=s(),c=null,l=n.util.globalScope,u=l.crypto||l.msCrypto;if(u&&u.getRandomValues&&(c=function(e){return u.getRandomValues(e)}),n.options.usePureJavaScript||!n.util.isNodejs&&!c){if("undefined"==typeof window||window.document,a.collectInt(+new Date,32),"undefined"!=typeof navigator){var d="";for(var p in navigator)try{"string"==typeof navigator[p]&&(d+=navigator[p])}catch(e){}a.collect(d),d=null}t&&(t().mousemove((function(e){a.collectInt(e.clientX,16),a.collectInt(e.clientY,16)})),t().keypress((function(e){a.collectInt(e.charCode,8)})))}if(n.random)for(var p in a)n.random[p]=a[p];else n.random=a;n.random.createInstance=s,e.exports=n.random}("undefined"!=typeof jQuery?jQuery:null)},50514:(e,t,r)=>{var n=r(56105);r(56827);var i=[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],o=[1,2,3,5],s=function(e,t){return e<>16-t},a=function(e,t){return(65535&e)>>t|e<<16-t&65535};e.exports=n.rc2=n.rc2||{},n.rc2.expandKey=function(e,t){"string"==typeof e&&(e=n.util.createBuffer(e)),t=t||128;var r,o=e,s=e.length(),a=t,c=Math.ceil(a/8),l=255>>(7&a);for(r=s;r<128;r++)o.putByte(i[o.at(r-1)+o.at(r-s)&255]);for(o.setAt(128-c,i[o.at(128-c)&l]),r=127-c;r>=0;r--)o.setAt(r,i[o.at(r+1)^o.at(r+c)]);return o};var c=function(e,t,r){var i,c,l,u,d=!1,p=null,h=null,f=null,g=[];for(e=n.rc2.expandKey(e,t),l=0;l<64;l++)g.push(e.getInt16Le());r?(i=function(e){for(l=0;l<4;l++)e[l]+=g[u]+(e[(l+3)%4]&e[(l+2)%4])+(~e[(l+3)%4]&e[(l+1)%4]),e[l]=s(e[l],o[l]),u++},c=function(e){for(l=0;l<4;l++)e[l]+=g[63&e[(l+3)%4]]}):(i=function(e){for(l=3;l>=0;l--)e[l]=a(e[l],o[l]),e[l]-=g[u]+(e[(l+3)%4]&e[(l+2)%4])+(~e[(l+3)%4]&e[(l+1)%4]),u--},c=function(e){for(l=3;l>=0;l--)e[l]-=g[63&e[(l+3)%4]]});var m=function(e){var t=[];for(l=0;l<4;l++){var n=p.getInt16Le();null!==f&&(r?n^=f.getInt16Le():f.putInt16Le(n)),t.push(65535&n)}u=r?0:63;for(var i=0;i=8;)m([[5,i],[1,c],[6,i],[1,c],[5,i]])},finish:function(e){var t=!0;if(r)if(e)t=e(8,p,!r);else{var n=8===p.length()?8:8-p.length();p.fillWithByte(n,n)}if(t&&(d=!0,y.update()),!r&&(t=0===p.length()))if(e)t=e(8,h,!r);else{var i=h.length(),o=h.at(i-1);o>i?t=!1:h.truncate(o)}return t}}};n.rc2.startEncrypting=function(e,t,r){var i=n.rc2.createEncryptionCipher(e,128);return i.start(t,r),i},n.rc2.createEncryptionCipher=function(e,t){return c(e,t,!0)},n.rc2.startDecrypting=function(e,t,r){var i=n.rc2.createDecryptionCipher(e,128);return i.start(t,r),i},n.rc2.createDecryptionCipher=function(e,t){return c(e,t,!1)}},69597:(e,t,r)=>{var n=r(56105);if(r(61057),r(10017),r(81877),r(30585),r(77466),r(46572),r(56827),void 0===i)var i=n.jsbn.BigInteger;var o=n.util.isNodejs?r(6113):null,s=n.asn1,a=n.util;n.pki=n.pki||{},e.exports=n.pki.rsa=n.rsa=n.rsa||{};var c=n.pki,l=[6,4,2,4,2,4,6,2],u={name:"PrivateKeyInfo",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:s.Class.UNIVERSAL,type:s.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},d={name:"RSAPrivateKey",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},p={name:"RSAPublicKey",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},h=n.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:s.Class.UNIVERSAL,type:s.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},f={name:"DigestInfo",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm.algorithmIdentifier",tagClass:s.Class.UNIVERSAL,type:s.Type.OID,constructed:!1,capture:"algorithmIdentifier"},{name:"DigestInfo.DigestAlgorithm.parameters",tagClass:s.Class.UNIVERSAL,type:s.Type.NULL,capture:"parameters",optional:!0,constructed:!1}]},{name:"DigestInfo.digest",tagClass:s.Class.UNIVERSAL,type:s.Type.OCTETSTRING,constructed:!1,capture:"digest"}]},g=function(e){var t;if(!(e.algorithm in c.oids)){var r=new Error("Unknown message digest algorithm.");throw r.algorithm=e.algorithm,r}t=c.oids[e.algorithm];var n=s.oidToDer(t).getBytes(),i=s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[]),o=s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[]);o.value.push(s.create(s.Class.UNIVERSAL,s.Type.OID,!1,n)),o.value.push(s.create(s.Class.UNIVERSAL,s.Type.NULL,!1,""));var a=s.create(s.Class.UNIVERSAL,s.Type.OCTETSTRING,!1,e.digest().getBytes());return i.value.push(o),i.value.push(a),s.toDer(i).getBytes()},m=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);var o;t.dP||(t.dP=t.d.mod(t.p.subtract(i.ONE))),t.dQ||(t.dQ=t.d.mod(t.q.subtract(i.ONE))),t.qInv||(t.qInv=t.q.modInverse(t.p));do{o=new i(n.util.bytesToHex(n.random.getBytes(t.n.bitLength()/8)),16)}while(o.compareTo(t.n)>=0||!o.gcd(t.n).equals(i.ONE));for(var s=(e=e.multiply(o.modPow(t.e,t.n)).mod(t.n)).mod(t.p).modPow(t.dP,t.p),a=e.mod(t.q).modPow(t.dQ,t.q);s.compareTo(a)<0;)s=s.add(t.p);var c=s.subtract(a).multiply(t.qInv).mod(t.p).multiply(t.q).add(a);return c.multiply(o.modInverse(t.n)).mod(t.n)};function y(e,t,r){var i=n.util.createBuffer(),o=Math.ceil(t.n.bitLength()/8);if(e.length>o-11){var s=new Error("Message is too long for PKCS#1 v1.5 padding.");throw s.length=e.length,s.max=o-11,s}i.putByte(0),i.putByte(r);var a,c=o-3-e.length;if(0===r||1===r){a=0===r?0:255;for(var l=0;l0;){var u=0,d=n.random.getBytes(c);for(l=0;l1;){if(255!==s.getByte()){--s.read;break}++l}else if(2===c)for(l=0;s.length()>1;){if(0===s.getByte()){--s.read;break}++l}if(0!==s.getByte()||l!==o-3-s.length())throw new Error("Encryption block is invalid.");return s.getBytes()}function _(e,t,r){"function"==typeof t&&(r=t,t={});var o={algorithm:{name:(t=t||{}).algorithm||"PRIMEINC",options:{workers:t.workers||2,workLoad:t.workLoad||100,workerScript:t.workerScript}}};function s(){a(e.pBits,(function(t,n){return t?r(t):(e.p=n,null!==e.q?l(t,e.q):void a(e.qBits,l))}))}function a(e,t){n.prime.generateProbablePrime(e,o,t)}function l(t,n){if(t)return r(t);if(e.q=n,e.p.compareTo(e.q)<0){var o=e.p;e.p=e.q,e.q=o}if(0!==e.p.subtract(i.ONE).gcd(e.e).compareTo(i.ONE))return e.p=null,void s();if(0!==e.q.subtract(i.ONE).gcd(e.e).compareTo(i.ONE))return e.q=null,void a(e.qBits,l);if(e.p1=e.p.subtract(i.ONE),e.q1=e.q.subtract(i.ONE),e.phi=e.p1.multiply(e.q1),0!==e.phi.gcd(e.e).compareTo(i.ONE))return e.p=e.q=null,void s();if(e.n=e.p.multiply(e.q),e.n.bitLength()!==e.bits)return e.q=null,void a(e.qBits,l);var u=e.e.modInverse(e.phi);e.keys={privateKey:c.rsa.setPrivateKey(e.n,e.e,u,e.p,e.q,u.mod(e.p1),u.mod(e.q1),e.q.modInverse(e.p)),publicKey:c.rsa.setPublicKey(e.n,e.e)},r(null,e.keys)}"prng"in t&&(o.prng=t.prng),s()}function b(e){var t=e.toString(16);t[0]>="8"&&(t="00"+t);var r=n.util.hexToBytes(t);return r.length>1&&(0===r.charCodeAt(0)&&0==(128&r.charCodeAt(1))||255===r.charCodeAt(0)&&128==(128&r.charCodeAt(1)))?r.substr(1):r}function w(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}function C(e){return n.util.isNodejs&&"function"==typeof o[e]}function E(e){return void 0!==a.globalScope&&"object"==typeof a.globalScope.crypto&&"object"==typeof a.globalScope.crypto.subtle&&"function"==typeof a.globalScope.crypto.subtle[e]}function T(e){return void 0!==a.globalScope&&"object"==typeof a.globalScope.msCrypto&&"object"==typeof a.globalScope.msCrypto.subtle&&"function"==typeof a.globalScope.msCrypto.subtle[e]}function S(e){for(var t=n.util.hexToBytes(e.toString(16)),r=new Uint8Array(t.length),i=0;i0;)u.putByte(0),--d;return u.putBytes(n.util.hexToBytes(l)),u.getBytes()},c.rsa.decrypt=function(e,t,r,o){var s=Math.ceil(t.n.bitLength()/8);if(e.length!==s){var a=new Error("Encrypted message length is invalid.");throw a.length=e.length,a.expected=s,a}var c=new i(n.util.createBuffer(e).toHex(),16);if(c.compareTo(t.n)>=0)throw new Error("Encrypted message is invalid.");for(var l=m(c,t,r).toString(16),u=n.util.createBuffer(),d=s-Math.ceil(l.length/2);d>0;)u.putByte(0),--d;return u.putBytes(n.util.hexToBytes(l)),!1!==o?v(u.getBytes(),t,r):u.getBytes()},c.rsa.createKeyPairGenerationState=function(e,t,r){"string"==typeof e&&(e=parseInt(e,10)),e=e||2048;var o,s=(r=r||{}).prng||n.random,a={nextBytes:function(e){for(var t=s.getBytesSync(e.length),r=0;r>1,pBits:e-(e>>1),pqState:0,num:null,keys:null}).e.fromInt(o.eInt),o},c.rsa.stepKeyPairGenerationState=function(e,t){"algorithm"in e||(e.algorithm="PRIMEINC");var r=new i(null);r.fromInt(30);for(var n,o=0,s=function(e,t){return e|t},a=+new Date,u=0;null===e.keys&&(t<=0||ud?e.pqState=0:e.num.isProbablePrime(w(e.num.bitLength()))?++e.pqState:e.num.dAddOffset(l[o++%8],0):2===e.pqState?e.pqState=0===e.num.subtract(i.ONE).gcd(e.e).compareTo(i.ONE)?3:0:3===e.pqState&&(e.pqState=0,null===e.p?e.p=e.num:e.q=e.num,null!==e.p&&null!==e.q&&++e.state,e.num=null)}else if(1===e.state)e.p.compareTo(e.q)<0&&(e.num=e.p,e.p=e.q,e.q=e.num),++e.state;else if(2===e.state)e.p1=e.p.subtract(i.ONE),e.q1=e.q.subtract(i.ONE),e.phi=e.p1.multiply(e.q1),++e.state;else if(3===e.state)0===e.phi.gcd(e.e).compareTo(i.ONE)?++e.state:(e.p=null,e.q=null,e.state=0);else if(4===e.state)e.n=e.p.multiply(e.q),e.n.bitLength()===e.bits?++e.state:(e.q=null,e.state=0);else if(5===e.state){var h=e.e.modInverse(e.phi);e.keys={privateKey:c.rsa.setPrivateKey(e.n,e.e,h,e.p,e.q,h.mod(e.p1),h.mod(e.q1),e.q.modInverse(e.p)),publicKey:c.rsa.setPublicKey(e.n,e.e)}}u+=(n=+new Date)-a,a=n}return null!==e.keys},c.rsa.generateKeyPair=function(e,t,r,i){if(1===arguments.length?"object"==typeof e?(r=e,e=void 0):"function"==typeof e&&(i=e,e=void 0):2===arguments.length?"number"==typeof e?"function"==typeof t?(i=t,t=void 0):"number"!=typeof t&&(r=t,t=void 0):(r=e,i=t,e=void 0,t=void 0):3===arguments.length&&("number"==typeof t?"function"==typeof r&&(i=r,r=void 0):(i=r,r=t,t=void 0)),r=r||{},void 0===e&&(e=r.bits||2048),void 0===t&&(t=r.e||65537),!n.options.usePureJavaScript&&!r.prng&&e>=256&&e<=16384&&(65537===t||3===t))if(i){if(C("generateKeyPair"))return o.generateKeyPair("rsa",{modulusLength:e,publicExponent:t,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}},(function(e,t,r){if(e)return i(e);i(null,{privateKey:c.privateKeyFromPem(r),publicKey:c.publicKeyFromPem(t)})}));if(E("generateKey")&&E("exportKey"))return a.globalScope.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:S(t),hash:{name:"SHA-256"}},!0,["sign","verify"]).then((function(e){return a.globalScope.crypto.subtle.exportKey("pkcs8",e.privateKey)})).then(void 0,(function(e){i(e)})).then((function(e){if(e){var t=c.privateKeyFromAsn1(s.fromDer(n.util.createBuffer(e)));i(null,{privateKey:t,publicKey:c.setRsaPublicKey(t.n,t.e)})}}));if(T("generateKey")&&T("exportKey")){var l=a.globalScope.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:S(t),hash:{name:"SHA-256"}},!0,["sign","verify"]);return l.oncomplete=function(e){var t=e.target.result,r=a.globalScope.msCrypto.subtle.exportKey("pkcs8",t.privateKey);r.oncomplete=function(e){var t=e.target.result,r=c.privateKeyFromAsn1(s.fromDer(n.util.createBuffer(t)));i(null,{privateKey:r,publicKey:c.setRsaPublicKey(r.n,r.e)})},r.onerror=function(e){i(e)}},void(l.onerror=function(e){i(e)})}}else if(C("generateKeyPairSync")){var u=o.generateKeyPairSync("rsa",{modulusLength:e,publicExponent:t,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}});return{privateKey:c.privateKeyFromPem(u.privateKey),publicKey:c.publicKeyFromPem(u.publicKey)}}var d=c.rsa.createKeyPairGenerationState(e,t,r);if(!i)return c.rsa.stepKeyPairGenerationState(d,0),d.keys;_(d,r,i)},c.setRsaPublicKey=c.rsa.setPublicKey=function(e,t){var r={n:e,e:t,encrypt:function(e,t,i){if("string"==typeof t?t=t.toUpperCase():void 0===t&&(t="RSAES-PKCS1-V1_5"),"RSAES-PKCS1-V1_5"===t)t={encode:function(e,t,r){return y(e,t,2).getBytes()}};else if("RSA-OAEP"===t||"RSAES-OAEP"===t)t={encode:function(e,t){return n.pkcs1.encode_rsa_oaep(t,e,i)}};else if(-1!==["RAW","NONE","NULL",null].indexOf(t))t={encode:function(e){return e}};else if("string"==typeof t)throw new Error('Unsupported encryption scheme: "'+t+'".');var o=t.encode(e,r,!0);return c.rsa.encrypt(o,r,!0)},verify:function(e,t,i,o){"string"==typeof i?i=i.toUpperCase():void 0===i&&(i="RSASSA-PKCS1-V1_5"),void 0===o&&(o={_parseAllDigestBytes:!0}),"_parseAllDigestBytes"in o||(o._parseAllDigestBytes=!0),"RSASSA-PKCS1-V1_5"===i?i={verify:function(e,t){t=v(t,r,!0);var i=s.fromDer(t,{parseAllBytes:o._parseAllDigestBytes}),a={},c=[];if(!s.validate(i,f,a,c))throw(l=new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value.")).errors=c,l;var l,u=s.derToOid(a.algorithmIdentifier);if(u!==n.oids.md2&&u!==n.oids.md5&&u!==n.oids.sha1&&u!==n.oids.sha224&&u!==n.oids.sha256&&u!==n.oids.sha384&&u!==n.oids.sha512&&u!==n.oids["sha512-224"]&&u!==n.oids["sha512-256"])throw(l=new Error("Unknown RSASSA-PKCS1-v1_5 DigestAlgorithm identifier.")).oid=u,l;if((u===n.oids.md2||u===n.oids.md5)&&!("parameters"in a))throw new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value. Missing algorithm identifer NULL parameters.");return e===a.digest}}:"NONE"!==i&&"NULL"!==i&&null!==i||(i={verify:function(e,t){return e===v(t,r,!0)}});var a=c.rsa.decrypt(t,r,!0,!1);return i.verify(e,a,r.n.bitLength())}};return r},c.setRsaPrivateKey=c.rsa.setPrivateKey=function(e,t,r,i,o,s,a,l){var u={n:e,e:t,d:r,p:i,q:o,dP:s,dQ:a,qInv:l,decrypt:function(e,t,r){"string"==typeof t?t=t.toUpperCase():void 0===t&&(t="RSAES-PKCS1-V1_5");var i=c.rsa.decrypt(e,u,!1,!1);if("RSAES-PKCS1-V1_5"===t)t={decode:v};else if("RSA-OAEP"===t||"RSAES-OAEP"===t)t={decode:function(e,t){return n.pkcs1.decode_rsa_oaep(t,e,r)}};else{if(-1===["RAW","NONE","NULL",null].indexOf(t))throw new Error('Unsupported encryption scheme: "'+t+'".');t={decode:function(e){return e}}}return t.decode(i,u,!1)},sign:function(e,t){var r=!1;"string"==typeof t&&(t=t.toUpperCase()),void 0===t||"RSASSA-PKCS1-V1_5"===t?(t={encode:g},r=1):"NONE"!==t&&"NULL"!==t&&null!==t||(t={encode:function(){return e}},r=1);var n=t.encode(e,u.n.bitLength());return c.rsa.encrypt(n,u,r)}};return u},c.wrapRsaPrivateKey=function(e){return s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,s.integerToDer(0).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.OID,!1,s.oidToDer(c.oids.rsaEncryption).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.NULL,!1,"")]),s.create(s.Class.UNIVERSAL,s.Type.OCTETSTRING,!1,s.toDer(e).getBytes())])},c.privateKeyFromAsn1=function(e){var t,r,o,a,l,p,h,f,g={},m=[];if(s.validate(e,u,g,m)&&(e=s.fromDer(n.util.createBuffer(g.privateKey))),g={},m=[],!s.validate(e,d,g,m)){var y=new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");throw y.errors=m,y}return t=n.util.createBuffer(g.privateKeyModulus).toHex(),r=n.util.createBuffer(g.privateKeyPublicExponent).toHex(),o=n.util.createBuffer(g.privateKeyPrivateExponent).toHex(),a=n.util.createBuffer(g.privateKeyPrime1).toHex(),l=n.util.createBuffer(g.privateKeyPrime2).toHex(),p=n.util.createBuffer(g.privateKeyExponent1).toHex(),h=n.util.createBuffer(g.privateKeyExponent2).toHex(),f=n.util.createBuffer(g.privateKeyCoefficient).toHex(),c.setRsaPrivateKey(new i(t,16),new i(r,16),new i(o,16),new i(a,16),new i(l,16),new i(p,16),new i(h,16),new i(f,16))},c.privateKeyToAsn1=c.privateKeyToRSAPrivateKey=function(e){return s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,s.integerToDer(0).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,b(e.n)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,b(e.e)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,b(e.d)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,b(e.p)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,b(e.q)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,b(e.dP)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,b(e.dQ)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,b(e.qInv))])},c.publicKeyFromAsn1=function(e){var t={},r=[];if(s.validate(e,h,t,r)){var o,a=s.derToOid(t.publicKeyOid);if(a!==c.oids.rsaEncryption)throw(o=new Error("Cannot read public key. Unknown OID.")).oid=a,o;e=t.rsaPublicKey}if(r=[],!s.validate(e,p,t,r))throw(o=new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.")).errors=r,o;var l=n.util.createBuffer(t.publicKeyModulus).toHex(),u=n.util.createBuffer(t.publicKeyExponent).toHex();return c.setRsaPublicKey(new i(l,16),new i(u,16))},c.publicKeyToAsn1=c.publicKeyToSubjectPublicKeyInfo=function(e){return s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.OID,!1,s.oidToDer(c.oids.rsaEncryption).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.NULL,!1,"")]),s.create(s.Class.UNIVERSAL,s.Type.BITSTRING,!1,[c.publicKeyToRSAPublicKey(e)])])},c.publicKeyToRSAPublicKey=function(e){return s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,b(e.n)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,b(e.e))])}},98967:(e,t,r)=>{var n=r(56105);r(91183),r(56827);var i=e.exports=n.sha1=n.sha1||{};n.md.sha1=n.md.algorithms.sha1=i,i.create=function(){s||(o=String.fromCharCode(128),o+=n.util.fillString(String.fromCharCode(0),64),s=!0);var e=null,t=n.util.createBuffer(),r=new Array(80),i={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){i.messageLength=0,i.fullMessageLength=i.messageLength64=[];for(var r=i.messageLengthSize/4,o=0;o>>0,c>>>0];for(var l=i.fullMessageLength.length-1;l>=0;--l)i.fullMessageLength[l]+=c[1],c[1]=c[0]+(i.fullMessageLength[l]/4294967296>>>0),i.fullMessageLength[l]=i.fullMessageLength[l]>>>0,c[0]=c[1]/4294967296>>>0;return t.putBytes(o),a(e,r,t),(t.read>2048||0===t.length())&&t.compact(),i},i.digest=function(){var s=n.util.createBuffer();s.putBytes(t.bytes());var c,l=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1;s.putBytes(o.substr(0,i.blockLength-l));for(var u=8*i.fullMessageLength[0],d=0;d>>0,s.putInt32(u>>>0),u=c>>>0;s.putInt32(u);var p={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4};a(p,r,s);var h=n.util.createBuffer();return h.putInt32(p.h0),h.putInt32(p.h1),h.putInt32(p.h2),h.putInt32(p.h3),h.putInt32(p.h4),h},i};var o=null,s=!1;function a(e,t,r){for(var n,i,o,s,a,c,l,u=r.length();u>=64;){for(i=e.h0,o=e.h1,s=e.h2,a=e.h3,c=e.h4,l=0;l<16;++l)n=r.getInt32(),t[l]=n,n=(i<<5|i>>>27)+(a^o&(s^a))+c+1518500249+n,c=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;for(;l<20;++l)n=(n=t[l-3]^t[l-8]^t[l-14]^t[l-16])<<1|n>>>31,t[l]=n,n=(i<<5|i>>>27)+(a^o&(s^a))+c+1518500249+n,c=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;for(;l<32;++l)n=(n=t[l-3]^t[l-8]^t[l-14]^t[l-16])<<1|n>>>31,t[l]=n,n=(i<<5|i>>>27)+(o^s^a)+c+1859775393+n,c=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;for(;l<40;++l)n=(n=t[l-6]^t[l-16]^t[l-28]^t[l-32])<<2|n>>>30,t[l]=n,n=(i<<5|i>>>27)+(o^s^a)+c+1859775393+n,c=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;for(;l<60;++l)n=(n=t[l-6]^t[l-16]^t[l-28]^t[l-32])<<2|n>>>30,t[l]=n,n=(i<<5|i>>>27)+(o&s|a&(o^s))+c+2400959708+n,c=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;for(;l<80;++l)n=(n=t[l-6]^t[l-16]^t[l-28]^t[l-32])<<2|n>>>30,t[l]=n,n=(i<<5|i>>>27)+(o^s^a)+c+3395469782+n,c=a,a=s,s=(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+s|0,e.h3=e.h3+a|0,e.h4=e.h4+c|0,u-=64}}},12262:(e,t,r)=>{var n=r(56105);r(91183),r(56827);var i=e.exports=n.sha256=n.sha256||{};n.md.sha256=n.md.algorithms.sha256=i,i.create=function(){s||(o=String.fromCharCode(128),o+=n.util.fillString(String.fromCharCode(0),64),a=[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],s=!0);var e=null,t=n.util.createBuffer(),r=new Array(64),i={algorithm:"sha256",blockLength:64,digestLength:32,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){i.messageLength=0,i.fullMessageLength=i.messageLength64=[];for(var r=i.messageLengthSize/4,o=0;o>>0,a>>>0];for(var l=i.fullMessageLength.length-1;l>=0;--l)i.fullMessageLength[l]+=a[1],a[1]=a[0]+(i.fullMessageLength[l]/4294967296>>>0),i.fullMessageLength[l]=i.fullMessageLength[l]>>>0,a[0]=a[1]/4294967296>>>0;return t.putBytes(o),c(e,r,t),(t.read>2048||0===t.length())&&t.compact(),i},i.digest=function(){var s=n.util.createBuffer();s.putBytes(t.bytes());var a,l=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1;s.putBytes(o.substr(0,i.blockLength-l));for(var u=8*i.fullMessageLength[0],d=0;d>>0,s.putInt32(u>>>0),u=a>>>0;s.putInt32(u);var p={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4,h5:e.h5,h6:e.h6,h7:e.h7};c(p,r,s);var h=n.util.createBuffer();return h.putInt32(p.h0),h.putInt32(p.h1),h.putInt32(p.h2),h.putInt32(p.h3),h.putInt32(p.h4),h.putInt32(p.h5),h.putInt32(p.h6),h.putInt32(p.h7),h},i};var o=null,s=!1,a=null;function c(e,t,r){for(var n,i,o,s,c,l,u,d,p,h,f,g,m,y=r.length();y>=64;){for(c=0;c<16;++c)t[c]=r.getInt32();for(;c<64;++c)n=((n=t[c-2])>>>17|n<<15)^(n>>>19|n<<13)^n>>>10,i=((i=t[c-15])>>>7|i<<25)^(i>>>18|i<<14)^i>>>3,t[c]=n+t[c-7]+i+t[c-16]|0;for(l=e.h0,u=e.h1,d=e.h2,p=e.h3,h=e.h4,f=e.h5,g=e.h6,m=e.h7,c=0;c<64;++c)o=(l>>>2|l<<30)^(l>>>13|l<<19)^(l>>>22|l<<10),s=l&u|d&(l^u),n=m+((h>>>6|h<<26)^(h>>>11|h<<21)^(h>>>25|h<<7))+(g^h&(f^g))+a[c]+t[c],m=g,g=f,f=h,h=p+n>>>0,p=d,d=u,u=l,l=n+(i=o+s)>>>0;e.h0=e.h0+l|0,e.h1=e.h1+u|0,e.h2=e.h2+d|0,e.h3=e.h3+p|0,e.h4=e.h4+h|0,e.h5=e.h5+f|0,e.h6=e.h6+g|0,e.h7=e.h7+m|0,y-=64}}},593:(e,t,r)=>{var n=r(56105);r(91183),r(56827);var i=e.exports=n.sha512=n.sha512||{};n.md.sha512=n.md.algorithms.sha512=i;var o=n.sha384=n.sha512.sha384=n.sha512.sha384||{};o.create=function(){return i.create("SHA-384")},n.md.sha384=n.md.algorithms.sha384=o,n.sha512.sha256=n.sha512.sha256||{create:function(){return i.create("SHA-512/256")}},n.md["sha512/256"]=n.md.algorithms["sha512/256"]=n.sha512.sha256,n.sha512.sha224=n.sha512.sha224||{create:function(){return i.create("SHA-512/224")}},n.md["sha512/224"]=n.md.algorithms["sha512/224"]=n.sha512.sha224,i.create=function(e){if(a||(s=String.fromCharCode(128),s+=n.util.fillString(String.fromCharCode(0),128),c=[[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]],(l={})["SHA-512"]=[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],[528734635,4215389547],[1541459225,327033209]],l["SHA-384"]=[[3418070365,3238371032],[1654270250,914150663],[2438529370,812702999],[355462360,4144912697],[1731405415,4290775857],[2394180231,1750603025],[3675008525,1694076839],[1203062813,3204075428]],l["SHA-512/256"]=[[573645204,4230739756],[2673172387,3360449730],[596883563,1867755857],[2520282905,1497426621],[2519219938,2827943907],[3193839141,1401305490],[721525244,746961066],[246885852,2177182882]],l["SHA-512/224"]=[[2352822216,424955298],[1944164710,2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]],a=!0),void 0===e&&(e="SHA-512"),!(e in l))throw new Error("Invalid SHA-512 algorithm: "+e);for(var t=l[e],r=null,i=n.util.createBuffer(),o=new Array(80),d=0;d<80;++d)o[d]=new Array(2);var p=64;switch(e){case"SHA-384":p=48;break;case"SHA-512/256":p=32;break;case"SHA-512/224":p=28}var h={algorithm:e.replace("-","").toLowerCase(),blockLength:128,digestLength:p,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){h.messageLength=0,h.fullMessageLength=h.messageLength128=[];for(var e=h.messageLengthSize/4,o=0;o>>0,s>>>0];for(var a=h.fullMessageLength.length-1;a>=0;--a)h.fullMessageLength[a]+=s[1],s[1]=s[0]+(h.fullMessageLength[a]/4294967296>>>0),h.fullMessageLength[a]=h.fullMessageLength[a]>>>0,s[0]=s[1]/4294967296>>>0;return i.putBytes(e),u(r,o,i),(i.read>2048||0===i.length())&&i.compact(),h},h.digest=function(){var t=n.util.createBuffer();t.putBytes(i.bytes());var a,c=h.fullMessageLength[h.fullMessageLength.length-1]+h.messageLengthSize&h.blockLength-1;t.putBytes(s.substr(0,h.blockLength-c));for(var l=8*h.fullMessageLength[0],d=0;d>>0,t.putInt32(l>>>0),l=a>>>0;t.putInt32(l);var p=new Array(r.length);for(d=0;d=128;){for(P=0;P<16;++P)t[P][0]=r.getInt32()>>>0,t[P][1]=r.getInt32()>>>0;for(;P<80;++P)n=(((R=(O=t[P-2])[0])>>>19|(N=O[1])<<13)^(N>>>29|R<<3)^R>>>6)>>>0,i=((R<<13|N>>>19)^(N<<3|R>>>29)^(R<<26|N>>>6))>>>0,o=(((R=(L=t[P-15])[0])>>>1|(N=L[1])<<31)^(R>>>8|N<<24)^R>>>7)>>>0,s=((R<<31|N>>>1)^(R<<24|N>>>8)^(R<<25|N>>>7))>>>0,D=t[P-7],M=t[P-16],N=i+D[1]+s+M[1],t[P][0]=n+D[0]+o+M[0]+(N/4294967296>>>0)>>>0,t[P][1]=N>>>0;for(f=e[0][0],g=e[0][1],m=e[1][0],y=e[1][1],v=e[2][0],_=e[2][1],b=e[3][0],w=e[3][1],C=e[4][0],E=e[4][1],T=e[5][0],S=e[5][1],x=e[6][0],k=e[6][1],I=e[7][0],A=e[7][1],P=0;P<80;++P)u=((C>>>14|E<<18)^(C>>>18|E<<14)^(E>>>9|C<<23))>>>0,d=(x^C&(T^x))>>>0,a=((f>>>28|g<<4)^(g>>>2|f<<30)^(g>>>7|f<<25))>>>0,l=((f<<4|g>>>28)^(g<<30|f>>>2)^(g<<25|f>>>7))>>>0,p=(f&m|v&(f^m))>>>0,h=(g&y|_&(g^y))>>>0,N=A+(((C<<18|E>>>14)^(C<<14|E>>>18)^(E<<23|C>>>9))>>>0)+((k^E&(S^k))>>>0)+c[P][1]+t[P][1],n=I+u+d+c[P][0]+t[P][0]+(N/4294967296>>>0)>>>0,i=N>>>0,o=a+p+((N=l+h)/4294967296>>>0)>>>0,s=N>>>0,I=x,A=k,x=T,k=S,T=C,S=E,C=b+n+((N=w+i)/4294967296>>>0)>>>0,E=N>>>0,b=v,w=_,v=m,_=y,m=f,y=g,f=n+o+((N=i+s)/4294967296>>>0)>>>0,g=N>>>0;N=e[0][1]+g,e[0][0]=e[0][0]+f+(N/4294967296>>>0)>>>0,e[0][1]=N>>>0,N=e[1][1]+y,e[1][0]=e[1][0]+m+(N/4294967296>>>0)>>>0,e[1][1]=N>>>0,N=e[2][1]+_,e[2][0]=e[2][0]+v+(N/4294967296>>>0)>>>0,e[2][1]=N>>>0,N=e[3][1]+w,e[3][0]=e[3][0]+b+(N/4294967296>>>0)>>>0,e[3][1]=N>>>0,N=e[4][1]+E,e[4][0]=e[4][0]+C+(N/4294967296>>>0)>>>0,e[4][1]=N>>>0,N=e[5][1]+S,e[5][0]=e[5][0]+T+(N/4294967296>>>0)>>>0,e[5][1]=N>>>0,N=e[6][1]+k,e[6][0]=e[6][0]+x+(N/4294967296>>>0)>>>0,e[6][1]=N>>>0,N=e[7][1]+A,e[7][0]=e[7][0]+I+(N/4294967296>>>0)>>>0,e[7][1]=N>>>0,B-=128}}},21431:(e,t,r)=>{var n=r(56105);r(60070),r(5945),r(54326),r(98967),r(56827);var i=e.exports=n.ssh=n.ssh||{};function o(e,t){var r=t.toString(16);r[0]>="8"&&(r="00"+r);var i=n.util.hexToBytes(r);e.putInt32(i.length),e.putBytes(i)}function s(e,t){e.putInt32(t.length),e.putString(t)}function a(){for(var e=n.md.sha1.create(),t=arguments.length,r=0;r{var n=r(56105);r(61057),r(5945),r(54326),r(25661),r(23245),r(46572),r(98967),r(56827);var i=function(e,t,r,i){var o=n.util.createBuffer(),s=e.length>>1,a=s+(1&e.length),c=e.substr(0,a),l=e.substr(s,a),u=n.util.createBuffer(),d=n.hmac.create();r=t+r;var p=Math.ceil(i/16),h=Math.ceil(i/20);d.start("MD5",c);var f=n.util.createBuffer();u.putBytes(r);for(var g=0;g0&&(l.queue(e,l.createAlert(e,{level:l.Alert.Level.warning,description:l.Alert.Description.no_renegotiation})),l.flush(e)),e.process()},l.parseHelloMessage=function(e,t,r){var i=null,o=e.entity===l.ConnectionEnd.client;if(r<38)e.error(e,{message:o?"Invalid ServerHello message. Message too short.":"Invalid ClientHello message. Message too short.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.illegal_parameter}});else{var s=t.fragment,c=s.length();if(i={version:{major:s.getByte(),minor:s.getByte()},random:n.util.createBuffer(s.getBytes(32)),session_id:a(s,1),extensions:[]},o?(i.cipher_suite=s.getBytes(2),i.compression_method=s.getByte()):(i.cipher_suites=a(s,2),i.compression_methods=a(s,1)),(c=r-(c-s.length()))>0){for(var u=a(s,2);u.length()>0;)i.extensions.push({type:[u.getByte(),u.getByte()],data:a(u,2)});if(!o)for(var d=0;d0&&0===h.getByte();)e.session.extensions.server_name.serverNameList.push(a(h,2).getBytes())}}if(e.session.version&&(i.version.major!==e.session.version.major||i.version.minor!==e.session.version.minor))return e.error(e,{message:"TLS version change is disallowed during renegotiation.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.protocol_version}});if(o)e.session.cipherSuite=l.getCipherSuite(i.cipher_suite);else for(var f=n.util.createBuffer(i.cipher_suites.bytes());f.length()>0&&(e.session.cipherSuite=l.getCipherSuite(f.getBytes(2)),null===e.session.cipherSuite););if(null===e.session.cipherSuite)return e.error(e,{message:"No cipher suites in common.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.handshake_failure},cipherSuite:n.util.bytesToHex(i.cipher_suite)});e.session.compressionMethod=o?i.compression_method:l.CompressionMethod.none}return i},l.createSecurityParameters=function(e,t){var r=e.entity===l.ConnectionEnd.client,n=t.random.bytes(),i=r?e.session.sp.client_random:n,o=r?n:l.createRandom().getBytes();e.session.sp={entity:e.entity,prf_algorithm:l.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}},l.handleServerHello=function(e,t,r){var n=l.parseHelloMessage(e,t,r);if(!e.fail){if(!(n.version.minor<=e.version.minor))return e.error(e,{message:"Incompatible TLS version.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.protocol_version}});e.version.minor=n.version.minor,e.session.version=e.version;var i=n.session_id.bytes();i.length>0&&i===e.session.id?(e.expect=f,e.session.resuming=!0,e.session.sp.server_random=n.random.bytes()):(e.expect=u,e.session.resuming=!1,l.createSecurityParameters(e,n)),e.session.id=i,e.process()}},l.handleClientHello=function(e,t,r){var i=l.parseHelloMessage(e,t,r);if(!e.fail){var o=i.session_id.bytes(),s=null;if(e.sessionCache&&(null===(s=e.sessionCache.getSession(o))?o="":(s.version.major!==i.version.major||s.version.minor>i.version.minor)&&(s=null,o="")),0===o.length&&(o=n.random.getBytes(32)),e.session.id=o,e.session.clientHelloVersion=i.version,e.session.sp={},s)e.version=e.session.version=s.version,e.session.sp=s.sp;else{for(var a,c=1;c0;)i=a(c.certificate_list,3),o=n.asn1.fromDer(i),i=n.pki.certificateFromAsn1(o,!0),u.push(i)}catch(t){return e.error(e,{message:"Could not parse certificate list.",cause:t,send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.bad_certificate}})}var p=e.entity===l.ConnectionEnd.client;!p&&!0!==e.verifyClient||0!==u.length?0===u.length?e.expect=p?d:_:(p?e.session.serverCertificate=u[0]:e.session.clientCertificate=u[0],l.verifyCertificateChain(e,u)&&(e.expect=p?d:_)):e.error(e,{message:p?"No server certificate provided.":"No client certificate provided.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.illegal_parameter}}),e.process()},l.handleServerKeyExchange=function(e,t,r){if(r>0)return e.error(e,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.unsupported_certificate}});e.expect=p,e.process()},l.handleClientKeyExchange=function(e,t,r){if(r<48)return e.error(e,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.unsupported_certificate}});var i=t.fragment,o={enc_pre_master_secret:a(i,2).getBytes()},s=null;if(e.getPrivateKey)try{s=e.getPrivateKey(e,e.session.serverCertificate),s=n.pki.privateKeyFromPem(s)}catch(t){e.error(e,{message:"Could not get private key.",cause:t,send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.internal_error}})}if(null===s)return e.error(e,{message:"No private key set.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.internal_error}});try{var c=e.session.sp;c.pre_master_secret=s.decrypt(o.enc_pre_master_secret);var u=e.session.clientHelloVersion;if(u.major!==c.pre_master_secret.charCodeAt(0)||u.minor!==c.pre_master_secret.charCodeAt(1))throw new Error("TLS version rollback attack detected.")}catch(e){c.pre_master_secret=n.random.getBytes(48)}e.expect=w,null!==e.session.clientCertificate&&(e.expect=b),e.process()},l.handleCertificateRequest=function(e,t,r){if(r<3)return e.error(e,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.illegal_parameter}});var n=t.fragment,i={certificate_types:a(n,1),certificate_authorities:a(n,2)};e.session.certificateRequest=i,e.expect=h,e.process()},l.handleCertificateVerify=function(e,t,r){if(r<2)return e.error(e,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.illegal_parameter}});var i=t.fragment;i.read-=4;var o=i.bytes();i.read+=4;var s={signature:a(i,2).getBytes()},c=n.util.createBuffer();c.putBuffer(e.session.md5.digest()),c.putBuffer(e.session.sha1.digest()),c=c.getBytes();try{if(!e.session.clientCertificate.publicKey.verify(c,s.signature,"NONE"))throw new Error("CertificateVerify signature does not match.");e.session.md5.update(o),e.session.sha1.update(o)}catch(t){return e.error(e,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.handshake_failure}})}e.expect=w,e.process()},l.handleServerHelloDone=function(e,t,r){if(r>0)return e.error(e,{message:"Invalid ServerHelloDone message. Invalid length.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.record_overflow}});if(null===e.serverCertificate){var i={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.insufficient_security}},o=e.verify(e,i.alert.description,0,[]);if(!0!==o)return(o||0===o)&&("object"!=typeof o||n.util.isArray(o)?"number"==typeof o&&(i.alert.description=o):(o.message&&(i.message=o.message),o.alert&&(i.alert.description=o.alert))),e.error(e,i)}null!==e.session.certificateRequest&&(t=l.createRecord(e,{type:l.ContentType.handshake,data:l.createCertificate(e)}),l.queue(e,t)),t=l.createRecord(e,{type:l.ContentType.handshake,data:l.createClientKeyExchange(e)}),l.queue(e,t),e.expect=y;var s=function(e,t){null!==e.session.certificateRequest&&null!==e.session.clientCertificate&&l.queue(e,l.createRecord(e,{type:l.ContentType.handshake,data:l.createCertificateVerify(e,t)})),l.queue(e,l.createRecord(e,{type:l.ContentType.change_cipher_spec,data:l.createChangeCipherSpec()})),e.state.pending=l.createConnectionState(e),e.state.current.write=e.state.pending.write,l.queue(e,l.createRecord(e,{type:l.ContentType.handshake,data:l.createFinished(e)})),e.expect=f,l.flush(e),e.process()};if(null===e.session.certificateRequest||null===e.session.clientCertificate)return s(e,null);l.getClientSignature(e,s)},l.handleChangeCipherSpec=function(e,t){if(1!==t.fragment.getByte())return e.error(e,{message:"Invalid ChangeCipherSpec message received.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.illegal_parameter}});var r=e.entity===l.ConnectionEnd.client;(e.session.resuming&&r||!e.session.resuming&&!r)&&(e.state.pending=l.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?g:C,e.process()},l.handleFinished=function(e,t,r){var o=t.fragment;o.read-=4;var s=o.bytes();o.read+=4;var a=t.fragment.getBytes();(o=n.util.createBuffer()).putBuffer(e.session.md5.digest()),o.putBuffer(e.session.sha1.digest());var c=e.entity===l.ConnectionEnd.client,u=c?"server finished":"client finished",d=e.session.sp;if((o=i(d.master_secret,u,o.getBytes(),12)).getBytes()!==a)return e.error(e,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.decrypt_error}});e.session.md5.update(s),e.session.sha1.update(s),(e.session.resuming&&c||!e.session.resuming&&!c)&&(l.queue(e,l.createRecord(e,{type:l.ContentType.change_cipher_spec,data:l.createChangeCipherSpec()})),e.state.current.write=e.state.pending.write,e.state.pending=null,l.queue(e,l.createRecord(e,{type:l.ContentType.handshake,data:l.createFinished(e)}))),e.expect=c?m:E,e.handshaking=!1,++e.handshakes,e.peerCertificate=c?e.session.serverCertificate:e.session.clientCertificate,l.flush(e),e.isConnected=!0,e.connected(e),e.process()},l.handleAlert=function(e,t){var r,n=t.fragment,i={level:n.getByte(),description:n.getByte()};switch(i.description){case l.Alert.Description.close_notify:r="Connection closed.";break;case l.Alert.Description.unexpected_message:r="Unexpected message.";break;case l.Alert.Description.bad_record_mac:r="Bad record MAC.";break;case l.Alert.Description.decryption_failed:r="Decryption failed.";break;case l.Alert.Description.record_overflow:r="Record overflow.";break;case l.Alert.Description.decompression_failure:r="Decompression failed.";break;case l.Alert.Description.handshake_failure:r="Handshake failure.";break;case l.Alert.Description.bad_certificate:r="Bad certificate.";break;case l.Alert.Description.unsupported_certificate:r="Unsupported certificate.";break;case l.Alert.Description.certificate_revoked:r="Certificate revoked.";break;case l.Alert.Description.certificate_expired:r="Certificate expired.";break;case l.Alert.Description.certificate_unknown:r="Certificate unknown.";break;case l.Alert.Description.illegal_parameter:r="Illegal parameter.";break;case l.Alert.Description.unknown_ca:r="Unknown certificate authority.";break;case l.Alert.Description.access_denied:r="Access denied.";break;case l.Alert.Description.decode_error:r="Decode error.";break;case l.Alert.Description.decrypt_error:r="Decrypt error.";break;case l.Alert.Description.export_restriction:r="Export restriction.";break;case l.Alert.Description.protocol_version:r="Unsupported protocol version.";break;case l.Alert.Description.insufficient_security:r="Insufficient security.";break;case l.Alert.Description.internal_error:r="Internal error.";break;case l.Alert.Description.user_canceled:r="User canceled.";break;case l.Alert.Description.no_renegotiation:r="Renegotiation not supported.";break;default:r="Unknown error."}if(i.description===l.Alert.Description.close_notify)return e.close();e.error(e,{message:r,send:!1,origin:e.entity===l.ConnectionEnd.client?"server":"client",alert:i}),e.process()},l.handleHandshake=function(e,t){var r=t.fragment,i=r.getByte(),o=r.getInt24();if(o>r.length())return e.fragmented=t,t.fragment=n.util.createBuffer(),r.read-=4,e.process();e.fragmented=null,r.read-=4;var s=r.bytes(o+4);r.read+=4,i in F[e.entity][e.expect]?(e.entity!==l.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:n.md.md5.create(),sha1:n.md.sha1.create()}),i!==l.HandshakeType.hello_request&&i!==l.HandshakeType.certificate_verify&&i!==l.HandshakeType.finished&&(e.session.md5.update(s),e.session.sha1.update(s)),F[e.entity][e.expect][i](e,t,o)):l.handleUnexpected(e,t)},l.handleApplicationData=function(e,t){e.data.putBuffer(t.fragment),e.dataReady(e),e.process()},l.handleHeartbeat=function(e,t){var r=t.fragment,i=r.getByte(),o=r.getInt16(),s=r.getBytes(o);if(i===l.HeartbeatMessageType.heartbeat_request){if(e.handshaking||o>s.length)return e.process();l.queue(e,l.createRecord(e,{type:l.ContentType.heartbeat,data:l.createHeartbeat(l.HeartbeatMessageType.heartbeat_response,s)})),l.flush(e)}else if(i===l.HeartbeatMessageType.heartbeat_response){if(s!==e.expectedHeartbeatPayload)return e.process();e.heartbeatReceived&&e.heartbeatReceived(e,n.util.createBuffer(s))}e.process()};var u=1,d=2,p=3,h=4,f=5,g=6,m=7,y=8,v=1,_=2,b=3,w=4,C=5,E=6,T=l.handleUnexpected,S=l.handleChangeCipherSpec,x=l.handleAlert,k=l.handleHandshake,I=l.handleApplicationData,A=l.handleHeartbeat,P=[];P[l.ConnectionEnd.client]=[[T,x,k,T,A],[T,x,k,T,A],[T,x,k,T,A],[T,x,k,T,A],[T,x,k,T,A],[S,x,T,T,A],[T,x,k,T,A],[T,x,k,I,A],[T,x,k,T,A]],P[l.ConnectionEnd.server]=[[T,x,k,T,A],[T,x,k,T,A],[T,x,k,T,A],[T,x,k,T,A],[S,x,T,T,A],[T,x,k,T,A],[T,x,k,I,A],[T,x,k,T,A]];var R=l.handleHelloRequest,N=l.handleServerHello,O=l.handleCertificate,D=l.handleServerKeyExchange,L=l.handleCertificateRequest,M=l.handleServerHelloDone,B=l.handleFinished,F=[];F[l.ConnectionEnd.client]=[[T,T,N,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T],[R,T,T,T,T,T,T,T,T,T,T,O,D,L,M,T,T,T,T,T,T],[R,T,T,T,T,T,T,T,T,T,T,T,D,L,M,T,T,T,T,T,T],[R,T,T,T,T,T,T,T,T,T,T,T,T,L,M,T,T,T,T,T,T],[R,T,T,T,T,T,T,T,T,T,T,T,T,T,M,T,T,T,T,T,T],[R,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T],[R,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,B],[R,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T],[R,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T]];var j=l.handleClientHello,U=l.handleClientKeyExchange,$=l.handleCertificateVerify;F[l.ConnectionEnd.server]=[[T,j,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T],[T,T,T,T,T,T,T,T,T,T,T,O,T,T,T,T,T,T,T,T,T],[T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,U,T,T,T,T],[T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,$,T,T,T,T,T],[T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T],[T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,B],[T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T],[T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T]],l.generateKeys=function(e,t){var r=i,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 o=2*t.mac_key_length+2*t.enc_key_length,s=e.version.major===l.Versions.TLS_1_0.major&&e.version.minor===l.Versions.TLS_1_0.minor;s&&(o+=2*t.fixed_iv_length);var a=r(t.master_secret,"key expansion",n,o),c={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 s&&(c.client_write_IV=a.getBytes(t.fixed_iv_length),c.server_write_IV=a.getBytes(t.fixed_iv_length)),c},l.createConnectionState=function(e){var t=e.entity===l.ConnectionEnd.client,r=function(){var e={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,cipherState:null,cipherFunction:function(e){return!0},compressionState:null,compressFunction:function(e){return!0},updateSequenceNumber:function(){4294967295===e.sequenceNumber[1]?(e.sequenceNumber[1]=0,++e.sequenceNumber[0]):++e.sequenceNumber[1]}};return e},n={read:r(),write:r()};if(n.read.update=function(e,t){return n.read.cipherFunction(t,n.read)?n.read.compressFunction(e,t,n.read)||e.error(e,{message:"Could not decompress record.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.decompression_failure}}):e.error(e,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.bad_record_mac}}),!e.fail},n.write.update=function(e,t){return n.write.compressFunction(e,t,n.write)?n.write.cipherFunction(t,n.write)||e.error(e,{message:"Could not encrypt record.",send:!1,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.internal_error}}):e.error(e,{message:"Could not compress record.",send:!1,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.internal_error}}),!e.fail},e.session){var i=e.session.sp;switch(e.session.cipherSuite.initSecurityParameters(i),i.keys=l.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 l.CompressionMethod.none:break;case l.CompressionMethod.deflate:n.read.compressFunction=s,n.write.compressFunction=o;break;default:throw new Error("Unsupported compression algorithm.")}}return n},l.createRandom=function(){var e=new Date,t=+e+6e4*e.getTimezoneOffset(),r=n.util.createBuffer();return r.putInt32(t),r.putBytes(n.random.getBytes(28)),r},l.createRecord=function(e,t){return t.data?{type:t.type,version:{major:e.version.major,minor:e.version.minor},length:t.data.length(),fragment:t.data}:null},l.createAlert=function(e,t){var r=n.util.createBuffer();return r.putByte(t.level),r.putByte(t.description),l.createRecord(e,{type:l.ContentType.alert,data:r})},l.createClientHello=function(e){e.session.clientHelloVersion={major:e.version.major,minor:e.version.minor};for(var t=n.util.createBuffer(),r=0;r0&&(f+=2);var g=e.session.id,m=g.length+1+2+4+28+2+o+1+a+f,y=n.util.createBuffer();return y.putByte(l.HandshakeType.client_hello),y.putInt24(m),y.putByte(e.version.major),y.putByte(e.version.minor),y.putBytes(e.session.sp.client_random),c(y,1,n.util.createBuffer(g)),c(y,2,t),c(y,1,s),f>0&&c(y,2,u),y},l.createServerHello=function(e){var t=e.session.id,r=t.length+1+2+4+28+2+1,i=n.util.createBuffer();return i.putByte(l.HandshakeType.server_hello),i.putInt24(r),i.putByte(e.version.major),i.putByte(e.version.minor),i.putBytes(e.session.sp.server_random),c(i,1,n.util.createBuffer(t)),i.putByte(e.session.cipherSuite.id[0]),i.putByte(e.session.cipherSuite.id[1]),i.putByte(e.session.compressionMethod),i},l.createCertificate=function(e){var t,r=e.entity===l.ConnectionEnd.client,i=null;e.getCertificate&&(t=r?e.session.certificateRequest:e.session.extensions.server_name.serverNameList,i=e.getCertificate(e,t));var o=n.util.createBuffer();if(null!==i)try{n.util.isArray(i)||(i=[i]);for(var s=null,a=0;al.MaxFragment;)i.push(l.createRecord(e,{type:t.type,data:n.util.createBuffer(o.slice(0,l.MaxFragment))})),o=o.slice(l.MaxFragment);o.length>0&&i.push(l.createRecord(e,{type:t.type,data:n.util.createBuffer(o)}))}for(var s=0;s0&&(i=r.order[0]),null!==i&&i in r.cache)for(var o in t=r.cache[i],delete r.cache[i],r.order)if(r.order[o]===i){r.order.splice(o,1);break}return t},r.setSession=function(e,t){if(r.order.length===r.capacity){var i=r.order.shift();delete r.cache[i]}i=n.util.bytesToHex(e),r.order.push(i),r.cache[i]=t}}return r},l.createConnection=function(e){var t;t=e.caStore?n.util.isArray(e.caStore)?n.pki.createCaStore(e.caStore):e.caStore:n.pki.createCaStore();var r=e.cipherSuites||null;if(null===r)for(var i in r=[],l.CipherSuites)r.push(l.CipherSuites[i]);var o=e.server?l.ConnectionEnd.server:l.ConnectionEnd.client,s=e.sessionCache?l.createSessionCache(e.sessionCache):null,a={version:{major:l.Version.major,minor:l.Version.minor},entity:o,sessionId:e.sessionId,caStore:t,sessionCache:s,cipherSuites:r,connected:e.connected,virtualHost:e.virtualHost||null,verifyClient:e.verifyClient||!1,verify:e.verify||function(e,t,r,n){return t},verifyOptions:e.verifyOptions||{},getCertificate:e.getCertificate||null,getPrivateKey:e.getPrivateKey||null,getSignature:e.getSignature||null,input:n.util.createBuffer(),tlsData:n.util.createBuffer(),data:n.util.createBuffer(),tlsDataReady:e.tlsDataReady,dataReady:e.dataReady,heartbeatReceived:e.heartbeatReceived,closed:e.closed,error:function(t,r){r.origin=r.origin||(t.entity===l.ConnectionEnd.client?"client":"server"),r.send&&(l.queue(t,l.createAlert(t,r.alert)),l.flush(t));var n=!1!==r.fatal;n&&(t.fail=!0),e.error(t,r),n&&t.close(!1)},deflate:e.deflate||null,inflate:e.inflate||null,reset:function(e){a.version={major:l.Version.major,minor:l.Version.minor},a.record=null,a.session=null,a.peerCertificate=null,a.state={pending:null,current:null},a.expect=(a.entity,l.ConnectionEnd.client,0),a.fragmented=null,a.records=[],a.open=!1,a.handshakes=0,a.handshaking=!1,a.isConnected=!1,a.fail=!(e||void 0===e),a.input.clear(),a.tlsData.clear(),a.data.clear(),a.state.current=l.createConnectionState(a)}};return a.reset(),a.handshake=function(e){if(a.entity!==l.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&&0===a.handshakes&&(a.fail=!1),a.handshaking=!0;var t=null;(e=e||"").length>0&&(a.sessionCache&&(t=a.sessionCache.getSession(e)),null===t&&(e="")),0===e.length&&a.sessionCache&&null!==(t=a.sessionCache.getSession())&&(e=t.id),a.session={id:e,version:null,cipherSuite:null,compressionMethod:null,serverCertificate:null,certificateRequest:null,clientCertificate:null,sp:{},md5:n.md.md5.create(),sha1:n.md.sha1.create()},t&&(a.version=t.version,a.session.sp=t.sp),a.session.sp.client_random=l.createRandom().getBytes(),a.open=!0,l.queue(a,l.createRecord(a,{type:l.ContentType.handshake,data:l.createClientHello(a)})),l.flush(a)}},a.process=function(e){var t=0;return e&&a.input.putBytes(e),a.fail||(null!==a.record&&a.record.ready&&a.record.fragment.isEmpty()&&(a.record=null),null===a.record&&(t=function(e){var t=0,r=e.input,i=r.length();if(i<5)t=5-i;else{e.record={type:r.getByte(),version:{major:r.getByte(),minor:r.getByte()},length:r.getInt16(),fragment:n.util.createBuffer(),ready:!1};var o=e.record.version.major===e.version.major;o&&e.session&&e.session.version&&(o=e.record.version.minor===e.version.minor),o||e.error(e,{message:"Incompatible TLS version.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.protocol_version}})}return t}(a)),a.fail||null===a.record||a.record.ready||(t=function(e){var t=0,r=e.input,n=r.length();return n{var n=r(56105),i=r(36147),o=e.exports=n.util=n.util||{};function s(e){if(8!==e&&16!==e&&24!==e&&32!==e)throw new Error("Only 8, 16, 24, or 32 bits supported: "+e)}function a(e){if(this.data="",this.read=0,"string"==typeof e)this.data=e;else if(o.isArrayBuffer(e)||o.isArrayBufferView(e))if("undefined"!=typeof Buffer&&e instanceof Buffer)this.data=e.toString("binary");else{var t=new Uint8Array(e);try{this.data=String.fromCharCode.apply(null,t)}catch(e){for(var r=0;r15?(r=Date.now(),s(e)):(t.push(e),1===t.length&&i.setAttribute("a",n=!n))}}o.nextTick=o.setImmediate}(),o.isNodejs="undefined"!=typeof process&&process.versions&&process.versions.node,o.globalScope=o.isNodejs?global:"undefined"==typeof self?window:self,o.isArray=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},o.isArrayBuffer=function(e){return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer},o.isArrayBufferView=function(e){return e&&o.isArrayBuffer(e.buffer)&&void 0!==e.byteLength},o.ByteBuffer=a,o.ByteStringBuffer=a,o.ByteStringBuffer.prototype._optimizeConstructedString=function(e){this._constructedStringLength+=e,this._constructedStringLength>4096&&(this.data.substr(0,1),this._constructedStringLength=0)},o.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read},o.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0},o.ByteStringBuffer.prototype.putByte=function(e){return this.putBytes(String.fromCharCode(e))},o.ByteStringBuffer.prototype.fillWithByte=function(e,t){e=String.fromCharCode(e);for(var r=this.data;t>0;)1&t&&(r+=e),(t>>>=1)>0&&(e+=e);return this.data=r,this._optimizeConstructedString(t),this},o.ByteStringBuffer.prototype.putBytes=function(e){return this.data+=e,this._optimizeConstructedString(e.length),this},o.ByteStringBuffer.prototype.putString=function(e){return this.putBytes(o.encodeUtf8(e))},o.ByteStringBuffer.prototype.putInt16=function(e){return this.putBytes(String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},o.ByteStringBuffer.prototype.putInt24=function(e){return this.putBytes(String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},o.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(255&e))},o.ByteStringBuffer.prototype.putInt16Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255))},o.ByteStringBuffer.prototype.putInt24Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255))},o.ByteStringBuffer.prototype.putInt32Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>24&255))},o.ByteStringBuffer.prototype.putInt=function(e,t){s(t);var r="";do{t-=8,r+=String.fromCharCode(e>>t&255)}while(t>0);return this.putBytes(r)},o.ByteStringBuffer.prototype.putSignedInt=function(e,t){return e<0&&(e+=2<0);return t},o.ByteStringBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),r=2<=r&&(t-=r<<1),t},o.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):0===e?t="":(t=0===this.read?this.data:this.data.slice(this.read),this.clear()),t},o.ByteStringBuffer.prototype.bytes=function(e){return void 0===e?this.data.slice(this.read):this.data.slice(this.read,this.read+e)},o.ByteStringBuffer.prototype.at=function(e){return this.data.charCodeAt(this.read+e)},o.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},o.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)},o.ByteStringBuffer.prototype.copy=function(){var e=o.createBuffer(this.data);return e.read=this.read,e},o.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this},o.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this},o.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},o.ByteStringBuffer.prototype.toHex=function(){for(var e="",t=this.read;t=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},o.DataBuffer.prototype.putByte=function(e){return this.accommodate(1),this.data.setUint8(this.write++,e),this},o.DataBuffer.prototype.fillWithByte=function(e,t){this.accommodate(t);for(var r=0;r>8&65535),this.data.setInt8(this.write,e>>16&255),this.write+=3,this},o.DataBuffer.prototype.putInt32=function(e){return this.accommodate(4),this.data.setInt32(this.write,e),this.write+=4,this},o.DataBuffer.prototype.putInt16Le=function(e){return this.accommodate(2),this.data.setInt16(this.write,e,!0),this.write+=2,this},o.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},o.DataBuffer.prototype.putInt32Le=function(e){return this.accommodate(4),this.data.setInt32(this.write,e,!0),this.write+=4,this},o.DataBuffer.prototype.putInt=function(e,t){s(t),this.accommodate(t/8);do{t-=8,this.data.setInt8(this.write++,e>>t&255)}while(t>0);return this},o.DataBuffer.prototype.putSignedInt=function(e,t){return s(t),this.accommodate(t/8),e<0&&(e+=2<0);return t},o.DataBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),r=2<=r&&(t-=r<<1),t},o.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):0===e?t="":(t=0===this.read?this.data:this.data.slice(this.read),this.clear()),t},o.DataBuffer.prototype.bytes=function(e){return void 0===e?this.data.slice(this.read):this.data.slice(this.read,this.read+e)},o.DataBuffer.prototype.at=function(e){return this.data.getUint8(this.read+e)},o.DataBuffer.prototype.setAt=function(e,t){return this.data.setUint8(e,t),this},o.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)},o.DataBuffer.prototype.copy=function(){return new o.DataBuffer(this)},o.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},o.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this},o.DataBuffer.prototype.truncate=function(e){return this.write=Math.max(0,this.length()-e),this.read=Math.min(this.read,this.write),this},o.DataBuffer.prototype.toHex=function(){for(var e="",t=this.read;t0;)1&t&&(r+=e),(t>>>=1)>0&&(e+=e);return r},o.xorBytes=function(e,t,r){for(var n="",i="",o="",s=0,a=0;r>0;--r,++s)i=e.charCodeAt(s)^t.charCodeAt(s),a>=10&&(n+=o,o="",a=0),o+=String.fromCharCode(i),++a;return n+o},o.hexToBytes=function(e){var t="",r=0;for(!0&e.length&&(r=1,t+=String.fromCharCode(parseInt(e[0],16)));r>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e)};var c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l=[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],u="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";o.encode64=function(e,t){for(var r,n,i,o="",s="",a=0;a>2),o+=c.charAt((3&r)<<4|n>>4),isNaN(n)?o+="==":(o+=c.charAt((15&n)<<2|i>>6),o+=isNaN(i)?"=":c.charAt(63&i)),t&&o.length>t&&(s+=o.substr(0,t)+"\r\n",o=o.substr(t));return s+o},o.decode64=function(e){e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var t,r,n,i,o="",s=0;s>4),64!==n&&(o+=String.fromCharCode((15&r)<<4|n>>2),64!==i&&(o+=String.fromCharCode((3&n)<<6|i)));return o},o.encodeUtf8=function(e){return unescape(encodeURIComponent(e))},o.decodeUtf8=function(e){return decodeURIComponent(escape(e))},o.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:i.encode,decode:i.decode}},o.binary.raw.encode=function(e){return String.fromCharCode.apply(null,e)},o.binary.raw.decode=function(e,t,r){var n=t;n||(n=new Uint8Array(e.length));for(var i=r=r||0,o=0;o>2),o+=c.charAt((3&r)<<4|n>>4),isNaN(n)?o+="==":(o+=c.charAt((15&n)<<2|i>>6),o+=isNaN(i)?"=":c.charAt(63&i)),t&&o.length>t&&(s+=o.substr(0,t)+"\r\n",o=o.substr(t));return s+o},o.binary.base64.decode=function(e,t,r){var n,i,o,s,a=t;a||(a=new Uint8Array(3*Math.ceil(e.length/4))),e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var c=0,u=r=r||0;c>4,64!==o&&(a[u++]=(15&i)<<4|o>>2,64!==s&&(a[u++]=(3&o)<<6|s));return t?u-r:a.subarray(0,u)},o.binary.base58.encode=function(e,t){return o.binary.baseN.encode(e,u,t)},o.binary.base58.decode=function(e,t){return o.binary.baseN.decode(e,u,t)},o.text={utf8:{},utf16:{}},o.text.utf8.encode=function(e,t,r){e=o.encodeUtf8(e);var n=t;n||(n=new Uint8Array(e.length));for(var i=r=r||0,s=0;s0&&o.push(r),s=n.lastIndex;var a=t[0][1];switch(a){case"s":case"o":i");break;case"%":o.push("%");break;default:o.push("<%"+a+"?>")}}return o.push(e.substring(s)),o.join("")},o.formatNumber=function(e,t,r,n){var i=e,o=isNaN(t=Math.abs(t))?2:t,s=void 0===r?",":r,a=void 0===n?".":n,c=i<0?"-":"",l=parseInt(i=Math.abs(+i||0).toFixed(o),10)+"",u=l.length>3?l.length%3:0;return c+(u?l.substr(0,u)+a:"")+l.substr(u).replace(/(\d{3})(?=\d)/g,"$1"+a)+(o?s+Math.abs(i-l).toFixed(o).slice(2):"")},o.formatSize=function(e){return e>=1073741824?o.formatNumber(e/1073741824,2,".","")+" GiB":e>=1048576?o.formatNumber(e/1048576,2,".","")+" MiB":e>=1024?o.formatNumber(e/1024,0)+" KiB":o.formatNumber(e,0)+" bytes"},o.bytesFromIP=function(e){return-1!==e.indexOf(".")?o.bytesFromIPv4(e):-1!==e.indexOf(":")?o.bytesFromIPv6(e):null},o.bytesFromIPv4=function(e){if(4!==(e=e.split(".")).length)return null;for(var t=o.createBuffer(),r=0;rr[n].end-r[n].start&&(n=r.length-1)):r.push({start:c,end:c})}t.push(s)}if(r.length>0){var l=r[n];l.end-l.start>0&&(t.splice(l.start,l.end-l.start+1,""),0===l.start&&t.unshift(""),7===l.end&&t.push(""))}return t.join(":")},o.estimateCores=function(e,t){if("function"==typeof e&&(t=e,e={}),e=e||{},"cores"in o&&!e.update)return t(null,o.cores);if("undefined"!=typeof navigator&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return o.cores=navigator.hardwareConcurrency,t(null,o.cores);if("undefined"==typeof Worker)return o.cores=1,t(null,o.cores);if("undefined"==typeof Blob)return o.cores=2,t(null,o.cores);var r=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",(function(e){for(var t=Date.now(),r=t+4;Date.now()a.st&&i.sti.st&&a.st{var n=r(56105);r(60070),r(61057),r(62148),r(91183),r(9370),r(81877),r(25661),r(51242),r(69597),r(56827);var i=n.asn1,o=e.exports=n.pki=n.pki||{},s=o.oids,a={};a.CN=s.commonName,a.commonName="CN",a.C=s.countryName,a.countryName="C",a.L=s.localityName,a.localityName="L",a.ST=s.stateOrProvinceName,a.stateOrProvinceName="ST",a.O=s.organizationName,a.organizationName="O",a.OU=s.organizationalUnitName,a.organizationalUnitName="OU",a.E=s.emailAddress,a.emailAddress="E";var c=n.pki.rsa.publicKeyValidator,l={name:"Certificate",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:i.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:i.Class.UNIVERSAL,type:i.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:i.Class.UNIVERSAL,type:i.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:i.Class.UNIVERSAL,type:i.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:i.Class.UNIVERSAL,type:i.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},c,{name:"Certificate.TBSCertificate.issuerUniqueID",tagClass:i.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:i.Class.UNIVERSAL,type:i.Type.BITSTRING,constructed:!1,captureBitStringValue:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:i.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:i.Class.UNIVERSAL,type:i.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSubjectUniqueId"}]},{name:"Certificate.TBSCertificate.extensions",tagClass:i.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:i.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},{name:"Certificate.signatureValue",tagClass:i.Class.UNIVERSAL,type:i.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSignature"}]},u={name:"rsapss",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:i.Class.UNIVERSAL,type:i.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:i.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:i.Class.UNIVERSAL,type:i.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:i.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:i.Class.UNIVERSAL,type:i.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:i.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",tagClass:i.Class.UNIVERSAL,type:i.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},d={name:"CertificationRequestInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},c,{name:"CertificationRequestInfo.attributes",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0}]}]}]},p={name:"CertificationRequest",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[d,{name:"CertificationRequest.signatureAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:i.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:i.Class.UNIVERSAL,type:i.Type.BITSTRING,constructed:!1,captureBitStringValue:"csrSignature"}]};function h(e,t){"string"==typeof t&&(t={shortName:t});for(var r,n=null,i=0;null===n&&i128)throw new Error('Invalid "nsComment" content.');e.value=i.create(i.Class.UNIVERSAL,i.Type.IA5STRING,!1,e.comment)}else if("subjectKeyIdentifier"===e.name&&t.cert){var h=t.cert.generateSubjectKeyIdentifier();e.subjectKeyIdentifier=h.toHex(),e.value=i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,h.getBytes())}else if("authorityKeyIdentifier"===e.name&&t.cert){if(e.value=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]),u=e.value.value,e.keyIdentifier){var f=!0===e.keyIdentifier?t.cert.generateSubjectKeyIdentifier().getBytes():e.keyIdentifier;u.push(i.create(i.Class.CONTEXT_SPECIFIC,0,!1,f))}if(e.authorityCertIssuer){var g=[i.create(i.Class.CONTEXT_SPECIFIC,4,!0,[y(!0===e.authorityCertIssuer?t.cert.issuer:e.authorityCertIssuer)])];u.push(i.create(i.Class.CONTEXT_SPECIFIC,1,!0,g))}if(e.serialNumber){var m=n.util.hexToBytes(!0===e.serialNumber?t.cert.serialNumber:e.serialNumber);u.push(i.create(i.Class.CONTEXT_SPECIFIC,2,!1,m))}}else if("cRLDistributionPoints"===e.name){e.value=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]),u=e.value.value;var v,_=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]),b=i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[]);for(p=0;p2)throw new Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(d.length<2)throw new Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");if(c.validity.notBefore=d[0],c.validity.notAfter=d[1],c.tbsCertificate=r.tbsCertificate,t){c.md=g({signatureOid:c.signatureOid,type:"certificate"});var p=i.toDer(c.tbsCertificate);c.md.update(p.getBytes())}var m=n.md.sha1.create(),y=i.toDer(r.certIssuer);m.update(y.getBytes()),c.issuer.getField=function(e){return h(c.issuer,e)},c.issuer.addField=function(e){v([e]),c.issuer.attributes.push(e)},c.issuer.attributes=o.RDNAttributesAsArray(r.certIssuer),r.certIssuerUniqueId&&(c.issuer.uniqueId=r.certIssuerUniqueId),c.issuer.hash=m.digest().toHex();var _=n.md.sha1.create(),b=i.toDer(r.certSubject);return _.update(b.getBytes()),c.subject.getField=function(e){return h(c.subject,e)},c.subject.addField=function(e){v([e]),c.subject.attributes.push(e)},c.subject.attributes=o.RDNAttributesAsArray(r.certSubject),r.certSubjectUniqueId&&(c.subject.uniqueId=r.certSubjectUniqueId),c.subject.hash=_.digest().toHex(),r.certExtensions?c.extensions=o.certificateExtensionsFromAsn1(r.certExtensions):c.extensions=[],c.publicKey=o.publicKeyFromAsn1(r.subjectPublicKeyInfo),c},o.certificateExtensionsFromAsn1=function(e){for(var t=[],r=0;r1&&(r=c.value.charCodeAt(1),o=c.value.length>2?c.value.charCodeAt(2):0),t.digitalSignature=128==(128&r),t.nonRepudiation=64==(64&r),t.keyEncipherment=32==(32&r),t.dataEncipherment=16==(16&r),t.keyAgreement=8==(8&r),t.keyCertSign=4==(4&r),t.cRLSign=2==(2&r),t.encipherOnly=1==(1&r),t.decipherOnly=128==(128&o)}else if("basicConstraints"===t.name){(c=i.fromDer(t.value)).value.length>0&&c.value[0].type===i.Type.BOOLEAN?t.cA=0!==c.value[0].value.charCodeAt(0):t.cA=!1;var a=null;c.value.length>0&&c.value[0].type===i.Type.INTEGER?a=c.value[0].value:c.value.length>1&&(a=c.value[1].value),null!==a&&(t.pathLenConstraint=i.derToInteger(a))}else if("extKeyUsage"===t.name)for(var c=i.fromDer(t.value),l=0;l1&&(r=c.value.charCodeAt(1)),t.client=128==(128&r),t.server=64==(64&r),t.email=32==(32&r),t.objsign=16==(16&r),t.reserved=8==(8&r),t.sslCA=4==(4&r),t.emailCA=2==(2&r),t.objCA=1==(1&r);else if("subjectAltName"===t.name||"issuerAltName"===t.name){var d;t.altNames=[],c=i.fromDer(t.value);for(var p=0;p=C&&e0&&s.value.push(o.certificateExtensionsToAsn1(e.extensions)),s},o.getCertificationRequestInfo=function(e){return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(e.version).getBytes()),y(e.subject),o.publicKeyToAsn1(e.publicKey),w(e)])},o.distinguishedNameToAsn1=function(e){return y(e)},o.certificateToAsn1=function(e){var t=e.tbsCertificate||o.getTBSCertificate(e);return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[t,i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.signatureOid).getBytes()),b(e.signatureOid,e.signatureParameters)]),i.create(i.Class.UNIVERSAL,i.Type.BITSTRING,!1,String.fromCharCode(0)+e.signature)])},o.certificateExtensionsToAsn1=function(e){var t=i.create(i.Class.CONTEXT_SPECIFIC,3,!0,[]),r=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]);t.value.push(r);for(var n=0;nu.validity.notAfter)&&(c={message:"Certificate is not valid yet or has expired.",error:o.certificateError.certificate_expired,notBefore:u.validity.notBefore,notAfter:u.validity.notAfter,now:s}),null===c){if(null===(d=t[0]||e.getIssuer(u))&&u.isIssuer(u)&&(p=!0,d=u),d){var h=d;n.util.isArray(h)||(h=[h]);for(var f=!1;!f&&h.length>0;){d=h.shift();try{f=d.verify(u)}catch(e){}}f||(c={message:"Certificate signature is invalid.",error:o.certificateError.bad_certificate})}null!==c||d&&!p||e.hasCertificate(u)||(c={message:"Certificate is not trusted.",error:o.certificateError.unknown_ca})}if(null===c&&d&&!u.isIssuer(d)&&(c={message:"Certificate issuer is invalid.",error:o.certificateError.bad_certificate}),null===c)for(var g={keyUsage:!0,basicConstraints:!0},m=0;null===c&&mv.pathLenConstraint&&(c={message:"Certificate basicConstraints pathLenConstraint violated.",error:o.certificateError.bad_certificate})}var b=null===c||c.error,w=r.verify?r.verify(b,l,i):b;if(!0!==w)throw!0===b&&(c={message:"The application rejected the certificate.",error:o.certificateError.bad_certificate}),(w||0===w)&&("object"!=typeof w||n.util.isArray(w)?"string"==typeof w&&(c.error=w):(w.message&&(c.message=w.message),w.error&&(c.error=w.error))),c;c=null,a=!1,++l}while(t.length>0);return!0}},31814:(e,t,r)=>{const n=r(71017),i=r(32081),{promises:o,constants:s}=r(57147),a=r(67684),c=r(67546),l=r(71321),u=n.join(__dirname,"xdg-open"),{platform:d,arch:p}=process,h=(()=>{const e="/mnt/";let t;return async function(){if(t)return t;const r="/etc/wsl.conf";let n=!1;try{await o.access(r,s.F_OK),n=!0}catch{}if(!n)return e;const i=await o.readFile(r,{encoding:"utf8"}),a=/(?.*)/g.exec(i);return a?(t=a.groups.mountPoint.trim(),t=t.endsWith("/")?t:`${t}/`,t):e}})(),f=async(e,t)=>{let r;for(const n of e)try{return await t(n)}catch(e){r=e}throw r},g=async e=>{if(e={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...e},Array.isArray(e.app))return f(e.app,(t=>g({...e,app:t})));let t,{name:r,arguments:n=[]}=e.app||{};if(n=[...n],Array.isArray(r))return f(r,(t=>g({...e,app:{name:t,arguments:n}})));const l=[],p={};if("darwin"===d)t="open",e.wait&&l.push("--wait-apps"),e.background&&l.push("--background"),e.newInstance&&l.push("--new"),r&&l.push("-a",r);else if("win32"===d||a&&!c()){const i=await h();t=a?`${i}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`:`${process.env.SYSTEMROOT}\\System32\\WindowsPowerShell\\v1.0\\powershell`,l.push("-NoProfile","-NonInteractive","–ExecutionPolicy","Bypass","-EncodedCommand"),a||(p.windowsVerbatimArguments=!0);const o=["Start"];e.wait&&o.push("-Wait"),r?(o.push(`"\`"${r}\`""`,"-ArgumentList"),e.target&&n.unshift(e.target)):e.target&&o.push(`"${e.target}"`),n.length>0&&(n=n.map((e=>`"\`"${e}\`""`)),o.push(n.join(","))),e.target=Buffer.from(o.join(" "),"utf16le").toString("base64")}else{if(r)t=r;else{const e="/"===__dirname;let r=!1;try{await o.access(u,s.X_OK),r=!0}catch{}t=process.versions.electron||"android"===d||e||!r?"xdg-open":u}n.length>0&&l.push(...n),e.wait||(p.stdio="ignore",p.detached=!0)}e.target&&l.push(e.target),"darwin"===d&&n.length>0&&l.push("--args",...n);const m=i.spawn(t,l,p);return e.wait?new Promise(((t,r)=>{m.once("error",r),m.once("close",(n=>{e.allowNonzeroExitCode&&n>0?r(new Error(`Exited with code ${n}`)):t(m)}))})):(m.unref(),m)},m=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a `target`");return g({...t,target:e})};function y(e){if("string"==typeof e||Array.isArray(e))return e;const{[p]:t}=e;if(!t)throw new Error(`${p} is not supported`);return t}function v({[d]:e},{wsl:t}){if(t&&a)return y(t);if(!e)throw new Error(`${d} is not supported`);return y(e)}const _={};l(_,"chrome",(()=>v({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"]}}))),l(_,"firefox",(()=>v({darwin:"firefox",win32:"C:\\Program Files\\Mozilla Firefox\\firefox.exe",linux:"firefox"},{wsl:"/mnt/c/Program Files/Mozilla Firefox/firefox.exe"}))),l(_,"edge",(()=>v({darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]},{wsl:"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"}))),m.apps=_,m.openApp=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a `name`");const{arguments:r=[]}=t||{};if(null!=r&&!Array.isArray(r))throw new TypeError("Expected `appArguments` as Array type");return g({...t,app:{name:e,arguments:r}})},e.exports=m},71756:(e,t,r)=>{"use strict";var n=r(38173);e.exports=function(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=n(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(r){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}},91320:(e,t,r)=>{"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=n(r(71756));const o=(e,t)=>t.some((t=>t instanceof RegExp?t.test(e):t===e));const s=(e,t=!1)=>{const r=/^(?:([a-z_][a-z0-9_-]{0,31})@|https?:\/\/)([\w\.\-@]+)[\/:]([\~,\.\w,\-,\_,\/]+?(?:\.git|\/)?)$/,n=t=>{const r=new Error(t);throw r.subject_url=e,r};"string"==typeof e&&e.trim()||n("Invalid url."),e.length>s.MAX_INPUT_LENGTH&&n("Input exceeds maximum length. If needed, change the value of parseUrl.MAX_INPUT_LENGTH."),t&&("object"!=typeof t&&(t={stripHash:!1}),e=function(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((e,{stripHash:t})=>{const r=/^data:(?[^,]*?),(?[^#]*?)(?:#(?.*))?$/.exec(e);if(!r)throw new Error(`Invalid URL: ${e}`);let{type:n,data:i,hash:o}=r.groups;const s=n.split(";");o=t?"":o;let a=!1;"base64"===s[s.length-1]&&(s.pop(),a=!0);const c=(s.shift()||"").toLowerCase(),l=[...s.map((e=>{let[t,r=""]=e.split("=").map((e=>e.trim()));return"charset"===t&&(r=r.toLowerCase(),"us-ascii"===r)?"":`${t}${r?`=${r}`:""}`})).filter(Boolean)];return a&&l.push("base64"),(l.length>0||c&&"text/plain"!==c)&&l.unshift(c),`data:${l.join(";")},${a?i.trim():i}${o?`#${o}`:""}`})(e,t);if(/^view-source:/i.test(e))throw new Error("`view-source:` is not supported as it is a non-standard protocol");const r=e.startsWith("//");!r&&/^\.*\//.test(e)||(e=e.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,t.defaultProtocol));const n=new URL(e);if(t.forceHttp&&t.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(t.forceHttp&&"https:"===n.protocol&&(n.protocol="http:"),t.forceHttps&&"http:"===n.protocol&&(n.protocol="https:"),t.stripAuthentication&&(n.username="",n.password=""),t.stripHash?n.hash="":t.stripTextFragment&&(n.hash=n.hash.replace(/#?:~:text.*?$/i,"")),n.pathname){const e=/\b[a-z][a-z\d+\-.]{1,50}:\/\//g;let t=0,r="";for(;;){const i=e.exec(n.pathname);if(!i)break;const o=i[0],s=i.index;r+=n.pathname.slice(t,s).replace(/\/{2,}/g,"/"),r+=o,t=s+o.length}r+=n.pathname.slice(t,n.pathname.length).replace(/\/{2,}/g,"/"),n.pathname=r}if(n.pathname)try{n.pathname=decodeURI(n.pathname)}catch{}if(!0===t.removeDirectoryIndex&&(t.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(t.removeDirectoryIndex)&&t.removeDirectoryIndex.length>0){let e=n.pathname.split("/");const r=e[e.length-1];o(r,t.removeDirectoryIndex)&&(e=e.slice(0,-1),n.pathname=e.slice(1).join("/")+"/")}if(n.hostname&&(n.hostname=n.hostname.replace(/\.$/,""),t.stripWWW&&/^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(n.hostname)&&(n.hostname=n.hostname.replace(/^www\./,""))),Array.isArray(t.removeQueryParameters))for(const e of[...n.searchParams.keys()])o(e,t.removeQueryParameters)&&n.searchParams.delete(e);if(!0===t.removeQueryParameters&&(n.search=""),t.sortQueryParameters){n.searchParams.sort();try{n.search=decodeURIComponent(n.search)}catch{}}t.removeTrailingSlash&&(n.pathname=n.pathname.replace(/\/$/,""));const i=e;return e=n.toString(),t.removeSingleSlash||"/"!==n.pathname||i.endsWith("/")||""!==n.hash||(e=e.replace(/\/$/,"")),(t.removeTrailingSlash||"/"===n.pathname)&&""===n.hash&&t.removeSingleSlash&&(e=e.replace(/\/$/,"")),r&&!t.normalizeProtocol&&(e=e.replace(/^http:\/\//,"//")),t.stripProtocol&&(e=e.replace(/^(?:https?:)?\/\//,"")),e}(e,t));const a=i.default(e);if(a.parse_failed){const e=a.href.match(r);e?(a.protocols=["ssh"],a.protocol="ssh",a.resource=e[2],a.host=e[2],a.user=e[1],a.pathname=`/${e[3]}`,a.parse_failed=!1):n("URL parsing failed.")}return a};s.MAX_INPUT_LENGTH=2048,e.exports=s},55575:e=>{"use strict";const t=(e,t)=>function(){const r=t.promiseModule,n=new Array(arguments.length);for(let e=0;e{t.errorFirst?n.push((function(e,n){if(t.multiArgs){const t=new Array(arguments.length-1);for(let e=1;e{r=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},r);const n=e=>{const t=t=>"string"==typeof t?e===t:t.test(e);return r.include?r.include.some(t):!r.exclude.some(t)};let i;i="function"==typeof e?function(){return r.excludeMain?e.apply(this,arguments):t(e,r).apply(this,arguments)}:Object.create(Object.getPrototypeOf(e));for(const o in e){const s=e[o];i[o]="function"==typeof s&&n(o)?t(s,r):s}return i}},38173:e=>{"use strict";e.exports=function(e,t){!0===t&&(t=0);var r="";if("string"==typeof e)try{r=new URL(e).protocol}catch(e){}else e&&e.constructor===URL&&(r=e.protocol);var n=r.split(/\:|\+/).filter(Boolean);return"number"==typeof t?n[t]:n}},94403:e=>{"use strict";function t(e){return"function"==typeof e}var r=console.error.bind(console);function n(e,t,r){var n=!!e[t]&&e.propertyIsEnumerable(t);Object.defineProperty(e,t,{configurable:!0,enumerable:n,writable:!0,value:r})}function i(e){e&&e.logger&&(t(e.logger)?r=e.logger:r("new logger isn't a function, not replacing"))}function o(e,i,o){if(e&&e[i]){if(!o)return r("no wrapper function"),void r((new Error).stack);if(t(e[i])&&t(o)){var s=e[i],a=o(s,i);return n(a,"__original",s),n(a,"__unwrap",(function(){e[i]===a&&n(e,i,s)})),n(a,"__wrapped",!0),n(e,i,a),a}r("original object and wrapper must be functions")}else r("no original function "+i+" to wrap")}function s(e,t){return e&&e[t]?e[t].__unwrap?e[t].__unwrap():void r("no original to unwrap to -- has "+t+" already been unwrapped?"):(r("no function to unwrap."),void r((new Error).stack))}i.wrap=o,i.massWrap=function(e,t,n){if(!e)return r("must provide one or more modules to patch"),void r((new Error).stack);Array.isArray(e)||(e=[e]),t&&Array.isArray(t)?e.forEach((function(e){t.forEach((function(t){o(e,t,n)}))})):r("must provide one or more functions to wrap on modules")},i.unwrap=s,i.massUnwrap=function(e,t){if(!e)return r("must provide one or more modules to patch"),void r((new Error).stack);Array.isArray(e)||(e=[e]),t&&Array.isArray(t)?e.forEach((function(e){t.forEach((function(t){s(e,t)}))})):r("must provide one or more functions to unwrap on modules")},e.exports=i},50302:(e,t,r)=>{var n=r(81327),i=r(71576).StringDecoder;e.exports=function(e,t,r){var o=new i,s="",a=r&&r.maxLength,c=!r||!1!==r.trailing;function l(e,r){if(t){try{r=t(r)}catch(t){return e.emit("error",t)}void 0!==r&&e.queue(r)}else e.queue(r)}function u(t,r){var n=((null!=s?s:"")+r).split(e);if(s=n.pop(),a&&s.length>a)return t.emit("error",new Error("maximum buffer reached"));for(var i=0;i{e.exports=function(e,t){var r=[];r.push(function(e){try{return Error.prototype.toString.call(e)}catch(e){try{return""}catch(e){return""}}}(e));for(var n=0;n"}catch(e){i=""}}r.push(" at "+i)}return r.join("\n")}},26818:(e,t,r)=>{if(global._stackChain){if(global._stackChain.version!==r(70735).i8)throw new Error("Conflicting version of stack-chain found");e.exports=global._stackChain}else e.exports=global._stackChain=r(82396)},82396:(e,t,r)=>{var n=r(63031);function i(){this.extend=new a,this.filter=new a,this.format=new c,this.version=r(70735).i8}var o=!1;i.prototype.callSite=function e(t){t||(t={}),o=!0;var r={};Error.captureStackTrace(r,e);var n=r.stack;return o=!1,n=n.slice(t.slice||0),t.extend&&(n=this.extend._modify(r,n)),t.filter&&(n=this.filter._modify(r,n)),n};var s=new i;function a(){this._modifiers=[]}function c(){this._formater=n,this._previous=void 0}a.prototype._modify=function(e,t){for(var r=0,n=this._modifiers.length;r{"use strict";const n=r(22037),i=r(41875),o=process.env;let s;function a(e){const t=function(e){if(!1===s)return 0;if(i("color=16m")||i("color=full")||i("color=truecolor"))return 3;if(i("color=256"))return 2;if(e&&!e.isTTY&&!0!==s)return 0;const t=s?1:0;if("win32"===process.platform){const e=n.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in o)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some((e=>e in o))||"codeship"===o.CI_NAME?1:t;if("TEAMCITY_VERSION"in o)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(o.TEAMCITY_VERSION)?1:0;if("truecolor"===o.COLORTERM)return 3;if("TERM_PROGRAM"in o){const e=parseInt((o.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(o.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(o.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(o.TERM)||"COLORTERM"in o?1:(o.TERM,t)}(e);return function(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}(t)}i("no-color")||i("no-colors")||i("color=false")?s=!1:(i("color")||i("colors")||i("color=true")||i("color=always"))&&(s=!0),"FORCE_COLOR"in o&&(s=0===o.FORCE_COLOR.length||0!==parseInt(o.FORCE_COLOR,10)),e.exports={supportsColor:a,stdout:a(process.stdout),stderr:a(process.stderr)}},81327:(e,t,r)=>{var n=r(12781);function i(e,t,r){e=e||function(e){this.queue(e)},t=t||function(){this.queue(null)};var i=!1,o=!1,s=[],a=!1,c=new n;function l(){for(;s.length&&!c.paused;){var e=s.shift();if(null===e)return c.emit("end");c.emit("data",e)}}function u(){c.writable=!1,t.call(c),!c.readable&&c.autoDestroy&&c.destroy()}return c.readable=c.writable=!0,c.paused=!1,c.autoDestroy=!(r&&!1===r.autoDestroy),c.write=function(t){return e.call(this,t),!c.paused},c.queue=c.push=function(e){return a||(null===e&&(a=!0),s.push(e),l()),c},c.on("end",(function(){c.readable=!1,!c.writable&&c.autoDestroy&&process.nextTick((function(){c.destroy()}))})),c.end=function(e){if(!i)return i=!0,arguments.length&&c.write(e),u(),c},c.destroy=function(){if(!o)return o=!0,i=!0,s.length=0,c.writable=c.readable=!1,c.emit("close"),c},c.pause=function(){if(!c.paused)return c.paused=!0,c},c.resume=function(){return c.paused&&(c.paused=!1,c.emit("resume")),l(),c.paused||c.emit("drain"),c},c}e.exports=i,i.through=i},53406:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GitHubDeviceFlow=void 0;const n=r(39800),i=r(70769),o=r(20039),s="Iv1.b507a08c87ecfe98";async function a(e,t){const r={method:"POST",headers:{Accept:"application/json",...(0,n.editorVersionHeaders)(e)},json:{client_id:s,device_code:t,grant_type:"urn:ietf:params:oauth:grant-type:device_code"},timeout:3e4};return e.get(o.Fetcher).fetch("https://github.com/login/oauth/access_token",r).then((e=>e.json()))}async function c(e,t){return e.get(o.Fetcher).fetch("https://api.github.com/user",{headers:{Authorization:`Bearer ${t}`,Accept:"application/json"}}).then((e=>e.json()))}t.GitHubDeviceFlow=class{async getToken(e){try{return await this.getTokenUnguarded(e)}catch(t){throw e.get(i.UserErrorNotifier).notifyUser(e,t),t}}async getTokenUnguarded(e){const t=await async function(e){const t={method:"POST",headers:{Accept:"application/json",...(0,n.editorVersionHeaders)(e)},json:{client_id:s,scope:"read:user"},timeout:3e4},r=e.get(o.Fetcher).fetch("https://github.com/login/device/code",t);return(await r).json()}(e),r=new Promise((async(r,n)=>{let i,o=t.expires_in;for(;o>0;){const n=await a(e,t.device_code);if(o-=t.interval,await new Promise((e=>setTimeout(e,1e3*t.interval))),i=n.access_token,i)return void r({user:(await c(e,i)).login,oauth_token:i})}n("Timed out waiting for login to complete")}));return{...t,waitForAuth:r}}}},9321:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createRequestContext=t.AuthManager=void 0;const n=r(35765),i=r(75611),o=r(5381);class s{constructor(e,t){this.persistenceManager=e,this.mkTokenManager=t,this._pendingSignIn=void 0}getCopilotTokenManager(){return this._copilotTokenManager}setPendingSignIn(e){this._pendingSignIn=e}getPendingSignIn(){return this._pendingSignIn}async checkAndUpdateStatus(e,t){const r=t?.localChecksOnly??!1;let n;if("true"===process.env.CODESPACES&&process.env.GITHUB_TOKEN&&(n={user:process.env.GITHUB_USER||"codespace-user",oauth_token:process.env.GITHUB_TOKEN}),void 0===n&&(n=await this.getAuthRecord()),void 0===n)return this._copilotTokenManager=void 0,{status:"NotSignedIn"};if(r)return{status:"MaybeOK",user:n.user};const i={token:n.oauth_token};n.dev_override&&(i.devOverride={copilotTokenUrl:n.dev_override.copilot_token_url,notificationUrl:n.dev_override.notification_url});const o=this.mkTokenManager(i),s=await o.checkCopilotToken(e);return"status"in s?(this._copilotTokenManager=o,{status:"OK",user:n.user}):(this._copilotTokenManager=void 0,{status:"HTTP401"===s.reason?"NotSignedIn":s.reason,user:n.user})}async getAuthRecord(){return await this.persistenceManager.read("hosts","github.com")}async setAuthRecord(e){await this.persistenceManager.update("hosts","github.com",e)}async deleteAuthRecord(){await this.persistenceManager.delete("hosts","github.com")}}t.AuthManager=s,t.createRequestContext=async function(e,t){let r=t;if(void 0===r&&(r=e.get(s).getCopilotTokenManager()),void 0===r){const t=await e.get(s).checkAndUpdateStatus(e);if("OK"!==t.status)return{code:o.ErrorCode.NoCopilotToken,message:`Not authenticated: ${t.status}`};if(r=e.get(s).getCopilotTokenManager(),void 0===r)return{code:o.ErrorCode.InternalError,message:"Unexpected missing Copilot token"}}const a=new i.Context(e);return a.set(n.CopilotTokenManager,r),a}},69582:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.MergedToken=void 0;const r=Object.freeze((function(e,t){const r=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(r)}}})),n=Object.freeze({isCancellationRequested:!1,onCancellationRequested:()=>({dispose:()=>{}})}),i=Object.freeze({isCancellationRequested:!0,onCancellationRequested:r});class o{constructor(){this._isCancelled=!1,this.handlers=[]}cancel(){this._isCancelled||(this._isCancelled=!0,this.handlers.forEach((e=>e(void 0))))}get isCancellationRequested(){return this._isCancelled}onCancellationRequested(e,t,n){return this._isCancelled?r(e,t):(this.handlers.push(e.bind(t)),{dispose:()=>{}})}dispose(){this.handlers=[]}}t.MergedToken=class{cancel(){this._isCancelled||(this._isCancelled=!0,this.handlers.forEach((e=>e(void 0))))}constructor(e){this.tokens=[],this.handlers=[],this._isCancelled=!1,this.tokens=e,this._isCancelled=e.some((e=>e.isCancellationRequested)),e.forEach((e=>{e.onCancellationRequested(this.cancel,this)}))}dispose(){this.tokens=[]}get isCancellationRequested(){return this.tokens.some((e=>e.isCancellationRequested))}onCancellationRequested(e,t,n){return this._isCancelled?r(e,t):(this.handlers.push(e.bind(t)),{dispose:()=>{}})}},t.CancellationTokenSource=class{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new o),this._token}cancel(){this._token?this._token instanceof o&&this._token.cancel():this._token=i}dispose(e=!1){e&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof o&&this._token.dispose():this._token=n}}},58212:(e,t)=>{"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.extensions=t.workspace=t.env=t.UIKind=t.EndOfLine=void 0,(n=t.EndOfLine||(t.EndOfLine={}))[n.LF=1]="LF",n[n.CRLF=2]="CRLF",function(e){e[e.Web=0]="Web",e[e.Desktop=1]="Desktop"}(r=t.UIKind||(t.UIKind={})),t.env={isTelemetryEnabled:!0,uiKind:r.Desktop,appRoot:"/non-existent-path"},t.workspace={onDidChangeConfiguration:()=>{},getConfiguration:()=>({})},t.extensions={getExtension:e=>{}}},3895:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AgentEditorInfo=t.AgentConfigProvider=void 0;const n=r(39800);class i extends n.InMemoryConfigProvider{constructor(){super(new n.DefaultsOnlyConfigProvider,new Map)}getOptionalConfig(e){if(!Array.isArray(e)||"editor"!=e[0]||this.isDefaultSettingOverwritten(e))return super.getConfig(e)}}t.AgentConfigProvider=i;class o extends n.EditorAndPluginInfo{setEditorAndPluginInfo(e,t){this._editorInfo=e,this._editorPluginInfo=t}getEditorInfo(e){return this._editorInfo?this._editorInfo:{name:"unknown-editor",version:"0"}}getEditorPluginInfo(e){return this._editorPluginInfo?this._editorPluginInfo:{name:"unknown-editor-plugin",version:"0"}}}t.AgentEditorInfo=o},53007:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CopilotCompletionCache=void 0;const n=r(70140);class i extends n.LRUCache{constructor(e=100){super(e)}}t.CopilotCompletionCache=i},4445:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugServer=void 0;const n=r(82361),i=r(57147),o=r(13685),s=r(71017),a=r(12781);function c(e,t){e.write("data: "+t.toString().replace(/\n/g,"\ndata: ")+"\n\n")}t.DebugServer=class{constructor(e){this.port=e,this.stdoutEmitter=new n.EventEmitter,this.server=o.createServer(((e,t)=>{if(e.headers.accept&&"text/event-stream"==e.headers.accept)switch(t.writeHead(200,{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"}),e.url){case"/stdin":return void process.stdin.on("data",(e=>{c(t,e)}));case"/stdout":return void this.stdoutEmitter.on("data",(e=>{c(t,e)}));default:return t.writeHead(404),void t.end()}t.writeHead(200,{"Content-Type":"text/html"});let r,n=__dirname;"dist"===s.basename(__dirname)&&(n=s.dirname(__dirname));try{r=i.readFileSync(s.join(n,"dist","debugServer.html"))}catch(e){r=e.toString()}t.write(r),t.end()}))}wrapStdout(e){return new a.Writable({write:(t,r,n)=>(this.stdoutEmitter.emit("data",t),e.write(t,r,n))})}listen(){return this.server.listen(this.port),this}}},76974:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotificationLogger=void 0;const n=r(68212),i=r(5798),o=r(57214);class s extends i.LogTarget{constructor(e){super(),this.debugMode=e}logIt(e,t,r,...s){const a={level:t,message:`${r} ${s.map(i.toPlainText)}`,metadataStr:r,extra:s.map(i.toPlainText)};e.get(o.AgentNotificationSender).sendNotification(new n.NotificationType("LogMessage"),a)}shouldLog(e,t){return!!this.debugMode||t>i.LogLevel.DEBUG}}t.NotificationLogger=s},61926:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotificationStatusReporter=void 0;const n=r(68212),i=r(57214);t.NotificationStatusReporter=class{constructor(e){this.ctx=e,this.notificationEndpoint="statusNotification",this.status="Normal"}setProgress(){"Error"!==this.status&&(this.status="InProgress",this.ctx.get(i.AgentNotificationSender).sendNotification(new n.NotificationType(this.notificationEndpoint),{status:"InProgress",message:""}))}removeProgress(){"Error"!==this.status&&"Warning"!==this.status&&(this.status="Normal",this.ctx.get(i.AgentNotificationSender).sendNotification(new n.NotificationType(this.notificationEndpoint),{status:"Normal",message:""}))}forceNormal(){this.status="Normal",this.ctx.get(i.AgentNotificationSender).sendNotification(new n.NotificationType(this.notificationEndpoint),{status:"Normal",message:""})}setWarning(e){"Error"!==this.status&&(this.status="Warning",this.ctx.get(i.AgentNotificationSender).sendNotification(new n.NotificationType(this.notificationEndpoint),{status:"Warning",message:""}))}setError(e){this.status="Error";const t={status:"Error",message:e};this.ctx.get(i.AgentNotificationSender).sendNotification(new n.NotificationType(this.notificationEndpoint),t)}}},76021:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.agentFileSystem=void 0;const n=r(57147);t.agentFileSystem={readFile:function(e){return n.promises.readFile(e)},mtime:async function(e){return(await n.promises.stat(e)).mtimeMs},stat:async function(e){const t=await n.promises.stat(e);return{ctime:t.ctimeMs,mtime:t.mtimeMs,size:t.size}}}},39729:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sessionId=t.getMachineId=void 0;const n=r(6113),i=r(22037),o=r(7057),s=new Set(["00:00:00:00:00:00","ff:ff:ff:ff:ff:ff","ac:de:48:00:11:22"]);function a(e){const t=e.replace(/-/g,":").toLowerCase();return!s.has(t)}let c;t.getMachineId=function(){if(!c){const e=function(){try{const e=function(){const e=(0,i.networkInterfaces)();for(const t in e){const r=e[t];if(r)for(const{mac:e}of r)if(a(e))return e}throw new Error("Unable to retrieve mac address (unexpected format)")}();return n.createHash("sha256").update(e,"utf8").digest("hex")}catch(e){return}}();c=e||o.v4()}return c},t.sessionId=o.v4()+Date.now()},76995:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.logger=t.initializeLateDependencies=t.init=void 0;const n=r(44617),i=r(35765),o=r(40084),s=r(32137),a=r(39800),c=r(75611),l=r(30446),u=r(16905),d=r(66046),p=r(96817),h=r(54619),f=r(5798),g=r(15291),m=r(57158),y=r(20039),v=r(598),_=r(70216),b=r(65489),w=r(89531),C=r(20913),E=r(52369),T=r(84567),S=r(53406),x=r(9321),k=r(3895),I=r(53007),A=r(76021),P=r(39729),R=r(65332),N=r(40585),O=r(42401);t.init=function(){const e=new c.Context;e.set(s.Clock,new s.Clock),e.set(a.ConfigProvider,new k.AgentConfigProvider),e.set(a.BuildInfo,new a.BuildInfo),function(e){e.set(C.RuntimeMode,C.RuntimeMode.fromEnvironment(!1)),e.set(f.LogVerbose,new f.LogVerbose((0,C.isVerboseLoggingEnabled)(e))),e.set(f.LogTarget,new f.ConsoleLog(console))}(e),t.logger.debug(e,"Initializing agent"),e.set(d.ExpConfigMaker,new d.ExpConfigNone);const r=(0,N.makeXdgPersistenceManager)();e.set(N.PersistenceManager,r);const w=new x.AuthManager(r,(e=>new i.CopilotTokenManagerFromGitHubToken(e)));e.set(S.GitHubDeviceFlow,new S.GitHubDeviceFlow),e.set(x.AuthManager,w);const D=new a.VscInfo(P.sessionId,(0,P.getMachineId)(),(0,a.getVersion)(e));return e.set(a.VscInfo,D),e.set(a.EditorAndPluginInfo,new k.AgentEditorInfo),e.set(h.GhostTextDebounceManager,new h.GhostTextDebounceManager),e.set(p.ContextualFilterManager,new p.ContextualFilterManager),e.set(o.CopilotTokenNotifier,new o.CopilotTokenNotifier),e.set(_.PostInsertionNotifier,new _.PostInsertionNotifier),e.set(g.RootCertificateReader,(0,g.getRootCertificateReader)(e)),e.set(y.Fetcher,new m.HelixFetcher(e)),e.set(v.OpenAIFetcher,new v.LiveOpenAIFetcher),e.set(T.UrlOpener,new T.RealUrlOpener),e.set(a.BlockModeConfig,new a.ConfigBlockModeConfig),e.set(R.MethodHandlers,(0,R.getAllMethods)()),e.set(R.NotificationHandlers,(0,R.getAllNotifications)()),e.set(I.CopilotCompletionCache,new I.CopilotCompletionCache),e.set(E.LocationFactory,new O.AgentLocationFactory),e.set(u.Features,new u.Features(e)),e.set(n.FileSystem,A.agentFileSystem),e.set(b.TelemetryUserConfig,new b.TelemetryUserConfig(e)),e.set(b.TelemetryEndpointUrl,new b.TelemetryEndpointUrl),e.set(b.TelemetryReporters,new b.TelemetryReporters),(0,y.init)((0,a.getVersion)(e)),(0,l.registerDefaultHandlers)(e,"agent"),process.on("exit",(()=>{try{t.logger.debug(e,"Shutting down agent"),e.get(b.TelemetryReporters).deactivate()}catch(e){}})),e},t.initializeLateDependencies=function(e){(0,w.setupStandardReporters)(e,"agent"),t.logger.debug(e,"Telemetry initialized")},t.logger=new f.Logger(f.LogLevel.DEBUG,"agent")},86934:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(892),i=r(86236),o=r(9321),s=r(5381),a=r(6159),c=n.Type.Object({options:n.Type.Optional(n.Type.Intersect([n.Type.Object({localChecksOnly:n.Type.Optional(n.Type.Boolean())}),a.TestingOptions]))}),l=(new i.default).compile(n.Type.Strict(c));t.default=async function(e,t,r){if(!l(r)){const e=(0,s.extractAjvErrors)(l.errors);return[null,{code:s.ErrorCode.InvalidParams,message:"Invalid params: "+e.join(";")}]}return void 0!==r.options?.testingCtx&&(e=(0,a.getTestingContext)(r.options.testingCtx)),[await e.get(o.AuthManager).checkAndUpdateStatus(e,r.options),null]}},33340:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleGetCompletionsCycling=t.handleGetCompletions=void 0;const n=r(892),i=r(86236),o=r(7057),s=r(16630),a=r(75611),c=r(63993),l=r(40702),u=r(41749),d=r(5798),p=r(20039),h=r(65489),f=r(52369),g=r(9321),m=r(69582),y=r(53007),v=r(5381),_=r(7838),b=r(6159),w=r(42401),C=r(22930),E=n.Type.Object({doc:n.Type.Object({position:n.Type.Object({line:n.Type.Number({minimum:0}),character:n.Type.Number({minimum:0})}),insertSpaces:n.Type.Optional(n.Type.Boolean()),tabSize:n.Type.Optional(n.Type.Number()),uri:n.Type.String(),version:n.Type.Number(),source:n.Type.Optional(n.Type.String()),languageId:n.Type.Optional(n.Type.String()),relativePath:n.Type.Optional(n.Type.String())}),options:n.Type.Optional(b.TestingOptions)}),T=(new i.default).compile(n.Type.Strict(E));let S;async function x(e,t,r,n,i){const E=h.TelemetryData.createAndMarkAsIssued();S&&(S.cancel(),S.dispose()),S=new m.CancellationTokenSource;const x=new m.MergedToken([t,S.token]);if(!T(r)){const e=(0,v.extractAjvErrors)(T.errors);return[null,{code:v.ErrorCode.InvalidParams,message:"Invalid params: "+e.join(";")}]}let k;void 0!==r.options?.testingCtx&&(e=(0,b.getTestingContext)(r.options.testingCtx));try{k=e.get(C.CompletionDocuments)}catch(e){}if(k){const e=i?3:1;return[{completions:k.documents.slice(0,e).map((e=>{const{cursorLine:t,lines:n,start:i,end:s}=(0,_.parseChallengeDoc)(e,r.doc.position),a=[t.slice(Math.min(i.character,r.doc.position.character))].concat(n.slice(r.doc.position.line+1)).join("\n");return{uuid:o.v4(),text:a,displayText:a,position:r.doc.position,range:{start:i,end:s},docVersion:r.doc.version}}))},null]}const I=await(0,g.createRequestContext)(e,n);if(!(I instanceof a.Context))return[null,I];const A=s.URI.parse(r.doc.uri);let P;try{if(P=await(0,w.getTextDocumentChecked)(e,A,r.doc),P.version!==r.doc.version)return async function(e,t,r,n){t.isCancellationRequested||(async function(e,t,r){const n=h.TelemetryData.createAndMarkAsIssued({languageId:String(t.languageId),requestedDocumentVersion:String(r),actualDocumentVersion:String(t.version)});(0,h.telemetry)(e,"getCompletions.docVersionMismatch",n)}(e,r,n.doc.version),new d.Logger(d.LogLevel.DEBUG,"getCompletions").debug(e,`Producing empty completions due to document version mismatch. Completions requested for document version ${n.doc.version} but document version was ${r.version}.`))}(e,x,P,r),[{completions:[]},null]}catch(e){return[null,{code:v.ErrorCode.InvalidParams,message:e.message}]}const R=P.offsetAt(I.get(f.LocationFactory).position(r.doc.position.line,r.doc.position.character)),N=P.positionAt(R),O=await async function(e,t,r,n,i,o){try{return await(0,l.getGhostText)(e,t,r,n,i,o)}catch(e){if((0,p.isAbortError)(e))return{type:"canceled",reason:"aborted at unknown location",telemetryData:(0,u.mkCanceledResultTelemetry)(i,{cancelledNetworkRequest:!0})};throw e}}(I,P,N,i,E,x),D=await(0,u.handleGhostTextResultTelemetry)(e,O);if(!D)return[{completions:[]},null];const[L,M]=D,B=(0,c.completionsFromGhostTextResults)(e,L,M,P,N,r.doc),F=e.get(y.CopilotCompletionCache);for(const e of B)F.put(e.uuid,e);return[{completions:B.map((e=>({uuid:e.uuid,text:e.text,range:e.range,displayText:e.displayText,position:e.position,docVersion:P.version})))},null]}t.handleGetCompletions=async function(e,t,r,n){return x(e,t,r,n,!1)},t.handleGetCompletionsCycling=async function(e,t,r,n){return x(e,t,r,n,!0)}},79638:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleGetPanelCompletions=void 0;const n=r(892),i=r(86236),o=r(76679),s=r(7057),a=r(35809),c=r(16630),l=r(39800),u=r(75611),d=r(75680),p=r(36317),h=r(5798),f=r(65489),g=r(52369),m=r(9321),y=r(69582),v=r(57214),_=r(5381),b=r(7838),w=r(6159),C=r(42401),E=r(8730),T=n.Type.Object({doc:n.Type.Object({position:n.Type.Object({line:n.Type.Number({minimum:0}),character:n.Type.Number({minimum:0})}),uri:n.Type.String(),version:n.Type.Number(),source:n.Type.Optional(n.Type.String()),languageId:n.Type.Optional(n.Type.String()),relativePath:n.Type.Optional(n.Type.String())}),panelId:n.Type.String(),options:n.Type.Optional(w.TestingOptions)}),S=(new i.default).compile(n.Type.Strict(T));class x{constructor(e,t,r,n,i){this.textDocument=e,this.startPosition=t,this.completionContext=r,this.solutionCountTarget=n,this.cancellationToken=i,this.savedTelemetryData=f.TelemetryData.createAndMarkAsIssued()}reportCancelled(){}getCancellationToken(){return this.cancellationToken}async getDocument(){return this.textDocument}}async function k(e,t,r,n,i){const s=await n;switch(s.status){case"Solution":r.sendNotification(new a.NotificationType("PanelSolution"),function(e,t,r){const n=(0,p.normalizeCompletionText)(r.completionText);return{panelId:e,range:t,completionText:r.completionText,displayText:r.displayText,score:r.meanProb,solutionId:(0,o.SHA256)(n).toString(),docVersion:r.docVersion}}(e,t,s.solution)),await k(e,t,r,s.next,i);break;case"FinishedNormally":await I(e,r,i);break;case"FinishedWithError":r.sendNotification(new a.NotificationType("PanelSolutionsDone"),{status:"Error",message:s.error,panelId:e}),i()}}async function I(e,t,r){t.sendNotification(new a.NotificationType("PanelSolutionsDone"),{status:"OK",panelId:e}),r()}let A;t.handleGetPanelCompletions=async function(e,t,r,n,i){A&&(A.cancel(),A.dispose()),A=new y.CancellationTokenSource;const o=new y.MergedToken([t,A.token]);if(!S(r)){const e=(0,_.extractAjvErrors)(S.errors);return[null,{code:_.ErrorCode.InvalidParams,message:"Invalid params: "+e.join(";")}]}let a,f;void 0!==r.options?.testingCtx&&(e=(0,w.getTestingContext)(r.options.testingCtx));const T=(0,l.getConfig)(e,l.ConfigKey.ListCount);let P;try{P=e.get(E.PanelCompletionDocuments)}catch(e){}if(P){const e=s.v4(),t=P.documents,n=async i=>{if(i>=T||i>=t.length)return{status:"FinishedNormally"};const{text:o,score:a}=t[i],{cursorLine:c,lines:l,start:u}=(0,b.parseChallengeDoc)(o,r.doc.position),d=[c.slice(Math.min(u.character,r.doc.position.character))].concat(l.slice(r.doc.position.line+1)).join("\n");return{status:"Solution",solution:{requestId:{headerRequestId:e,completionId:s.v4(),created:0,serverExperiments:"",deploymentId:""},completionText:d,displayText:d,meanProb:a,meanLogProb:-1,choiceIndex:i,prependToCompletion:"",docVersion:r.doc.version},next:n(i+1)}};f=r.doc.position,a=n(0)}else{const t=await(0,m.createRequestContext)(e,n);if(!(t instanceof u.Context))return[null,t];const s=c.URI.parse(r.doc.uri);let l;try{if(l=await(0,C.getTextDocumentChecked)(e,s,r.doc),l.version!==r.doc.version)return new h.Logger(h.LogLevel.DEBUG,"getPanelCompletions").debug(e,`Producing empty solutions due to document version mismatch. Panel completions requested for document version ${r.doc.version} but document version was ${l.version}.`),function(e,t,r){return I(t.panelId,e.get(v.AgentNotificationSender),r??(()=>{})),[{solutionCountTarget:0},null]}(e,r,i)}catch(e){return[null,{code:_.ErrorCode.InvalidParams,message:e.message}]}const y=l.offsetAt(t.get(g.LocationFactory).position(r.doc.position.line,r.doc.position.character));f=l.positionAt(y);const b=(0,d.completionContextForDocument)(e,l,f),w=new x(l,f,b,T,o);a=(0,p.launchSolutions)(t,w),e=t}return setImmediate((()=>k(r.panelId,e.get(g.LocationFactory).range(f,f),e.get(v.AgentNotificationSender),a,i??(()=>{})))),[{solutionCountTarget:T},null]}},61025:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(892),i=r(86236),o=r(39800),s=r(5381),a=n.Type.Object({}),c=(new i.default).compile(n.Type.Strict(a));t.default=async function(e,t,r){if(!c(r)){const e=(0,s.extractAjvErrors)(c.errors);return[null,{code:s.ErrorCode.InvalidParams,message:"Invalid params: "+e.join(";")}]}return[{version:(0,o.getVersion)(e)},null]}},92389:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(892),i=r(86236),o=r(20039),s=r(5381),a=n.Type.Object({url:n.Type.String(),method:n.Type.Optional(n.Type.String()),headers:n.Type.Optional(n.Type.Record(n.Type.String(),n.Type.String())),body:n.Type.Optional(n.Type.String()),json:n.Type.Optional(n.Type.Any()),timeout:n.Type.Optional(n.Type.Number())}),c=(new i.default).compile(n.Type.Strict(a));t.default=async function(e,t,r){if(!c(r)){const e=(0,s.extractAjvErrors)(c.errors);return[null,{code:s.ErrorCode.InvalidParams,message:"Invalid params: "+e.join(";")}]}const n={};"method"in r&&(n.method=r.method),"body"in r&&(n.body=r.body),"json"in r&&(n.json=r.json);const i=r.timeout;null!=i&&(n.timeout=i),r.headers&&(n.headers=r.headers);try{const t=await e.get(o.Fetcher).fetch(r.url,n),i=await t.text();return[{status:t.status,statusText:t.statusText,headers:Object.fromEntries(t.headers),body:i},null]}catch(e){return[null,{code:s.ErrorCode.InternalError,message:e.message}]}}},65332:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAllNotifications=t.NotificationHandlers=t.getAllMethods=t.MethodHandlers=void 0;const n=r(86934),i=r(33340),o=r(79638),s=r(61025),a=r(92389),c=r(55581),l=r(71382),u=r(91300),d=r(89629),p=r(66885),h=r(31451),f=r(96656),g=r(31620),m=r(72530),y=r(8269),v=r(73609),_=r(86584),b=r(22930),w=r(8730),C=r(82043),E=r(22229),T=r(90623),S=r(98127);class x{constructor(e){this.handlers=e}}t.MethodHandlers=x,t.getAllMethods=function(){const e=new Map;return e.set("getCompletions",i.handleGetCompletions),e.set("getCompletionsCycling",i.handleGetCompletionsCycling),e.set("getPanelCompletions",o.handleGetPanelCompletions),e.set("httpRequest",a.default),e.set("getVersion",s.default),e.set("setEditorInfo",d.handleSetEditorInfo),e.set("checkStatus",n.default),e.set("signInInitiate",h.default),e.set("signInConfirm",p.default),e.set("signOut",f.default),e.set("notifyShown",u.notifyShown),e.set("notifyAccepted",c.notifyAccepted),e.set("notifyRejected",l.notifyRejected),e.set("telemetry/exception",g.telemetryExceptionMethod),e.set("testing/createContext",y.default),e.set("testing/alwaysAuth",m.default),e.set("testing/neverAuth",_.default),e.set("testing/useTestingToken",E.default),e.set("testing/setCompletionDocuments",b.default),e.set("testing/setPanelCompletionDocuments",w.default),e.set("testing/triggerShowMessageRequest",C.default),e.set("testing/getDocument",v.default),e.set("debug/verifyState",S.handleVerifyState),e.set("debug/verifyCertificate",T.handleVerifyCertificate),e.set("debug/verifyWorkspaceState",S.handleVerifyWorkspaceState),new x(e)};class k{constructor(e){this.handlers=e}}t.NotificationHandlers=k,t.getAllNotifications=function(){const e=new Map;return new k(e)}},55581:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.notifyAccepted=void 0;const n=r(892),i=r(86236),o=r(93402),s=r(53007),a=r(5381),c=r(6159),l=n.Type.Object({uuid:n.Type.String({minLength:1}),options:n.Type.Optional(c.TestingOptions)}),u=(new i.default).compile(n.Type.Strict(l));t.notifyAccepted=async function(e,t,r){if(!u(r)){const e=(0,a.extractAjvErrors)(u.errors);return[null,{code:a.ErrorCode.InvalidParams,message:"Invalid params: "+e.join(";")}]}void 0!==r.options?.testingCtx&&(e=(0,c.getTestingContext)(r.options.testingCtx));const n=e.get(s.CopilotCompletionCache),i=n.get(r.uuid);return i&&(n.deleteKey(r.uuid),(0,o.postInsertionTasks)(e,"ghostText",i.text,i.offset,i.file,i.telemetry)),["OK",null]}},94340:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.applyNetworkProxyConfiguration=t.applySettingsToConfiguration=t.notifyChangeConfiguration=t.EditorConfigurationSettings=t.NetworkProxy=void 0;const n=r(892),i=r(86236),o=r(39800),s=r(20039),a=r(5381),c=r(6159);t.NetworkProxy=n.Type.Object({host:n.Type.String(),port:n.Type.Number(),username:n.Type.Optional(n.Type.String()),password:n.Type.Optional(n.Type.String()),rejectUnauthorized:n.Type.Optional(n.Type.Boolean())}),t.EditorConfigurationSettings=n.Type.Object({showEditorCompletions:n.Type.Optional(n.Type.Boolean()),enableAutoCompletions:n.Type.Optional(n.Type.Boolean()),delayCompletions:n.Type.Optional(n.Type.Boolean()),filterCompletions:n.Type.Optional(n.Type.Boolean()),disabledLanguages:n.Type.Optional(n.Type.Array(n.Type.Object({languageId:n.Type.String()})))});const l=n.Type.Object({settings:n.Type.Optional(t.EditorConfigurationSettings),networkProxy:n.Type.Optional(n.Type.Union([t.NetworkProxy,n.Type.Null()])),options:n.Type.Optional(c.TestingOptions)}),u=(new i.default).compile(n.Type.Strict(l));function d(e,t){const r=e.get(o.ConfigProvider);if(r.setConfig(o.ConfigKey.ShowEditorCompletions,t.showEditorCompletions),r.setConfig(o.ConfigKey.DelayCompletions,t.delayCompletions),r.setConfig(o.ConfigKey.EnableAutoCompletions,t.enableAutoCompletions),r.setConfig(o.ConfigKey.FilterCompletions,t.filterCompletions),t.disabledLanguages)for(const e of t.disabledLanguages)r.setLanguageEnablement(e.languageId,!1)}function p(e,t){if(!t)return void(e.get(s.Fetcher).proxySettings=void 0);let r;t.username&&(r=t.password?t.username+":"+t.password:t.username);const n=r?r+"@":"";process.env.http_proxy=`http://${n}${t.host}:${t.port}`,process.env.https_proxy=`http://${n}${t.host}:${t.port}`,e.get(s.Fetcher).proxySettings={host:t.host,port:t.port,proxyAuth:r,rejectUnauthorized:t.rejectUnauthorized??!0,headers:{}}}t.notifyChangeConfiguration=function(e,t){if(!u(t)){const e=(0,a.extractAjvErrors)(u.errors);throw new Error(`Invalid params: ${e.join(", ")}`)}void 0!==t.options?.testingCtx&&(e=(0,c.getTestingContext)(t.options.testingCtx)),t.settings&&d(e,t.settings),void 0!==t.networkProxy&&p(e,t.networkProxy)},t.applySettingsToConfiguration=d,t.applyNetworkProxyConfiguration=p},71382:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.notifyRejected=void 0;const n=r(892),i=r(86236),o=r(93402),s=r(53007),a=r(5381),c=r(6159),l=n.Type.Object({uuids:n.Type.Array(n.Type.String()),options:n.Type.Optional(c.TestingOptions)}),u=(new i.default).compile(n.Type.Strict(l));t.notifyRejected=async function(e,t,r){if(!u(r)){const e=(0,a.extractAjvErrors)(u.errors);return[null,{code:a.ErrorCode.InvalidParams,message:"Invalid params: "+e.join(";")}]}void 0!==r.options?.testingCtx&&(e=(0,c.getTestingContext)(r.options.testingCtx));const n=e.get(s.CopilotCompletionCache),i=r.uuids.flatMap((e=>n.get(e)??[]));if(i.length>0){const t=i[0];for(const e of r.uuids)n.deleteKey(e);const s=i.map((e=>({completionText:e.displayText,completionTelemetryData:e.telemetry})));(0,o.postRejectionTasks)(e,"ghostText",t.offset,t.file,s)}return["OK",null]}},91300:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.notifyShown=void 0;const n=r(892),i=r(86236),o=r(40702),s=r(41749),a=r(53007),c=r(5381),l=r(6159),u=n.Type.Object({uuid:n.Type.String({minLength:1}),options:n.Type.Optional(l.TestingOptions)}),d=(new i.default).compile(n.Type.Strict(u));t.notifyShown=async function(e,t,r){if(!d(r)){const e=(0,c.extractAjvErrors)(d.errors);return[null,{code:c.ErrorCode.InvalidParams,message:"Invalid params: "+e.join(";")}]}void 0!==r.options?.testingCtx&&(e=(0,l.getTestingContext)(r.options.testingCtx));const n=e.get(a.CopilotCompletionCache).get(r.uuid);if(n){const t=!(n.resultType===o.ResultType.Network);(0,s.telemetryShown)(e,"ghostText",n.telemetry,t)}return["OK",null]}},89629:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleSetEditorInfo=void 0;const n=r(892),i=r(86236),o=r(39800),s=r(76995),a=r(5381),c=r(94340),l=n.Type.Object({name:n.Type.String(),version:n.Type.String()}),u=n.Type.Object({editorInfo:l,editorPluginInfo:l,editorConfiguration:n.Type.Optional(c.EditorConfigurationSettings),networkProxy:n.Type.Optional(c.NetworkProxy),options:n.Type.Optional(n.Type.Object({}))}),d=(new i.default).compile(n.Type.Strict(u));t.handleSetEditorInfo=async function(e,t,r){if(!d(r)){const e=(0,a.extractAjvErrors)(d.errors);return[null,{code:a.ErrorCode.InvalidParams,message:"Invalid params: "+e.join(";")}]}return e.get(o.EditorAndPluginInfo).setEditorAndPluginInfo(r.editorInfo,r.editorPluginInfo),r.editorConfiguration&&(0,c.applySettingsToConfiguration)(e,r.editorConfiguration),r.networkProxy&&(0,c.applyNetworkProxyConfiguration)(e,r.networkProxy),(0,s.initializeLateDependencies)(e),["OK",null]}},66885:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(892),i=r(86236),o=r(9321),s=r(5381),a=n.Type.Object({options:n.Type.Optional(n.Type.Object({}))}),c=(new i.default).compile(n.Type.Strict(a));t.default=async function(e,t,r){if(!c(r)){const e=(0,s.extractAjvErrors)(c.errors);return[null,{code:s.ErrorCode.InvalidParams,message:"Invalid params: "+e.join(";")}]}const n=e.get(o.AuthManager).getPendingSignIn();if(void 0===n)return[null,{code:s.ErrorCode.InvalidRequest,message:"No pending sign in"}];let i;try{return i=await n,[i,null]}catch(e){return[null,{code:s.ErrorCode.DeviceFlowFailed,message:e.toString()}]}finally{e.get(o.AuthManager).setPendingSignIn(void 0)}}},31451:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(892),i=r(86236),o=r(53406),s=r(9321),a=r(5381),c=n.Type.Object({options:n.Type.Optional(n.Type.Object({}))}),l=(new i.default).compile(n.Type.Strict(c));t.default=async function(e,t,r){if(!l(r)){const e=(0,a.extractAjvErrors)(l.errors);return[null,{code:a.ErrorCode.InvalidParams,message:"Invalid params: "+e.join(";")}]}const n=await e.get(s.AuthManager).checkAndUpdateStatus(e);if("OK"===n.status)return[{status:"AlreadySignedIn",user:n.user},null];const i=await e.get(o.GitHubDeviceFlow).getToken(e),c=i.waitForAuth.then((async t=>(await e.get(s.AuthManager).setAuthRecord(t),await e.get(s.AuthManager).checkAndUpdateStatus(e))));return e.get(s.AuthManager).setPendingSignIn(c),[{status:"PromptUserDeviceFlow",userCode:i.user_code,verificationUri:i.verification_uri,expiresIn:i.expires_in,interval:i.interval},null]}},96656:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(892),i=r(86236),o=r(9321),s=r(5381),a=n.Type.Object({options:n.Type.Optional(n.Type.Object({}))}),c=(new i.default).compile(n.Type.Strict(a));t.default=async function(e,t,r){if(!c(r)){const e=(0,s.extractAjvErrors)(c.errors);return[null,{code:s.ErrorCode.InvalidParams,message:"Invalid params: "+e.join(";")}]}return await e.get(o.AuthManager).deleteAuthRecord(),[await e.get(o.AuthManager).checkAndUpdateStatus(e),null]}},31620:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.telemetryExceptionMethod=void 0;const n=r(892),i=r(86236),o=r(65489),s=r(5381),a=n.Type.Object({origin:n.Type.String(),stacktrace:n.Type.Optional(n.Type.String()),properties:n.Type.Optional(n.Type.Record(n.Type.String(),n.Type.String()))}),c=(new i.default).compile(n.Type.Strict(a));t.telemetryExceptionMethod=async function(e,t,r){if(!c(r)){const e=(0,s.extractAjvErrors)(c.errors);return[null,{code:s.ErrorCode.InvalidParams,message:"Invalid params: "+e.join(";")}]}const n=new Error("Original stacktrace: "+r.stacktrace);n.stack="";const i=r.properties||{};return await(0,o.telemetryException)(e,n,r.origin,i),["OK",null]}},72530:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(892),i=r(86236),o=r(9321),s=r(5381),a=r(91728),c=r(6159),l=n.Type.Object({testingCtx:n.Type.Number(),options:n.Type.Optional(n.Type.Object({}))}),u=(new i.default).compile(n.Type.Strict(l));t.default=async function(e,t,r){if(!u(r)){const e=(0,s.extractAjvErrors)(u.errors);return[null,{code:s.ErrorCode.InvalidParams,message:"Invalid params: "+e.join(";")}]}return(0,c.getTestingContext)(r.testingCtx).forceSet(o.AuthManager,new a.AlwaysAuthManager),["OK",null]}},8269:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(892),i=r(86236),o=r(5381),s=r(6159),a=n.Type.Object({options:n.Type.Optional(n.Type.Object({}))}),c=(new i.default).compile(n.Type.Strict(a));t.default=async function(e,t,r){if(!c(r)){const e=(0,o.extractAjvErrors)(c.errors);return[null,{code:o.ErrorCode.InvalidParams,message:"Invalid params: "+e.join(";")}]}return[(0,s.newTestingContext)(e),null]}},73609:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(892),i=r(86236),o=r(16630),s=r(70819),a=r(5381),c=n.Type.Object({uri:n.Type.String()}),l=(new i.default).compile(n.Type.Strict(c));t.default=async function(e,t,r){if(!l(r)){const e=(0,a.extractAjvErrors)(l.errors);return[null,{code:a.ErrorCode.InvalidParams,message:"Invalid params: "+e.join(";")}]}const n=e.get(s.TextDocumentManager),i=await n.getTextDocument(o.URI.parse(r.uri));return[{uri:r.uri,languageId:i?.languageId??"unknown",version:i?.version??-1,text:i?.getText()??""},null]}},86584:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(892),i=r(86236),o=r(9321),s=r(5381),a=r(91728),c=r(6159),l=n.Type.Object({testingCtx:n.Type.Number(),options:n.Type.Optional(n.Type.Object({}))}),u=(new i.default).compile(n.Type.Strict(l));t.default=async function(e,t,r){if(!u(r)){const e=(0,s.extractAjvErrors)(u.errors);return[null,{code:s.ErrorCode.InvalidParams,message:"Invalid params: "+e.join(";")}]}return(0,c.getTestingContext)(r.testingCtx).forceSet(o.AuthManager,new a.NotAuthManager),["OK",null]}},22930:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompletionDocuments=void 0;const n=r(892),i=r(86236),o=r(5381),s=r(6159),a=n.Type.Object({testingCtx:n.Type.Number(),documents:n.Type.Array(n.Type.String()),options:n.Type.Optional(n.Type.Object({}))}),c=(new i.default).compile(n.Type.Strict(a));class l{constructor(e){this.documents=e}}t.CompletionDocuments=l,t.default=async function(e,t,r){if(!c(r)){const e=(0,o.extractAjvErrors)(c.errors);return[null,{code:o.ErrorCode.InvalidParams,message:"Invalid params: "+e.join(";")}]}return(0,s.getTestingContext)(r.testingCtx).forceSet(l,new l(r.documents)),["OK",null]}},8730:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PanelCompletionDocuments=void 0;const n=r(892),i=r(86236),o=r(5381),s=r(6159),a=n.Type.Object({text:n.Type.String(),score:n.Type.Number()}),c=n.Type.Object({testingCtx:n.Type.Number(),documents:n.Type.Array(a),options:n.Type.Optional(n.Type.Object({}))}),l=(new i.default).compile(n.Type.Strict(c));class u{constructor(e){this.documents=e}}t.PanelCompletionDocuments=u,t.default=async function(e,t,r){if(!l(r)){const e=(0,o.extractAjvErrors)(l.errors);return[null,{code:o.ErrorCode.InvalidParams,message:"Invalid params: "+e.join(";")}]}return(0,s.getTestingContext)(r.testingCtx).forceSet(u,new u(r.documents)),["OK",null]}},82043:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(892),i=r(86236),o=r(5798),s=r(57214),a=r(5381),c=n.Type.Object({}),l=(new i.default).compile(n.Type.Strict(c));t.default=async function(e,t,r){if(!l(r)){const e=(0,a.extractAjvErrors)(l.errors);return[null,{code:a.ErrorCode.InvalidParams,message:"Invalid params: "+e.join(";")}]}const n=e.get(s.AgentNotificationSender),i=e.get(o.LogTarget);return await n.showWarningMessage("This is a test message",{title:"Some Action"}).catch((e=>c(o.LogLevel.ERROR,"error sending show message request",e))).then((e=>c(o.LogLevel.INFO,"response from message request",e.title))),["OK",null];async function c(t,r,n){return i.logIt(e,t,r+" ("+n+")",n)}}},22229:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FakeAuthManager=void 0;const n=r(892),i=r(86236),o=r(45922),s=r(9321),a=r(5381),c=r(6159),l=n.Type.Object({testingCtx:n.Type.Number(),options:n.Type.Optional(n.Type.Object({}))}),u=(new i.default).compile(n.Type.Strict(l));class d extends s.AuthManager{constructor(e){super(void 0,(t=>e)),this.tokenManager=e,this.user="user"}getCopilotTokenManager(){return this.tokenManager}async checkAndUpdateStatus(e,t){const r=await this.tokenManager.checkCopilotToken(e);return"status"in r?{status:"OK",user:this.user}:{status:"HTTP401"===r.reason?"NotSignedIn":r.reason,user:this.user}}}t.FakeAuthManager=d,t.default=async function(e,t,r){if(!u(r)){const e=(0,a.extractAjvErrors)(u.errors);return[null,{code:a.ErrorCode.InvalidParams,message:"Invalid params: "+e.join(";")}]}const n=(0,o.getTestingCopilotTokenManager)();return(0,c.getTestingContext)(r.testingCtx).forceSet(s.AuthManager,new d(n)),["OK",null]}},90623:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleVerifyCertificate=void 0;const n=r(892),i=r(86236),o=r(22037),s=r(15291),a=r(72406),c=r(5381),l=n.Type.Object({expectedCertificate:n.Type.String()}),u=(new i.default).compile(n.Type.Strict(l));t.handleVerifyCertificate=async function(e,t,r){if(!u(r)){const e=(0,c.extractAjvErrors)(u.errors);return[null,{code:c.ErrorCode.InvalidParams,message:"Invalid params: "+e.join(";")}]}const n=(0,s.getRootCertificateReader)(e),i=(await n.getAllRootCAs()).map(a.normalizeNewlines),l=(0,a.normalizeNewlines)(r.expectedCertificate);return i.includes(l)?[{status:!0,message:"Certificate verified"},null]:[{status:!1,message:`expected certificate not found - Expected to find certificate ${(0,a.asReadableCert)(l)}. Only found those installed on the system:${o.EOL}${i.map((e=>"- "+(0,a.asReadableCert)(e))).join(o.EOL)}`},null]}},98127:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleVerifyWorkspaceState=t.handleVerifyState=void 0;const n=r(892),i=r(86236),o=r(16630),s=r(70819),a=r(5381),c=n.Type.Object({source:n.Type.String(),languageId:n.Type.String(),version:n.Type.Number(),uri:n.Type.String()}),l=(new i.default).compile(n.Type.Strict(c));t.handleVerifyState=async function(e,t,r){if(!l(r)){const e=(0,a.extractAjvErrors)(l.errors);return[null,{code:a.ErrorCode.InvalidParams,message:"Invalid params: "+e.join(";")}]}const n=e.get(s.TextDocumentManager),i=await n.getTextDocument(o.URI.parse(r.uri));return i?i.languageId!==r.languageId?[{status:!1,message:`Language id mismatch: [State] ${i.languageId} !== [Request] ${r.languageId}`},null]: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: "${o.URI.parse(r.uri)}" (given by the editor: "${r.uri}")`},null]},t.handleVerifyWorkspaceState=async function(e,t,r){return[e.get(s.TextDocumentManager).workspaceFolders,null]}},57214:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectionNotificationSender=t.AgentNotificationSender=void 0;const n=r(69035);class i extends n.NotificationSender{}t.AgentNotificationSender=i,t.ConnectionNotificationSender=class extends i{constructor(e){super(),this.connection=e}sendNotification(e,t){this.connection.sendNotification(e,t)}showWarningMessage(e,...t){return this.connection.window.showWarningMessage(e,...t)}}},40585:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.makeXdgPersistenceManager=t.PersistenceManager=void 0;const n=r(57147),i=r(22037),o=r(77282);class s{constructor(e){this.directory=e}async read(e,t){const r=`${this.directory}/${e}.json`;try{const e=await n.promises.readFile(r,{encoding:"utf8"});return JSON.parse(e)[t]}catch(e){return}}async update(e,t,r){await n.promises.mkdir(this.directory,{recursive:!0,mode:448});const i=`${this.directory}/${e}.json`;let o={};try{const e=await n.promises.readFile(i,{encoding:"utf8"});o=JSON.parse(e)}catch(e){}o[t]=r,await n.promises.writeFile(i,JSON.stringify(o)+"\n",{encoding:"utf8"})}async delete(e,t){const r=`${this.directory}/${e}.json`;try{const e=await n.promises.readFile(r,{encoding:"utf8"}),i=JSON.parse(e);delete i[t],await n.promises.writeFile(r,JSON.stringify(i)+"\n",{encoding:"utf8"})}catch(e){}}}t.PersistenceManager=s,t.makeXdgPersistenceManager=function(){return new s(o.env.XDG_CONFIG_HOME?o.env.XDG_CONFIG_HOME+"/github-copilot":"win32"===(0,i.platform)()?o.env.USERPROFILE+"\\AppData\\Local\\github-copilot":o.env.HOME+"/.config/github-copilot")}},5381:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.extractAjvErrors=t.ErrorCode=void 0,(r=t.ErrorCode||(t.ErrorCode={}))[r.ParseError=-32700]="ParseError",r[r.InvalidRequest=-32600]="InvalidRequest",r[r.MethodNotFound=-32601]="MethodNotFound",r[r.InvalidParams=-32602]="InvalidParams",r[r.InternalError=-32603]="InternalError",r[r.NoCopilotToken=1e3]="NoCopilotToken",r[r.DeviceFlowFailed=1001]="DeviceFlowFailed",r[r.ContextNotInitialized=1002]="ContextNotInitialized",t.extractAjvErrors=function(e){return e.map((e=>`${e.instancePath} ${e.message}`))}},32879:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createWrappedConnection=t.CopilotService=void 0;const n=r(57147),i=r(12781),o=r(68212),s=r(16630),a=r(75611),c=r(25225),l=r(70769),u=r(5798),d=r(69035),p=r(86635),h=r(20913),f=r(70819),g=r(4445),m=r(76974),y=r(61926),v=r(65332),_=r(94340),b=r(57214),w=r(5381),C=r(10540);t.CopilotService=class{constructor(e,t){this.connection=t,this.initialized=!1,this.ctx=new a.Context(e);const r=new b.ConnectionNotificationSender(t);this.ctx.set(d.NotificationSender,r),this.ctx.set(l.UserErrorNotifier,new l.UserErrorNotifier),this.ctx.set(b.AgentNotificationSender,r),this.ctx.set(p.StatusReporter,new y.NotificationStatusReporter(this.ctx));const n=new u.MultiLog([this.ctx.get(u.LogTarget),new m.NotificationLogger((0,h.isDebugEnabled)(this.ctx))]);this.ctx.forceSet(u.LogTarget,n),new u.Logger(u.LogLevel.DEBUG,"agent").debug(this.ctx,"Agent service starting"),t.onRequest(this.messageHandler.bind(this)),t.onNotification(this.notificationHandler.bind(this)),t.onInitialize((async e=>{const r=e.capabilities.workspace?.workspaceFolders??!1;return this.ctx.set(f.TextDocumentManager,new C.AgentTextDocumentManager(t,e.workspaceFolders?.map((e=>s.URI.parse(e.uri)))??[],!(0,h.isRunningInTest)(this.ctx)&&r)),(0,c.registerDocumentTracker)(this.ctx),this.initialized=!0,{capabilities:{textDocumentSync:{openClose:!0,change:o.TextDocumentSyncKind.Incremental},workspace:{workspaceFolders:{supported:r,changeNotifications:r}}}}})),t.onDidChangeConfiguration((async e=>{(0,_.notifyChangeConfiguration)(this.ctx,e)}))}async messageHandler(e,t,r){const n=this.ctx.get(v.MethodHandlers).handlers.get(e);if(!n)return new o.ResponseError(w.ErrorCode.MethodNotFound,`Method not found: ${e}`);if(!this.initialized)return new o.ResponseError(w.ErrorCode.ContextNotInitialized,"Agent service not initialized.");Array.isArray(t)&&(t=t[0]);const[i,s]=await n(this.ctx,r,t);return s?new o.ResponseError(s.code,s.message,s.data):i}async notificationHandler(e,t){const r=this.ctx.get(v.NotificationHandlers).handlers.get(e);r&&(Array.isArray(t)&&(t=t[0]),await r(this.ctx,t))}listen(){this.connection.listen()}dispose(){this.connection.dispose()}},t.createWrappedConnection=function(e,t,r){let s=r;const a=parseInt(process.env.GH_COPILOT_DEBUG_UI_PORT);if(!isNaN(a))try{s=new g.DebugServer(a).listen().wrapStdout(r)}catch(t){new u.Logger(u.LogLevel.WARN,"agent").error(e,`Failed to start debug server on port ${a} (maybe it's in use?)`,t)}if(e.get(h.RuntimeMode).flags.recordInput){const e=Date.now().toString(),r=`stdin${e}.log`;t.on("data",(e=>{(0,n.appendFile)(r,e,(e=>{e&&console.error(e)}))}));const o=`stdout${e}.log`;c=s,l=e=>{(0,n.appendFile)(o,e,(e=>{e&&console.error(e)}))},s=new i.Writable({write:(e,t,r)=>(l(e.toString()),c.write(e,t,r))})}var c,l;return(0,o.createConnection)(o.ProposedFeatures.all,new o.StreamMessageReader(t),new o.StreamMessageWriter(s))}},91728:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AlwaysAuthManager=t.NotAuthManager=void 0;const n=r(35765),i=r(9321);class o extends i.AuthManager{constructor(){super(null,(()=>null))}async checkAndUpdateStatus(e,t){return{status:"NotSignedIn"}}}t.NotAuthManager=o;class s extends i.AuthManager{constructor(){super(null,(()=>null))}async checkAndUpdateStatus(e,t){return{status:"OK",user:"user"}}getCopilotTokenManager(){return new n.FixedCopilotTokenManager("tid=valid-copilot-token")}}t.AlwaysAuthManager=s},7838:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseChallengeDoc=void 0,t.parseChallengeDoc=function(e,t){const r=e.split("\n");let n=t,i=t,o=r[t.line];const s=o.indexOf("%");-1!==s&&(o=o.substring(0,s)+o.substring(s+1),n={line:t.line,character:s});const a=o.indexOf("^");if(-1!==a){const e=o.indexOf("^",a+1);if(-1===e)throw new Error("Challenge document must contain zero or two ^ characters.");o=o.substring(0,a)+o.substring(a+1,e)+o.substring(e+1),n={line:t.line,character:t.character},i={line:t.line,character:t.character+e-a-1}}return{cursorLine:o,lines:r,start:n,end:i}}},6159:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createAgentTestingContext=t.setAgentTestEditorInfo=t.TestTextDocumentManager=t.getTestingContext=t.newTestingContext=t.TestingOptions=void 0;const n=r(44617),i=r(892),o=r(39800),s=r(75611),a=r(4630),c=r(52369),l=r(70819),u=r(3895),d=r(53007),p=r(76021),h=r(42401),f=new Map;let g=0;t.TestingOptions=i.Type.Object({testingCtx:i.Type.Optional(i.Type.Number())}),t.newTestingContext=function(e){const t=g,r=new s.Context(e);return f.set(t,r),g++,t},t.getTestingContext=function(e){const t=f.get(e);if(void 0===t)throw new Error(`Testing context ${e} not found`);return t};class m extends l.TextDocumentManager{constructor(){super(...arguments),this._textDocuments=[],this.onDidFocusTextDocument=()=>({dispose:()=>{}}),this.onDidChangeTextDocument=()=>({dispose:()=>{}}),this.onDidChangeCursor=()=>({dispose:()=>{}})}get textDocuments(){return this._textDocuments}async getTextDocument(e){return this.textDocuments.find((t=>t.uri.toString()==e.toString()))}async getRelativePath(e){}setTextDocument(e,t,r){const n=this._textDocuments.find((t=>t.uri.toString()==e.toString()));n?n.update([{text:r}],n.version+1):this._textDocuments.push(new h.AgentTextDocument(e,t,0,r))}findNotebook(e){}}function y(e){const t=new u.AgentEditorInfo;t.setEditorAndPluginInfo({name:"agent-tests",version:"0"},{name:"agent-tests",version:"0"}),e.set(o.EditorAndPluginInfo,t)}t.TestTextDocumentManager=m,t.setAgentTestEditorInfo=y,t.createAgentTestingContext=function(){const e=new s.Context;e.set(o.ConfigProvider,new u.AgentConfigProvider),(0,a.setupTestingContext)(e),y(e),e.set(d.CopilotCompletionCache,new d.CopilotCompletionCache),e.set(c.LocationFactory,new h.AgentLocationFactory),e.set(l.TextDocumentManager,new m),e.set(o.BlockModeConfig,new o.ConfigBlockModeConfig);const t=new o.VscInfo("TestSessionId","TestMachineId","TestVscVersion");return e.set(o.VscInfo,t),e.set(n.FileSystem,p.agentFileSystem),e}},42401:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AgentTextDocument=t.getTextDocumentChecked=t.AgentLocationFactory=void 0;const n=r(96813),i=r(91674),o=r(52369),s=r(70819);class a extends o.LocationFactory{range(e,t,r,n){return void 0!==r&&void 0!==n?i.Range.create(e,t,r,n):i.Range.create(e,t)}position(e,t){return i.Position.create(e,t)}}t.AgentLocationFactory=a,t.getTextDocumentChecked=async function(e,t,r){if(r&&r.source&&r.languageId){const e=new c(t,r.languageId,0,r.source);return r.relativePath&&(e.relativePath=r.relativePath),e}const n=e.get(s.TextDocumentManager);return await n.getTextDocument(t).then((e=>{if(!e){const e=n.textDocuments.map((e=>e.uri)).join(", ");throw new Error(`Couldn't find document for uri: ${t}, known document uris are: ${e}`)}return new c(e.uri,e.languageId,e.version,e.getText())}))};class c{constructor(e,t,r,i){this._uri=e,this._textDocument=n.TextDocument.create(e.toString(),t,r,i)}get uri(){return this._uri}get fileName(){return this._uri.fsPath}get languageId(){return this._textDocument.languageId}get version(){return this._textDocument.version}get lineCount(){return this._textDocument.lineCount}get relativePath(){return this._relativePath}set relativePath(e){this._relativePath=e}getText(e){return this._textDocument.getText(e)}positionAt(e){return this._textDocument.positionAt(e)}offsetAt(e){return this._textDocument.offsetAt(e)}lineAt(e){const t="number"==typeof e?e:e.line,r=this.getText().split("\n")[t],n=i.Range.create(i.Position.create(t,0),i.Position.create(t,r.length)),o=0===r.trim().length;return{text:r,range:n,isEmptyOrWhitespace:o}}getWordRangeAtPosition(e){}update(e,t){n.TextDocument.update(this._textDocument,e,t)}}t.AgentTextDocument=c},10540:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AgentTextDocumentManager=void 0;const n=r(82361),i=r(71017),o=r(35809),s=r(16630),a=r(70819),c=r(42401);class l{constructor(){this.emitter=new n}create(e,t,r,n){return new c.AgentTextDocument(s.URI.parse(e),t,r,n)}update(e,t,r){const n=[];for(const r of t)if(o.TextDocumentContentChangeEvent.isIncremental(r)){const t={range:r.range,rangeOffset:e.offsetAt(r.range.start),rangeLength:e.offsetAt(r.range.end)-e.offsetAt(r.range.start),text:r.text};n.push(t)}const i={document:e,contentChanges:n};return this.emitter.emit("change",i),e.update(t,r),e}}class u extends a.TextDocumentManager{constructor(e,t,r){super(),this.connection=e,this.workspaceFolders=t,this.onDidChangeTextDocument=(e,t,r)=>{const n=e.bind(t);return this._textDocumentConfiguration.emitter.on("change",n),{dispose:()=>{this._textDocumentConfiguration.emitter.removeListener("change",n)}}},this.onDidFocusTextDocument=(e,t,r)=>(this.connection.onNotification("textDocument/didFocus",(r=>{const n=s.URI.parse(r.uri);e.call(t,{document:{uri:n}})})),{dispose:()=>{}}),this.onDidChangeCursor=(e,t,r)=>({dispose:()=>{}}),this._textDocumentConfiguration=new l,this._textDocumentListener=new o.TextDocuments(this._textDocumentConfiguration),this._textDocumentListener.listen(e),r&&this.connection.workspace.onDidChangeWorkspaceFolders((e=>{e.added.forEach((e=>this.registerWorkspaceFolder(e))),e.removed.forEach((e=>this.unregisterWorkspaceFolder(e)))})),this.connection.onNotification("vs/didAddWorkspaceFolder",(e=>this.registerWorkspaceFolder(e))),this.connection.onNotification("vs/didRemoveWorkspaceFolder",(e=>this.unregisterWorkspaceFolder(e)))}unregisterWorkspaceFolder(e){const t=this.workspaceFolders.findIndex((t=>t.toString()===s.URI.parse(e.uri).toString()));t>=0&&this.workspaceFolders.splice(t,1)}registerWorkspaceFolder(e){this.workspaceFolders.push(s.URI.parse(e.uri))}get textDocuments(){return this._textDocumentListener.all()}async getTextDocument(e){return this._textDocumentListener.all().find((t=>t.uri.toString()==e.toString()))}async getRelativePath(e){const t=e;return t.relativePath?t.relativePath:(0,a.getRelativePath)(this.workspaceFolders??[],e.fileName)??i.basename(e.fileName)}findNotebook(e){}}t.AgentTextDocumentManager=u},35765:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.refreshToken=t.CopilotTokenManagerFromGitHubToken=t.FixedCopilotTokenManager=t.CopilotTokenManager=t.CopilotToken=t.authFromGitHubToken=t.nowSeconds=t.TOKEN_REFRESHED_EVENT=void 0;const n=r(82361),i=r(39800),o=r(70769),s=r(5798),a=r(20039),c=r(69035),l=r(65489),u=r(84567),d=r(40084),p=new s.Logger(s.LogLevel.INFO,"auth");let h=0;function f(){return Math.floor(Date.now()/1e3)}async function g(e,t){(0,l.telemetry)(e,"auth.new_login");const r=await async function(e,t){const r=t.devOverride?.copilotTokenUrl??"https://api.github.com/copilot_internal/v2/token";try{return await e.get(a.Fetcher).fetch(r,{headers:{Authorization:`token ${t.token}`,...(0,i.editorVersionHeaders)(e)}})}catch(t){throw e.get(o.UserErrorNotifier).notifyUser(e,t),t}}(e,t);if(!r)return p.info(e,"Failed to get copilot token"),(0,l.telemetryError)(e,"auth.request_failed"),{kind:"failure",reason:"FailedToGetToken"};const n=await r.json();if(!n)return p.info(e,"Failed to get copilot token"),(0,l.telemetryError)(e,"auth.request_read_failed"),{kind:"failure",reason:"FailedToGetToken"};if(y(e,n.user_notification,t),401===r.status)return p.info(e,"Failed to get copilot token due to 401 status"),(0,l.telemetryError)(e,"auth.unknown_401"),{kind:"failure",reason:"HTTP401"};if(!r.ok||!n.token){p.info(e,`Invalid copilot token: missing token: ${r.status} ${r.statusText}`),(0,l.telemetryError)(e,"auth.invalid_token",l.TelemetryData.createAndMarkAsIssued({status:r.status.toString(),status_text:r.statusText}));const i=n.error_details;return y(e,i,t),{kind:"failure",reason:"NotAuthorized",...i}}const s=n.expires_at;n.expires_at=f()+n.refresh_in+60;const c=new v(n.token,n.organization_list);return e.get(d.CopilotTokenNotifier).emit("onCopilotToken",c),(0,l.telemetry)(e,"auth.new_token",l.TelemetryData.createAndMarkAsIssued({},{adjusted_expires_at:n.expires_at,expires_at:s,current_time:f()})),{kind:"success",...n}}t.TOKEN_REFRESHED_EVENT="token_refreshed",t.nowSeconds=f,t.authFromGitHubToken=g;const m=new Map;function y(e,t,r){if(!t)return;const n=f();m.get(t.message)||(m.set(t.message,n),e.get(c.NotificationSender).showWarningMessage(t.message,{title:t.title},{title:"Dismiss"}).catch((t=>{console.error(t),p.error(e,`Error while sending notification: ${t.message}`)})).then((async n=>{const o=n?.title===t.title,s=o||"Dismiss"===n?.title;if(o){const r=e.get(i.EditorAndPluginInfo).getEditorPluginInfo(e),n=t.url.replace("{EDITOR}",encodeURIComponent(r.name+"_"+r.version));await e.get(u.UrlOpener).open(n)}"notification_id"in t&&s&&await async function(e,t,r){const n=r.devOverride?.notificationUrl??"https://api.github.com/copilot_internal/notification",o=await e.get(a.Fetcher).fetch(n,{headers:{Authorization:`token ${r.token}`,...(0,i.editorVersionHeaders)(e)},method:"POST",body:JSON.stringify({notification_id:t})});o&&o.ok||p.error(e,`Failed to send notification result to GitHub: ${o?.status} ${o?.statusText}`)}(e,t.notification_id,r)})))}class v{constructor(e,t){this.token=e,this.organization_list=t,this.tokenMap=this.parseToken(e)}parseToken(e){const t=new Map,r=e?.split(":")[0],n=r?.split(";");for(const e of n){const[r,n]=e.split("=");t.set(r,n)}return t}getTokenValue(e){return this.tokenMap.get(e)}}t.CopilotToken=v;class _{constructor(){this.tokenRefreshEventEmitter=new n.EventEmitter}}function b(e,r,n){const i=f();h>0||(h++,setTimeout((async()=>{let n,o="";try{h--,await r.getCopilotToken(e,!0),n="success",r.tokenRefreshEventEmitter.emit(t.TOKEN_REFRESHED_EVENT)}catch(e){n="failure",o=e.toString()}const s=l.TelemetryData.createAndMarkAsIssued({result:n},{time_taken:f()-i,refresh_count:h});o&&(s.properties.reason=o),(0,l.telemetry)(e,"auth.token_refresh",s)}),1e3*n))}t.CopilotTokenManager=_,t.FixedCopilotTokenManager=class extends _{constructor(e){super(),this.token=e,this.wasReset=!1}async getGitHubToken(){return Promise.resolve("token")}async getCopilotToken(e,t){return new v(this.token)}resetCopilotToken(e,t){this.wasReset=!0}async checkCopilotToken(e){return{status:"OK"}}},t.CopilotTokenManagerFromGitHubToken=class extends _{constructor(e){super(),this.githubToken=e,this.copilotToken=void 0}async getGitHubToken(){return Promise.resolve(this.githubToken.token)}async getCopilotToken(e,t){if(!this.copilotToken||this.copilotToken.expires_at{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CopilotTokenNotifier=void 0;const n=r(82361);t.CopilotTokenNotifier=class extends n{constructor(){super()}emit(e,t){return super.emit(e,t)}}},25135:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChangeTracker=void 0;const n=r(70819);t.ChangeTracker=class{get offset(){return this._offset}constructor(e,t,r){this._referenceCount=0,this._isDisposed=!1,this._offset=r;const i=e.get(n.TextDocumentManager);this._tracker=i.onDidChangeTextDocument((async e=>{if(e.document.uri===t)for(const t of e.contentChanges)if(t.rangeOffset+t.rangeLength<=this.offset){const e=t.text.length-t.rangeLength;this._offset=this._offset+e}}))}push(e,t){if(this._isDisposed)throw new Error("Unable to push new actions to a disposed ChangeTracker");this._referenceCount++,setTimeout((()=>{e(),this._referenceCount--,0===this._referenceCount&&(this._tracker.dispose(),this._isDisposed=!0)}),t)}}},32137:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Clock=void 0,t.Clock=class{now(){return new Date}}},70140:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LRUCache=t.keyForPrompt=void 0;const n=r(76679);t.keyForPrompt=function(e){return(0,n.SHA256)(e.prefix+e.suffix).toString()},t.LRUCache=class{constructor(e=10){this.values=new Map,this.lruKeys=[],this.size=e}removeKeyFromLRU(e){const t=this.lruKeys.indexOf(e);-1!==t&&this.lruKeys.splice(t,1)}touchKeyInLRU(e){this.removeKeyFromLRU(e),this.lruKeys.push(e)}clear(){this.values.clear(),this.lruKeys=[]}deleteKey(e){this.removeKeyFromLRU(e),void 0!==this.values.get(e)&&this.values.delete(e)}get(e){if(this.values.has(e)){const t=this.values.get(e);return this.touchKeyInLRU(e),t}}put(e,t){let r=[];this.values.has(e)?r=[e]:this.lruKeys.length>=this.size&&(r=this.lruKeys.splice(0,1));for(const e of r)this.deleteKey(e);this.values.set(e,t),this.touchKeyInLRU(e)}}},83940:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debounce=t.Debouncer=void 0,t.Debouncer=class{async debounce(e){return this.state&&(clearTimeout(this.state.timer),this.state.reject(),this.state=void 0),new Promise(((t,r)=>{this.state={timer:setTimeout((()=>t()),e),reject:r}}))}},t.debounce=function(e,t){let r;return(...n)=>(r&&clearTimeout(r),new Promise((i=>{r=setTimeout((()=>{const e=t(...n);i(e)}),e)})))}},11661:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.asyncIterableFromArray=t.asyncIterableMapFilter=t.asyncIterableFilter=t.asyncIterableMap=void 0,t.asyncIterableMap=async function*(e,t){for await(const r of e)yield t(r)},t.asyncIterableFilter=async function*(e,t){for await(const r of e)await t(r)&&(yield r)},t.asyncIterableMapFilter=async function*(e,t){for await(const r of e){const e=await t(r);void 0!==e&&(yield e)}},t.asyncIterableFromArray=async function*(e){for(const t of e)yield t}},39800:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.editorVersionHeaders=t.EditorAndPluginInfo=t.formatNameAndVersion=t.getTestVscInfo=t.VscInfo=t.getVersion=t.getBuild=t.getBuildType=t.isProduction=t.BuildInfo=t.fimSuffixLengthThreshold=t.suffixMatchThreshold=t.suffixPercent=t.getEnabledConfig=t.getLanguageConfig=t.dumpConfig=t.getHiddenConfig=t.isDefaultSettingOverwritten=t.getConfig=t.getConfigDefaultForObjectKey=t.getConfigDefaultForKey=t.InMemoryConfigProvider=t.DefaultsOnlyConfigProvider=t.ConfigProvider=t.ConfigBlockModeConfig=t.BlockModeConfig=t.BuildType=t.shouldDoServerTrimming=t.shouldDoParsingTrimming=t.BlockMode=t.ConfigKey=void 0;const n=r(44617),i=r(68139),o=r(16905),s=r(99876);var a,c;t.ConfigKey={Enable:"enable",InlineSuggestEnable:"inlineSuggest.enable",ShowEditorCompletions:["editor","showEditorCompletions"],EnableAutoCompletions:["editor","enableAutoCompletions"],DelayCompletions:["editor","delayCompletions"],FilterCompletions:["editor","filterCompletions"],DisplayStyle:["advanced","displayStyle"],SecretKey:["advanced","secret_key"],SolutionLength:["advanced","length"],Stops:["advanced","stops"],Temperature:["advanced","temperature"],TopP:["advanced","top_p"],IndentationMode:["advanced","indentationMode"],InlineSuggestCount:["advanced","inlineSuggestCount"],ListCount:["advanced","listCount"],DebugOverrideProxyUrl:["advanced","debug.overrideProxyUrl"],DebugTestOverrideProxyUrl:["advanced","debug.testOverrideProxyUrl"],DebugOverrideEngine:["advanced","debug.overrideEngine"],DebugShowScores:["advanced","debug.showScores"],DebugOverrideLogLevels:["advanced","debug.overrideLogLevels"],DebugFilterLogCategories:["advanced","debug.filterLogCategories"],DebugUseSuffix:["advanced","debug.useSuffix"]},function(e){e.Parsing="parsing",e.Server="server",e.ParsingAndServer="parsingandserver"}(a=t.BlockMode||(t.BlockMode={})),t.shouldDoParsingTrimming=function(e){return[a.Parsing,a.ParsingAndServer].includes(e)},t.shouldDoServerTrimming=function(e){return[a.Server,a.ParsingAndServer].includes(e)},(c=t.BuildType||(t.BuildType={})).DEV="dev",c.PROD="prod",c.NIGHTLY="nightly";class l{}function u(e,t){return e!==a.ParsingAndServer||(0,n.isSupportedLanguageId)(t)?e:a.Server}t.BlockModeConfig=l,t.ConfigBlockModeConfig=class extends l{async forLanguage(e,r){if(e.get(d).isDefaultSettingOverwritten(t.ConfigKey.IndentationMode))switch(e.get(d).getLanguageConfig(t.ConfigKey.IndentationMode,r)){case"client":case!0:case"server":return a.Server;case"clientandserver":return u(a.ParsingAndServer,r);default:return a.Parsing}const i=await e.get(o.Features).overrideBlockMode();return i?u(i,r):"ruby"==r?a.Parsing:(0,n.isSupportedLanguageId)(r)?a.ParsingAndServer:a.Server}};class d{}function p(e){try{const t=s.contributes.configuration[0].properties[`${i.CopilotConfigPrefix}.${e}`].default;if(void 0===t)throw new Error(`Missing config default value: ${i.CopilotConfigPrefix}.${e}`);return t}catch(t){throw new Error(`Error inspecting config default value ${i.CopilotConfigPrefix}.${e}: ${t}`)}}function h(e,t){try{const r=s.contributes.configuration[0].properties[`${i.CopilotConfigPrefix}.${e}`].properties[t].default;if(void 0===r)throw new Error(`Missing config default value: ${i.CopilotConfigPrefix}.${e}`);return r}catch(r){throw new Error(`Error inspecting config default value ${i.CopilotConfigPrefix}.${e}.${t}: ${r}`)}}function f(e,t){return e.get(d).getConfig(t)}function g(e,t){return e.get(d).isDefaultSettingOverwritten(t)}function m(e,t,r){return g(e,t)?f(e,t):r.default}function y(e,t,r){return e.get(d).getLanguageConfig(t,r)}t.ConfigProvider=d,t.DefaultsOnlyConfigProvider=class extends d{getConfig(e){return Array.isArray(e)?h(e[0],e[1]):p(e)}isDefaultSettingOverwritten(e){return!1}dumpConfig(){return{}}getLanguageConfig(e,t){const r=this.getConfig(e);return t&&t in r?r[t]:r["*"]}},t.InMemoryConfigProvider=class{constructor(e,t){this.baseConfigProvider=e,this.overrides=t}getConfig(e){const t=this.overrides.get(e);return void 0!==t?t:this.baseConfigProvider.getConfig(e)}setConfig(e,t){void 0!==t?this.overrides.set(e,t):this.overrides.delete(e)}setLanguageEnablement(e,r){this.overrides.set(t.ConfigKey.Enable,{[e]:r})}isDefaultSettingOverwritten(e){return!!this.overrides.has(e)||this.baseConfigProvider.isDefaultSettingOverwritten(e)}keyAsString(e){return Array.isArray(e)?e.join("."):e}dumpConfig(){const e=this.baseConfigProvider.dumpConfig();return this.overrides.forEach(((t,r)=>{e[this.keyAsString(r)]=JSON.stringify(t)})),e}getLanguageConfig(e,t){const r=this.overrides.get(e);return void 0!==r?void 0!==t?r[t]:r["*"]:this.baseConfigProvider.getLanguageConfig(e,t)}},t.getConfigDefaultForKey=p,t.getConfigDefaultForObjectKey=h,t.getConfig=f,t.isDefaultSettingOverwritten=g,t.getHiddenConfig=m,t.dumpConfig=function(e){return e.get(d).dumpConfig()},t.getLanguageConfig=y,t.getEnabledConfig=function(e,r){return y(e,t.ConfigKey.Enable,r)},t.suffixPercent=async function(e,r,n,i,s){return m(e,t.ConfigKey.DebugUseSuffix,{default:!1})?15:e.get(o.Features).suffixPercent(r,n,i,s)},t.suffixMatchThreshold=async function(e,r,n,i,s){return m(e,t.ConfigKey.DebugUseSuffix,{default:!1})?10:e.get(o.Features).suffixMatchThreshold(r,n,i,s)},t.fimSuffixLengthThreshold=async function(e,r,n,i,s){return m(e,t.ConfigKey.DebugUseSuffix,{default:!1})?0:e.get(o.Features).fimSuffixLengthThreshold(r,n,i,s)};class v{constructor(){this.packageJson=s}isProduction(){return"dev"!=this.getBuildType()}getBuildType(){return this.packageJson.buildType}getVersion(){return this.packageJson.version}getBuild(){return this.packageJson.build}getName(){return this.packageJson.name}}t.BuildInfo=v,t.isProduction=function(e){return e.get(v).isProduction()},t.getBuildType=function(e){return e.get(v).getBuildType()},t.getBuild=function(e){return e.get(v).getBuild()},t.getVersion=function(e){return e.get(v).getVersion()};class _{constructor(e,t,r){this.sessionId=e,this.machineId=t,this.vsCodeVersion=r}}function b({name:e,version:t}){return`${e}/${t}`}t.VscInfo=_,t.getTestVscInfo=function(){return new _("test-session-id","test-machine-id","test-vscode-version")},t.formatNameAndVersion=b;class w{}t.EditorAndPluginInfo=w,t.editorVersionHeaders=function(e){const t=e.get(w);return{"Editor-Version":b(t.getEditorInfo(e)),"Editor-Plugin-Version":b(t.getEditorPluginInfo(e))}}},68139:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CopilotScheme=t.CopilotConfigPrefix=void 0,t.CopilotConfigPrefix="github.copilot",t.CopilotScheme="copilot"},75611:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Context=void 0,t.Context=class{constructor(e){this.baseContext=e,this.constructionStack=[],this.instances=new Map;const t=(new Error).stack?.split("\n");t&&this.constructionStack.push(...t.slice(1))}get(e){const t=this.tryGet(e);if(t)return t;throw new Error(`No instance of ${e.name} has been registered.\n${this}`)}tryGet(e){return this.instances.get(e)||(this.baseContext?this.baseContext.tryGet(e):void 0)}set(e,t){if(this.tryGet(e))throw new Error(`An instance of ${e.name} has already been registered. Use forceSet() if you're sure it's a good idea.`);this.instances.set(e,t)}forceSet(e,t){this.instances.set(e,t)}toString(){let e=" Context created at:\n";for(const t of this.constructionStack||[])e+=` ${t}\n`;return e+=this.baseContext?.toString()??"",e}get debug(){const e={};for(const[t,r]of this.instances)e[t.name]=r;return e}}},75680:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeLocation=t.encodeLocation=t.completionContextForDocument=t.CompletionContext=t.completionTypeToString=t.CompletionType=void 0;const n=r(16630),i=r(52369),o=r(68139);var s;!function(e){e[e.OPEN_COPILOT=2]="OPEN_COPILOT"}(s=t.CompletionType||(t.CompletionType={})),t.completionTypeToString=function(e){return e===s.OPEN_COPILOT?"open copilot":"unknown"};class a{constructor(e,t,r){this.prependToCompletion="",this.appendToCompletion="",this.indentation=null,this.completionType=s.OPEN_COPILOT,this.insertPosition=e.get(i.LocationFactory).position(t.line,t.character),this.completionType=r}static fromJSONParse(e,t){const r=e.get(i.LocationFactory).position(t.insertPosition.line,t.insertPosition.character),n=new a(e,r,t.completionType);return n.prependToCompletion=t.prependToCompletion,n.appendToCompletion=t.appendToCompletion,n.indentation=t.indentation,n}}t.CompletionContext=a,t.completionContextForDocument=function(e,t,r){let n=r;const i=t.lineAt(r.line);return i.isEmptyOrWhitespace||(n=i.range.end),new a(e,n,s.OPEN_COPILOT)};let c=0;t.encodeLocation=function(e,t){const r=e.toString().split("#"),i=r.length>1?r[1]:"",s=JSON.stringify([r[0],t,i]);return n.URI.parse(`${o.CopilotScheme}:GitHub%20Copilot?${s}#${c++}`)},t.decodeLocation=function(e,t){const[r,i,o]=JSON.parse(t.query);return[n.URI.parse(o.length>0?r+"#"+o:r),a.fromJSONParse(e,i)]}},36317:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.launchSolutions=t.normalizeCompletionText=void 0;const n=r(7057),i=r(11661),o=r(39800),s=r(75680),a=r(5798),c=r(47553),l=r(598),u=r(86635),d=r(47917),p=r(24090),h=r(2273),f=r(3591),g=r(3883),m=r(65489),y=r(52369),v=new a.Logger(a.LogLevel.INFO,"solutions");function _(e,t,r,n){return async n=>(0,d.isBlockBodyFinished)(e,t,r,n)}async function b(e,t,r){if(t.isCancellationRequested)return e.removeProgress(),{status:"FinishedWithError",error:"Cancelled"};const n=await r.next();return!0===n.done?(e.removeProgress(),{status:"FinishedNormally"}):{status:"Solution",solution:n.value,next:b(e,t,r)}}t.normalizeCompletionText=function(e){return e.replace(/\s+/g,"")},t.launchSolutions=async function(e,t){const r=t.completionContext.insertPosition,a=t.completionContext.prependToCompletion,w=t.completionContext.indentation,C=e.get(y.LocationFactory),E=await t.getDocument(),T=await(0,p.extractPrompt)(e,E,r);if("contextTooShort"===T.type)return t.reportCancelled(),{status:"FinishedWithError",error:"Context too short"};const S=T.prompt,x=T.trailingWs;x.length>0&&(t.startPosition=C.position(t.startPosition.line,t.startPosition.character-x.length));const k=t.getCancellationToken(),I=n.v4();t.savedTelemetryData=m.TelemetryData.createAndMarkAsIssued({headerRequestId:I,languageId:E.languageId,source:(0,s.completionTypeToString)(t.completionContext.completionType)},{...(0,m.telemetrizePromptLength)(S),solutionCount:t.solutionCountTarget,promptEndPos:E.offsetAt(r)}),v.info(e,`prompt: ${JSON.stringify(S)}`),v.debug(e,`prependToCompletion: ${a}`),(0,m.telemetry)(e,"solution.requested",t.savedTelemetryData);const A=await e.get(o.BlockModeConfig).forLanguage(e,E.languageId),P=(0,h.isSupportedLanguageId)(E.languageId),R=(0,d.contextIndentation)(E,r),N={stream:!0,extra:{language:E.languageId,next_indent:R.next??0}};"parsing"!==A||P||(N.stop=["\n\n","\r\n\r\n"]);const O=(0,f.extractRepoInfoInBackground)(e,E.fileName),D={prompt:S,languageId:E.languageId,repoInfo:O,ourRequestId:I,engineUrl:await(0,c.getEngineURL)(e,(0,f.tryGetGitHubNWO)(O),E.languageId,(0,f.getDogFood)(O),await(0,f.getUserKind)(e),t.savedTelemetryData),count:t.solutionCountTarget,uiKind:l.CopilotUiKind.Panel,postOptions:N,requestLogProbs:!0};let L;switch(t.completionContext.completionType,A){case o.BlockMode.Server:L=async e=>{},N.extra.force_indent=R.prev??-1,N.extra.trim_by_indentation=!0;break;case o.BlockMode.ParsingAndServer:L=P?_(e,E,t.startPosition):async e=>{},N.extra.force_indent=R.prev??-1,N.extra.trim_by_indentation=!0;break;case o.BlockMode.Parsing:default:L=P?_(e,E,t.startPosition):async e=>{}}e.get(u.StatusReporter).setProgress();const M=await e.get(l.OpenAIFetcher).fetchAndStreamCompletions(e,D,m.TelemetryData.createAndMarkAsIssued(),L,k);if("failed"===M.type||"canceled"===M.type)return t.reportCancelled(),e.get(u.StatusReporter).removeProgress(),{status:"FinishedWithError",error:`${M.type}: ${M.reason}`};let B=M.choices;B=async function*(e,t){for await(const r of e){const e={...r};e.completionText=t+e.completionText.trimRight(),yield e}}(B,a),null!==w&&(B=(0,l.cleanupIndentChoices)(B,w)),B=(0,i.asyncIterableMapFilter)(B,(async t=>(0,g.postProcessChoice)(e,"solution",E,r,t,!1,v)));const F=(0,i.asyncIterableMapFilter)(B,(async n=>{let i=n.completionText;if(v.info(e,`Open Copilot completion: [${n.completionText}]`),t.completionContext.completionType===s.CompletionType.OPEN_COPILOT){let t="";const o=await(0,d.getNodeStart)(e,E,r,n.completionText);if(o)[t]=(0,p.trimLastLine)(E.getText(C.range(C.position(o.line,o.character),r)));else{const e=C.position(r.line,0);t=E.getText(C.range(e,r))}i=t+i}let o=n.completionText;x.length>0&&o.startsWith(x)&&(o=o.substring(x.length));const c=n.meanLogProb,l=void 0!==c?Math.exp(c):0,u=(await t.getDocument()).version;return{displayText:i,meanProb:l,meanLogProb:c||0,completionText:o,requestId:n.requestId,choiceIndex:n.choiceIndex,prependToCompletion:a,docVersion:u}}));return b(e.get(u.StatusReporter),k,F[Symbol.asyncIterator]())}},30446:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerDefaultHandlers=void 0;const n=r(20039),i=r(65489);t.registerDefaultHandlers=function(e,t){process.addListener("uncaughtException",(t=>{console.error("uncaughtException",t),i.telemetryException(e,t,"uncaughtException")}));let r=!1;process.addListener("unhandledRejection",((o,s)=>{if(r)return;if(r=!0,"vscode"===t&&!o)return;if("aborted"===o.type||(0,n.isAbortError)(o))return;if("vscode"===t&&["ENOTFOUND","ECONNREFUSED","ECONNRESET","ETIMEDOUT","ENETDOWN","ENETUNREACH","EADDRNOTAVAIL"].includes(o.code))return;if("ENOENT"==o.code)return;let a="";try{a=`${o.message} (${o.code})`,a=JSON.stringify(o)}catch(e){a="[actual reason JSON was cyclic]"}"{}"!==a&&(console.error("unhandledRejection",a),i.telemetryError(e,"unhandledRejection",i.TelemetryData.createAndMarkAsIssued({origin:"unhandledRejection",reason:"Unhandled rejection logged to restricted telemetry"}),!1),i.telemetryError(e,"unhandledRejection",i.TelemetryData.createAndMarkAsIssued({origin:"unhandledRejection",reason:a}),!0),r=!1)}))}},25225:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerCursorTracker=t.cursorHistoryStack=t.registerDocumentTracker=t.sortByAccessTimes=t.accessTimes=void 0;const n=r(70819);t.accessTimes=new Map,t.sortByAccessTimes=function(e){return[...e].sort(((e,r)=>{const n=t.accessTimes.get(e.uri.toString())??0;return(t.accessTimes.get(r.uri.toString())??0)-n}))},t.registerDocumentTracker=e=>e.get(n.TextDocumentManager).onDidFocusTextDocument((e=>{e&&t.accessTimes.set(e.document.uri.toString(),Date.now())})),t.cursorHistoryStack=[],t.registerCursorTracker=e=>e.get(n.TextDocumentManager).onDidChangeCursor((e=>{e&&e.selections.length>0&&e.selections[0].active.line==e.selections[0].anchor.line&&e.selections[0].active.character==e.selections[0].anchor.character&&(t.cursorHistoryStack.push({uri:e.textEditor.document.uri.toString(),offset:e.textEditor.document.offsetAt(e.selections[0].active),timestamp:Date.now()}),t.cursorHistoryStack.length>1e3&&t.cursorHistoryStack.shift())}))},70769:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UserErrorNotifier=void 0;const n=r(5798),i=r(69035),o=r(84567),s=["UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_SIGNATURE_FAILURE"];t.UserErrorNotifier=class{constructor(){this.notifiedErrorCodes=[]}async notifyUser(e,t){s.includes(t.code)&&!this.didNotifyBefore(t.code)&&(this.displayCertificateErrorNotification(e,t),this.notifiedErrorCodes.push(t.code))}displayCertificateErrorNotification(e,t){const r="https://aka.ms/copilot-ssc",i="Your current Copilot license doesn't support proxy connections with self-signed certificates.";new n.Logger(n.LogLevel.ERROR,"certificates").error(e,`${i} Please visit ${r} to learn more. Original cause: ${JSON.stringify(t)}`),this.showCertificateWarningMessage(e,i,r)}showCertificateWarningMessage(e,t,r){const n={title:"Learn more"};e.get(i.NotificationSender).showWarningMessage(t,n).then((t=>{t?.title===n.title&&e.get(o.UrlOpener).open(r)}))}didNotifyBefore(e){return-1!==this.notifiedErrorCodes.indexOf(e)}}},75917:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExpConfig=t.ExpTreatmentVariables=void 0;const n=r(65489),i=r(74914);var o;(o=t.ExpTreatmentVariables||(t.ExpTreatmentVariables={})).AA="copilotaa",o.CustomEngine="copilotcustomengine",o.Fetcher="copilotfetcher",o.OverrideBlockMode="copilotoverrideblockmode",o.OverrideNumGhostCompletions="copilotoverridednumghostcompletions",o.SuffixPercent="CopilotSuffixPercent",o.BeforeRequestWaitMs="copilotlms",o.NeighboringTabsOption="copilotneighboringtabs",o.NeighboringSnippetTypes="copilotneighboringsnippettypes",o.DebounceMs="copilotdebouncems",o.DebouncePredict="copilotdebouncepredict",o.ContextualFilterEnable="copilotcontextualfilterenable",o.ContextualFilterEnableTree="copilotcontextualfilterenabletree",o.ContextualFilterAcceptThreshold="copilotcontextualfilteracceptthreshold",o.ContextualFilterExplorationTraffic="copilotcontextualfilterexplorationtraffic",o.disableLogProb="copilotdisablelogprob",o.RepetitionFilterMode="copilotrepetitionfiltermode",o.DropCompletionReasons="copilotdropcompletionreasons",o.GranularityTimePeriodSizeInH="copilottimeperiodsizeinh",o.GranularityByCallBuckets="copilotbycallbuckets",o.SuffixStartMode="copilotsuffixstartmode",o.SuffixMatchThreshold="copilotsuffixmatchthreshold",o.FimSuffixLengthThreshold="copilotfimsuffixlenthreshold",o.MultiLogitBias="copilotlbeot",o.TokenizerName="copilottokenizername",o.IndentationMinLength="copilotindentationminlength",o.IndentationMaxLength="copilotindentationmaxlength",o.OpenFileStrategy="openfilestrategy",o.CursorHistoryStrategy="cursorhistorystrategy",o.MostRecent="mostrecent",o.MostCount="mostcount",o.BeforeCurrentFile="beforecurrentfile";class s{constructor(e,t,r){this.variables=e,this.assignmentContext=t,this.features=r}static createFallbackConfig(e,t){return(0,n.telemetryExpProblem)(e,{reason:t}),this.createEmptyConfig()}static createEmptyConfig(){return new s({},"","")}addToTelemetry(e){e.properties[i.ExpServiceTelemetryNames.featuresTelemetryPropertyName]=this.features,e.properties[i.ExpServiceTelemetryNames.assignmentContextTelemetryPropertyName]=this.assignmentContext}}t.ExpConfig=s},16905:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Features=t.Task=void 0;const n=r(44617),i=r(32137),o=r(70140),s=r(39800),a=r(80187),c=r(29975),l=r(54604),u=r(75917),d=r(66046),p=r(22249),h=r(68495);class f{constructor(e){this.ctx=e,this.cache=new o.LRUCache(200)}async fetchExpConfig(e){let t=this.cache.get(e.stringify());return t||(t=new g((()=>this.ctx.get(d.ExpConfigMaker).fetchExperiments(this.ctx,e.toHeaders())),36e5),this.cache.put(e.stringify(),t)),t.run()}getCachedExpConfig(e){return this.cache.get(e.stringify())?.value()}}class g{constructor(e,t=1/0){this.producer=e,this.expirationMs=t}async run(){return void 0===this.promise&&(this.promise=this.producer(),this.storeResult(this.promise).then((()=>{this.expirationMs<1/0&&void 0!==this.promise&&setTimeout((()=>this.promise=void 0),this.expirationMs)}))),this.promise}async storeResult(e){try{this.result=await e}finally{void 0===this.result&&(this.promise=void 0)}}value(){return this.result}}t.Task=g;class m{constructor(e){this.ctx=e,this.staticFilters={},this.dynamicFilters={},this.upcomingDynamicFilters={},this.assignments=new f(this.ctx),this.granularityDirectory=new h.GranularityDirectory("unspecified",e.get(i.Clock))}setPrefix(e){this.granularityDirectory=new h.GranularityDirectory(e,this.ctx.get(i.Clock))}registerStaticFilters(e){Object.assign(this.staticFilters,e)}registerDynamicFilter(e,t){this.dynamicFilters[e]=t}getDynamicFilterValues(){const e={};for(const[t,r]of Object.entries(this.dynamicFilters))e[t]=r();return e}registerUpcomingDynamicFilter(e,t){this.upcomingDynamicFilters[e]=t}async getAssignment(e,t={},r){const n=this.makeFilterSettings(t),i=this.granularityDirectory.extendFilters(n),o=await this.getExpConfig(i.newFilterSettings);this.granularityDirectory.update(n,+(o.variables[u.ExpTreatmentVariables.GranularityByCallBuckets]??NaN),+(o.variables[u.ExpTreatmentVariables.GranularityTimePeriodSizeInH]??NaN));const s=this.granularityDirectory.extendFilters(n),a=s.newFilterSettings,c=await this.getExpConfig(a);let l=new Promise((e=>setTimeout(e,m.upcomingDynamicFilterCheckDelayMs)));for(const e of s.otherFilterSettingsToPrefetch)l=l.then((async()=>{await new Promise((e=>setTimeout(e,m.upcomingDynamicFilterCheckDelayMs))),this.getExpConfig(e)}));return this.prepareForUpcomingFilters(a),r&&(r.filtersAndExp={exp:c,filters:a}),c.variables[e]}makeFilterSettings(e){return new p.FilterSettings({...this.staticFilters,...this.getDynamicFilterValues(),...e})}async getExpConfig(e){try{return this.assignments.fetchExpConfig(e)}catch(e){return u.ExpConfig.createFallbackConfig(this.ctx,`Error fetching ExP config: ${e}`)}}async prepareForUpcomingFilters(e){if(!((new Date).getMinutes()<60-m.upcomingTimeBucketMinutes))for(const[t,r]of Object.entries(this.upcomingDynamicFilters))await new Promise((e=>setTimeout(e,m.upcomingDynamicFilterCheckDelayMs))),this.getExpConfig(e.withChange(t,r()))}stringify(){const e=this.assignments.getCachedExpConfig(new p.FilterSettings({}));return JSON.stringify(e?.variables??{})}async customEngine(e,t,r,n,i){const o={[p.Filter.CopilotRepository]:e,[p.Filter.CopilotFileType]:t,[p.Filter.CopilotDogfood]:r,[p.Filter.CopilotUserKind]:n};return await this.getAssignment(u.ExpTreatmentVariables.CustomEngine,o,i)??""}async beforeRequestWaitMs(e,t,r,n,i){const o={[p.Filter.CopilotRepository]:e,[p.Filter.CopilotFileType]:t,[p.Filter.CopilotUserKind]:r,[p.Filter.CopilotDogfood]:n};return await this.getAssignment(u.ExpTreatmentVariables.BeforeRequestWaitMs,o,i)??0}async multiLogitBias(e,t,r,n,i){const o={[p.Filter.CopilotRepository]:e,[p.Filter.CopilotFileType]:t,[p.Filter.CopilotUserKind]:r,[p.Filter.CopilotDogfood]:n};return await this.getAssignment(u.ExpTreatmentVariables.MultiLogitBias,o,i)??!1}async debounceMs(){return await this.getAssignment(u.ExpTreatmentVariables.DebounceMs)??0}async debouncePredict(){return await this.getAssignment(u.ExpTreatmentVariables.DebouncePredict)??!1}async contextualFilterEnable(){return await this.getAssignment(u.ExpTreatmentVariables.ContextualFilterEnable)??!0}async contextualFilterEnableTree(){return await this.getAssignment(u.ExpTreatmentVariables.ContextualFilterEnableTree)??!0}async contextualFilterAcceptThreshold(){return await this.getAssignment(u.ExpTreatmentVariables.ContextualFilterAcceptThreshold)??a.contextualFilterAcceptThreshold}async contextualFilterExplorationTraffic(){return await this.getAssignment(u.ExpTreatmentVariables.ContextualFilterExplorationTraffic)??a.contextualFilterExplorationTraffic}async disableLogProb(){return await this.getAssignment(u.ExpTreatmentVariables.disableLogProb)??!0}async indentationMinLength(e,t,r,n){const i={[p.Filter.CopilotRepository]:e,[p.Filter.CopilotFileType]:t,[p.Filter.CopilotDogfood]:r,[p.Filter.CopilotUserKind]:n};return await this.getAssignment(u.ExpTreatmentVariables.IndentationMinLength,i)??void 0}async indentationMaxLength(e,t,r,n){const i={[p.Filter.CopilotRepository]:e,[p.Filter.CopilotFileType]:t,[p.Filter.CopilotDogfood]:r,[p.Filter.CopilotUserKind]:n};return await this.getAssignment(u.ExpTreatmentVariables.IndentationMaxLength,i)??void 0}async overrideBlockMode(){return await this.getAssignment(u.ExpTreatmentVariables.OverrideBlockMode)}async overrideNumGhostCompletions(){return await this.getAssignment(u.ExpTreatmentVariables.OverrideNumGhostCompletions)}async suffixPercent(e,t,r,n){const i={[p.Filter.CopilotRepository]:e,[p.Filter.CopilotFileType]:t,[p.Filter.CopilotUserKind]:r,[p.Filter.CopilotDogfood]:n};return(0,s.getConfig)(this.ctx,s.ConfigKey.DebugOverrideEngine)?0:await this.getAssignment(u.ExpTreatmentVariables.SuffixPercent,i)??15}async suffixMatchThreshold(e,t,r,n){const i={[p.Filter.CopilotRepository]:e,[p.Filter.CopilotFileType]:t,[p.Filter.CopilotUserKind]:r,[p.Filter.CopilotDogfood]:n};return await this.getAssignment(u.ExpTreatmentVariables.SuffixMatchThreshold,i)??10}async fimSuffixLengthThreshold(e,t,r,n){const i={[p.Filter.CopilotRepository]:e,[p.Filter.CopilotFileType]:t,[p.Filter.CopilotUserKind]:r,[p.Filter.CopilotDogfood]:n};return await this.getAssignment(u.ExpTreatmentVariables.FimSuffixLengthThreshold,i)??0}async suffixStartMode(e,t,r,i){const o={[p.Filter.CopilotRepository]:e,[p.Filter.CopilotFileType]:t,[p.Filter.CopilotUserKind]:r,[p.Filter.CopilotDogfood]:i};switch(await this.getAssignment(u.ExpTreatmentVariables.SuffixStartMode,o)){case"cursor":return n.SuffixStartMode.Cursor;case"cursortrimstart":default:return n.SuffixStartMode.CursorTrimStart;case"siblingblock":return n.SuffixStartMode.SiblingBlock;case"siblingblocktrimstart":return n.SuffixStartMode.SiblingBlockTrimStart}}async tokenizerName(e,t){const r={[p.Filter.CopilotRepository]:e,[p.Filter.CopilotUserKind]:t};switch(await this.getAssignment(u.ExpTreatmentVariables.TokenizerName,r)){case"cushman001":default:return n.TokenizerName.cushman001;case"cushman002":return n.TokenizerName.cushman002;case"mock":return n.TokenizerName.mock}}async neighboringTabsOption(e,t,r,i){const o={[p.Filter.CopilotRepository]:e,[p.Filter.CopilotFileType]:t,[p.Filter.CopilotUserKind]:r,[p.Filter.CopilotDogfood]:i};switch(await this.getAssignment(u.ExpTreatmentVariables.NeighboringTabsOption,o)){case"none":return n.NeighboringTabsOption.None;case"conservative":return n.NeighboringTabsOption.Conservative;case"medium":return n.NeighboringTabsOption.Medium;case"eager":default:return n.NeighboringTabsOption.Eager;case"eagerbutlittle":return n.NeighboringTabsOption.EagerButLittle;case"eagerbutmedium":return n.NeighboringTabsOption.EagerButMedium}}async neighboringSnippetTypes(e,t,r,i){const o={[p.Filter.CopilotRepository]:e,[p.Filter.CopilotFileType]:t,[p.Filter.CopilotUserKind]:r,[p.Filter.CopilotDogfood]:i};return"function"===await this.getAssignment(u.ExpTreatmentVariables.NeighboringSnippetTypes,o)?n.NeighboringSnippetType.NeighboringFunctions:n.NeighboringSnippetType.NeighboringSnippets}async repetitionFilterMode(){switch(await this.getAssignment(u.ExpTreatmentVariables.RepetitionFilterMode)){case"proxy":return l.RepetitionFilterMode.PROXY;case"both":return l.RepetitionFilterMode.BOTH;default:return l.RepetitionFilterMode.CLIENT}}async dropCompletionReasons(){const e=await this.getAssignment(u.ExpTreatmentVariables.DropCompletionReasons);return e?e.split(","):[]}async openFileStrategy(e,t,r){const n={[p.Filter.CopilotRepository]:e,[p.Filter.CopilotUserKind]:t,[p.Filter.CopilotFileType]:r};return await this.getAssignment(u.ExpTreatmentVariables.OpenFileStrategy,n)??!0}async cursorHistoryStrategy(e,t,r){const n={[p.Filter.CopilotRepository]:e,[p.Filter.CopilotUserKind]:t,[p.Filter.CopilotFileType]:r};switch(await this.getAssignment(u.ExpTreatmentVariables.CursorHistoryStrategy,n)){case"mostrecent":return c.CursorHistoryStrategy.MostRecent;case"mostcount":return c.CursorHistoryStrategy.MostCount;case"beforecurrentfile":return c.CursorHistoryStrategy.BeforeCurrentFile;default:return c.CursorHistoryStrategy.None}}async addExpAndFilterToTelemetry(e){const t=this.makeFilterSettings({});e.filtersAndExp={filters:t,exp:await this.getExpConfig(t)}}}t.Features=m,m.upcomingDynamicFilterCheckDelayMs=20,m.upcomingTimeBucketMinutes=5+Math.floor(11*Math.random())},66046:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExpConfigNone=t.ExpConfigFromTAS=t.ExpConfigMaker=void 0;const n=r(20039),i=r(75917);class o{}t.ExpConfigMaker=o,t.ExpConfigFromTAS=class extends o{async fetchExperiments(e,t){const r=e.get(n.Fetcher);let o;try{o=await r.fetch("https://default.exp-tas.com/vscode/ab",{method:"GET",headers:t})}catch(t){return i.ExpConfig.createFallbackConfig(e,`Error fetching ExP config: ${t}`)}if(!o.ok)return i.ExpConfig.createFallbackConfig(e,`ExP responded with ${o.status}`);const s=await o.json(),a=s.Configs.find((e=>"vscode"===e.Id))??{Id:"vscode",Parameters:{}},c=Object.entries(a.Parameters).map((([e,t])=>e+(t?"":"cf")));return new i.ExpConfig(a.Parameters,s.AssignmentContext,c.join(";"))}},t.ExpConfigNone=class extends o{async fetchExperiments(e,t){return i.ExpConfig.createEmptyConfig()}}},22249:(e,t)=>{"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.FilterSettings=t.telmetryNames=t.TargetPopulation=t.Filter=void 0,function(e){e.Market="X-MSEdge-Market",e.CorpNet="X-FD-Corpnet",e.ApplicationVersion="X-VSCode-AppVersion",e.Build="X-VSCode-Build",e.ClientId="X-MSEdge-ClientId",e.ExtensionName="X-VSCode-ExtensionName",e.ExtensionVersion="X-VSCode-ExtensionVersion",e.Language="X-VSCode-Language",e.TargetPopulation="X-VSCode-TargetPopulation",e.CopilotClientTimeBucket="X-Copilot-ClientTimeBucket",e.CopilotOverrideEngine="X-Copilot-OverrideEngine",e.CopilotRepository="X-Copilot-Repository",e.CopilotFileType="X-Copilot-FileType",e.CopilotUserKind="X-Copilot-UserKind",e.CopilotDogfood="X-Copilot-Dogfood"}(r=t.Filter||(t.Filter={})),(n=t.TargetPopulation||(t.TargetPopulation={})).Team="team",n.Internal="internal",n.Insiders="insider",n.Public="public",t.telmetryNames={[r.CopilotClientTimeBucket]:"timeBucket",[r.CopilotOverrideEngine]:"engine",[r.CopilotRepository]:"repo",[r.CopilotFileType]:"fileType",[r.CopilotUserKind]:"userKind"};class i{constructor(e){this.filters=e;for(const[e,t]of Object.entries(this.filters))""===t&&delete this.filters[e]}extends(e){for(const[t,r]of Object.entries(e.filters))if(this.filters[t]!==r)return!1;return!0}addToTelemetry(e){for(const[r,n]of Object.entries(this.filters)){const i=t.telmetryNames[r];void 0!==i&&(e.properties[i]=n)}}stringify(){const e=Object.keys(this.filters);return e.sort(),e.map((e=>`${e}:${this.filters[e]}`)).join(";")}toHeaders(){return{...this.filters}}withChange(e,t){return new i({...this.filters,[e]:t})}}t.FilterSettings=i},68495:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GranularityDirectory=void 0;const n=r(22249),i=r(52505),o=n.Filter.CopilotClientTimeBucket;t.GranularityDirectory=class{constructor(e,t){this.specs=new Map,this.prefix=e,this.clock=t,this.defaultGranularity=(0,i.DEFAULT_GRANULARITY)(e)}selectGranularity(e){for(const[t,r]of this.specs.entries())if(e.extends(t))return r;return this.defaultGranularity}update(e,t,r){if(t=t>1?t:NaN,r=r>0?r:NaN,isNaN(t)&&isNaN(r))this.specs.delete(e);else{const n=new i.TimeBucketGranularity(this.prefix);isNaN(t)||n.setByCallBuckets(t),isNaN(r)||n.setTimePeriod(3600*r*1e3),this.specs.set(e,n)}}extendFilters(e){const t=this.selectGranularity(e),[r,n]=t.getCurrentAndUpComingValues(this.clock.now());return{newFilterSettings:e.withChange(o,r),otherFilterSettingsToPrefetch:n.map((t=>e.withChange(o,t)))}}}},52505:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimeBucketGranularity=t.DEFAULT_GRANULARITY=t.GranularityImplementation=void 0;class r{getCurrentAndUpComingValues(e){return[this.getValue(e),this.getUpcomingValues(e)]}constructor(e){this.prefix=e}}t.GranularityImplementation=r;class n extends r{getValue(e){return this.prefix}getUpcomingValues(e){return[]}}t.DEFAULT_GRANULARITY=e=>new n(e),t.TimeBucketGranularity=class extends r{constructor(e,t=.5,r=(new Date).setUTCHours(0,0,0,0)){super(e),this.prefix=e,this.fetchBeforeFactor=t,this.anchor=r}setTimePeriod(e){isNaN(e)?this.timePeriodLengthMs=void 0:this.timePeriodLengthMs=e}setByCallBuckets(e){isNaN(e)?this.numByCallBuckets=void 0:this.numByCallBuckets=e}getValue(e){return this.prefix+this.getTimePeriodBucketString(e)+(this.numByCallBuckets?this.timeHash(e):"")}getTimePeriodBucketString(e){return this.timePeriodLengthMs?this.dateToTimePartString(e):""}getUpcomingValues(e){const t=[],r=this.getUpcomingTimePeriodBucketStrings(e),n=this.getUpcomingByCallBucketStrings();for(const e of r)for(const r of n)t.push(this.prefix+e+r);return t}getUpcomingTimePeriodBucketStrings(e){if(void 0===this.timePeriodLengthMs)return[""];if((e.getTime()-this.anchor)%this.timePeriodLengthMse.toString()))}timeHash(e){return null==this.numByCallBuckets?0:e.getTime()%this.numByCallBuckets*7883%this.numByCallBuckets}dateToTimePartString(e){return null==this.timePeriodLengthMs?"":Math.floor((e.getTime()-this.anchor)/this.timePeriodLengthMs).toString()}}},74914:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.ExpServiceTelemetryNames=void 0,(r=t.ExpServiceTelemetryNames||(t.ExpServiceTelemetryNames={})).featuresTelemetryPropertyName="VSCode.ABExp.Features",r.assignmentContextTelemetryPropertyName="abexp.assignmentcontext"},96817:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contextualFilterScore=t.getLastLineLength=t.ContextualFilterManager=void 0;const n=r(80187),i=r(54725);class o{constructor(){this.previousLabel=0,this.previousLabelTimestamp=Date.now()-3600,this.probabilityAccept=0}}function s(e){const t=e.split("\n");return t[t.length-1].length}t.ContextualFilterManager=o,t.getLastLineLength=s,t.contextualFilterScore=function(e,t,r,a){const c=e.get(o),l=c.previousLabel;let u=0;"afterCursorWhitespace"in t.properties&&"true"===t.properties.afterCursorWhitespace&&(u=1);const d=(Date.now()-c.previousLabelTimestamp)/1e3,p=Math.log(1+d);let h=0,f=0;const g=r.prefix;if(g){h=Math.log(1+s(g));const e=g.slice(-1);void 0!==n.contextualFilterCharacterMap[e]&&(f=n.contextualFilterCharacterMap[e])}let m=0,y=0;const v=g.trimEnd();if(v){m=Math.log(1+s(v));const e=v.slice(-1);void 0!==n.contextualFilterCharacterMap[e]&&(y=n.contextualFilterCharacterMap[e])}let _=0;if("documentLength"in t.measurements){const e=t.measurements.documentLength;_=Math.log(1+e)}let b=0;if("promptEndPos"in t.measurements){const e=t.measurements.promptEndPos;b=Math.log(1+e)}let w=0;if("promptEndPos"in t.measurements&&"documentLength"in t.measurements){const e=t.measurements.documentLength;w=(t.measurements.promptEndPos+.5)/(1+e)}let C=0;void 0!==n.contextualFilterLanguageMap[t.properties.languageId]&&(C=n.contextualFilterLanguageMap[t.properties.languageId]);let E=0;if(a){const e=new Array(221).fill(0);e[0]=l,e[1]=u,e[2]=p,e[3]=h,e[4]=m,e[5]=_,e[6]=b,e[7]=w,e[8+C]=1,e[29+f]=1,e[125+y]=1,E=(0,i.treeScore)(e)[1]}else{let e=n.contextualFilterIntercept;e+=n.contextualFilterWeights[0]*l,e+=n.contextualFilterWeights[1]*u,e+=n.contextualFilterWeights[2]*p,e+=n.contextualFilterWeights[3]*h,e+=n.contextualFilterWeights[4]*m,e+=n.contextualFilterWeights[5]*_,e+=n.contextualFilterWeights[6]*b,e+=n.contextualFilterWeights[7]*w,e+=n.contextualFilterWeights[8+C],e+=n.contextualFilterWeights[29+f],e+=n.contextualFilterWeights[125+y],E=1/(1+Math.exp(-e))}return e.get(o).probabilityAccept=E,E}},80187:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contextualFilterCharacterMap=t.contextualFilterLanguageMap=t.contextualFilterWeights=t.contextualFilterIntercept=t.contextualFilterExplorationTraffic=t.contextualFilterAcceptThreshold=void 0,t.contextualFilterAcceptThreshold=35,t.contextualFilterExplorationTraffic=1,t.contextualFilterIntercept=-.3043572714994554,t.contextualFilterWeights=[.9978708359643611,.7001905605239328,-.1736749244124868,-.22994157947320112,.13406692641682572,-.007751370662011853,.0057783222035240715,.41910878254476003,-.1621657125711092,.13770814958908187,-.06036011308184006,-.07351180985800129,0,-.05584878151248109,.30618794079412015,-.1282197982598485,.10951859303997555,.1700461782788777,-.3346057842644757,.22497985923128136,0,-.44038101825774356,-.6540115939236782,.16595600081341702,.20733910722385135,-.1337033766105696,-.06923072125290894,-.05806684191976292,.3583334671633344,-.47357732824944315,.17810871365594377,.42268219963946685,0,0,-.16379620467004602,-.43893868831061167,0,.11570094006709251,.9326431262654882,-.9990110509203912,-.44125275652726503,-.15840786997162004,-.4600396256644451,-.018814811994044403,.09230944537175266,.025814790934742798,-1.0940162204190154,-.9407503631235489,-.9854303778694269,-1.1045822488262245,-1.1417299456573262,-1.5623704405345513,-.4157473855795939,-1.0244257735561713,-.7477401944601753,-1.1275109699068402,-.0714715633552533,-1.1408628006786907,-1.0409898655074672,-.2288889836518878,-.5469549893760344,-.181946611106845,.1264329316374918,0,0,.312206968554707,-.3656436392517924,.23655650686038968,.1014912419901576,0,.06287549221765308,0,0,.19027065218932154,-.8519502045974378,0,.23753599905971923,.2488809322489166,.019969251907983224,0,.06916505526229488,.29053356359188204,-.14484456555431657,.014768129429370188,-.15051464926341374,.07614835502776021,-.3317489901313935,0,0,.04921938684669103,-.28248576768353445,-.9708816204525345,-1.3560464522265527,.014165375212383239,-.23924166472544983,.10006595730248855,.09867233147279562,.32330430333220644,-.058625706114180595,.17149853105783947,.4436484054395367,.047189049576707255,.16832520944790552,.1117259900942179,-.35469010329927253,0,-.1528189124465582,-.3804848349564939,.07278077320753953,.13263786480064088,.22920682659292527,1.1512955314336537,0,.016939862282340023,.4242994650403408,.12759835577444986,-.5577261135825583,-.19764560943067672,-.4042102444736004,.12063461617733708,-.2933966817484834,.2715683893968593,0,-.7138548251238751,0,-.023066228703035277,0,-.06383043976746139,.09683723720709651,-.7337151424080791,0,-.27191370124625525,.2819781269656171,-.08711496549050252,.11048604909969338,-.0934849550450534,.0721001250772912,.2589126797890794,.6729582659532254,-.21921032738244908,-.21535277468651456,-.45474006124091354,-.05861820126419139,-.007875306207720204,-.056661261678809284,.17727881404222662,.23603713348534658,.17485861412377932,-.5737483768696752,-.38220029570342745,-.5202722985519168,-.37187947527657256,.47155277792990113,-.12077912346691123,.47825628981545326,.4736704404000214,-.1615218651546898,.18362447973513005,0,0,-.18183417425866824,0,0,-.2538532305733833,-.1303692690676528,-.4073577969188216,.04172985870928789,-.1704527388573901,0,0,.7536858953385828,-.44703159588787644,0,-.7246484085580873,-.21378128540782063,0,.037461090552656146,-.16205852364367032,-.10973952064404884,.017468043407647377,-.1288980387397392,0,0,0,-1.218692715379445,.05536949662193305,-.3763799844799116,-.1845001725624579,-.1615576298149558,0,-.15373262203249874,-.04603412604270418,0,-.3068149681460828,.09412352468269412,0,.09116543650609721,.06065865264082559,.05688267379386188,-.05873945477722306,0,.14532465133322153,.1870857769705463,.36304258043185555,.1411392422180405,.0630388629716367,0,-1.1170522012450395,.16133697772771127,.15908534390781448,-.23485453704002232,-.1419980841417892,.21909510179526218,.39948420260153766,.40802294284289187,.15403767653746853,0,.19764784115096676,.584914157527457,0,-.4573883817015294],t.contextualFilterLanguageMap={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},t.contextualFilterCharacterMap={" ":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}},54725:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.treeScore=void 0,t.treeScore=function(e){let t,r,n,i,o,s,a,c,l,u,d,p,h,f,g,m,y,v,_,b,w,C,E,T,S,x,k,I,A,P,R,N,O,D,L,M,B,F,j,U,$,q,H,V,z,K,W,G,Q,Y,J,X,Z,ee,te,re,ne,ie,oe,se,ae,ce,le,ue,de,pe,he,fe,ge,me,ye,ve,_e,be,we,Ce,Ee,Te,Se,xe,ke,Ie,Ae,Pe,Re,Ne,Oe,De,Le,Me,Be,Fe,je,Ue,$e,qe,He,Ve,ze,Ke;t=e[0]>1e-35?e[29]>1e-35?e[138]>1e-35?.49496579646815353:.47546580490346646:e[30]>1e-35?.4456371992737078:e[4]>3.238486181444842?e[135]>1e-35?.2645576817782658:e[46]>1e-35?.20251922126765812:.37359143313367105:e[7]>.9662372103242399?.44975631109230374:.4067133376207218:e[7]>.960816451500545?e[29]>1e-35?e[4]>1.7005986908310777?.4240336839258693:.35414085998710754:e[4]>3.238486181444842?.353882328354817:e[100]>1e-35?.48783079865293355:e[30]>1e-35?.419904106522537:.38599249795612806:e[4]>3.6242520361853052?e[29]>1e-35?e[7]>.5086748127709895?.37522628419389664:.3359393805000766:e[30]>1e-35?.3685210833144829:e[135]>1e-35?.22140958666091123:e[134]>1e-35?.38379851487275685:e[46]>1e-35?.1926283522107934:.3098162447812857:e[46]>1e-35?.22698331991181095:e[4]>1.4978661367769956?e[30]>1e-35?e[4]>2.138333059508028?.39709448374768985:.34711865383837703:e[134]>1e-35?.40608455346469957:e[135]>1e-35?.3084120164848763:e[48]>1e-35?.24193590696691425:e[51]>1e-35?.2087938690163009:e[4]>3.1984648276080736?.3529508564858481:.3698795818909763:.30210240039979064,r=e[0]>1e-35?e[2]>2.4414009612931857?e[2]>3.676220550121792?e[7]>.9246495578512688?.0570428673081833:.019779482100154476:e[7]>.9705672697050661?.1023948532887641:.06265430080550045:e[29]>1e-35?e[5]>4.658699722134796?e[2]>1.2424533248940002?.12784241430585772:.15126156743993927:e[8]>1e-35?e[2]>.8958797346140276?.10624230855386699:-.1699142543394302:.10290106276456985:e[5]>3.5694334999727624?.09368877801612557:.1552615744687782:e[2]>3.3842466058243152?e[4]>3.5694334999727624?e[29]>1e-35?e[7]>.7022798213723723?.02282408308012389:-.032610792718175546:-.04405498437523181:e[46]>1e-35?-.14475563528583885:e[7]>.9159108669154322?.02539215399728953:e[134]>1e-35?.04720629593220485:e[4]>1.8688348091416842?-.00150052748656963:-.04528409340753242:e[5]>3.5694334999727624?e[4]>3.6505739029280164?e[29]>1e-35?.050909089229765704:e[39]>1e-35?-.08747827386821926:e[46]>1e-35?-.11300671054986217:-.002669293928522137:e[46]>1e-35?-.07873653229849684:e[39]>1e-35?-.06389470798465265:e[2]>.8958797346140276?e[47]>1e-35?-.07102696386827136:e[4]>1.8688348091416842?.04567768852273886:.016429189359442275:.024223384872688037:e[7]>.9569480028661056?.12458720561596202:-.006224718391409129,n=e[29]>1e-35?e[2]>2.602003343538398?e[2]>4.166635176627655?e[7]>.8375851232899904?.027219239366992384:-.023288925509443156:e[7]>.5866799179067689?.05780689652787357:.019914206435185725:e[2]>1.2424533248940002?e[7]>.9246495578512688?.1091540005913688:.08430043254349175:e[6]>4.832297822126891?e[125]>1e-35?.029350728374412424:.1327178977041336:e[8]>1e-35?e[7]>.9793410316570949?-.10742256752042179:.10128035205992136:.08719230025231978:e[5]>3.772694874805912?e[39]>1e-35?-.07712063687837625:e[46]>1e-35?-.09987046122905541:e[2]>3.6242520361853052?e[134]>1e-35?.0549278412468898:e[155]>1e-35?.0628934857241284:e[47]>1e-35?-.14605662411148382:e[48]>1e-35?-.1460221669882455:.002073957868392086:e[2]>1e-35?e[47]>1e-35?-.0769198367034467:e[155]>1e-35?.0769122902449957:e[134]>1e-35?.06856131328753592:e[152]>1e-35?.07081107422282688:e[51]>1e-35?-.11095669360187602:e[91]>1e-35?-.08136006552659215:e[48]>1e-35?-.07180356044417698:e[18]>1e-35?-.029572927306223313:e[50]>1e-35?-.11419309779400831:.03331652781327257:.0015747823792064454:e[7]>.9662372103242399?.1203598683210537:.011240838199712565,i=e[0]>1e-35?e[2]>2.4414009612931857?e[1]>1e-35?e[2]>4.03420147928485?.03823654007072966:e[7]>.9033253454895247?.09329944316059466:.06705865009439997:e[134]>1e-35?.06865805795066232:e[30]>1e-35?.05189058132179502:e[217]>1e-35?.044913757044379055:-.05078929160105722:e[1]>1e-35?e[6]>5.161920636569023?e[2]>1.4978661367769956?.10652732380394028:.13307829460294332:e[7]>.985694415330804?.06936133858882627:.11090193559908544:e[30]>1e-35?.10406540623634791:.03985408831881549:e[1]>1e-35?e[2]>3.772694874805912?e[29]>1e-35?e[7]>.7316379010844482?.012897973304512032:-.028068579877067623:.024577017676752924:e[5]>3.417592293073651?e[22]>1e-35?-.023871063947594612:e[7]>.8255520169851381?.0513970804870914:e[153]>1e-35?.0032035784177419503:.038713568639820416:e[7]>.9527510849235538?.10975706910869304:-.009433959232316078:e[38]>1e-35?.05195298239886214:e[30]>1e-35?.02476336300816124:e[2]>2.524928003624769?e[217]>1e-35?.0135414448190362:e[135]>1e-35?-.14660288310803915:-.07298980826531443:e[135]>1e-35?-.11136111748165503:e[123]>1e-35?-.1489448617480049:e[46]>1e-35?-.0922792773195811:-.024587716086845016,o=e[0]>1e-35?e[2]>2.249904835165133?e[1]>1e-35?e[2]>3.540854293052788?e[3]>2.249904835165133?.0590142410559562:e[7]>.6376007852429183?.043799948513989724:-4018626768373957e-20:.0790082705503403:e[38]>1e-35?.06581244939148062:e[30]>1e-35?.04874874335011108:-.03908081910821116:e[3]>2.602003343538398?e[1]>1e-35?.0902076086329385:e[30]>1e-35?.10143876154366023:.021304615514737626:e[2]>1.4978661367769956?.10248710197602005:e[8]>1e-35?e[125]>1e-35?-.1652240484643952:.09695355914385996:.12574960258243387:e[1]>1e-35?e[2]>3.8815106545092593?e[3]>2.249904835165133?.030411053020370282:e[7]>.8375851232899904?.01347947217941036:-.02329004077119854:e[7]>.9480659774309611?e[22]>1e-35?-.021734552060979462:e[100]>1e-35?.12154672718218543:e[3]>1e-35?.0467045097539336:.07133232987671506:e[4]>2.012675845367575?e[4]>3.9219243190762363?.018631928508103857:.04026129961424531:-.0060403819170799225:e[38]>1e-35?.04740678443866351:e[30]>1e-35?.022411595432555845:e[2]>2.970085626360216?e[121]>1e-35?.016385457091892035:-.07115043890873148:e[4]>3.417592293073651?-.04057726754591634:e[29]>1e-35?-.10601923621749415:-.013474385705240824,s=e[3]>1e-35?e[3]>3.481121732133104?e[30]>1e-35?.03419190074885174:e[39]>1e-35?-.07596248521514803:e[142]>1e-35?-.09906305142951233:e[143]>1e-35?-.11544208927241095:e[134]>1e-35?.03231677158309109:e[217]>1e-35?.04584520241402839:-.014587374070287719:e[30]>1e-35?e[141]>1e-35?-.05022127515891476:e[6]>3.540854293052788?.046006786519929344:e[3]>2.3502401828962087?.03746852485580482:.11887634683908754:e[142]>1e-35?-.0715680845257123:e[134]>1e-35?.05310603374316432:e[39]>1e-35?-.05301061369502469:e[143]>1e-35?-.06806923450459589:e[21]>1e-35?-.054617004299251364:e[113]>1e-35?e[6]>3.795426061844291?.03901365322581413:.11833310693969545:e[141]>1e-35?-.039041289505442084:e[3]>3.0677824455408698?.010823236602311471:e[29]>1e-35?-.062100944449970996:e[58]>1e-35?-.04585181543113668:e[99]>1e-35?.053796582993543764:e[100]>1e-35?e[6]>3.676220550121792?.02800134029424525:.12622387863644666:e[98]>1e-35?.06289940430905602:.023655750883710656:e[138]>1e-35?.09902929683374195:e[6]>5.161920636569023?.07160940969782595:e[141]>1e-35?.11975693334861698:.03480602671098732,a=e[0]>1e-35?e[2]>2.4414009612931857?e[1]>1e-35?e[2]>4.600145018061341?.02024868069387139:e[2]>3.1984648276080736?.048682024362267456:.07158946327961134:e[134]>1e-35?.05360858064017479:e[30]>1e-35?.03969788038954029:e[39]>1e-35?-.1339275468398512:-.03340699462411555:e[1]>1e-35?e[2]>1.2424533248940002?.09338368602561321:e[5]>4.5379471377116305?.11818377094705468:.02406138301472482:e[30]>1e-35?.08786833398626331:.031294938606502315:e[1]>1e-35?e[2]>2.970085626360216?e[29]>1e-35?e[2]>4.923617305492666?-.0247806554659429:.00415615978158072:e[4]>2.138333059508028?e[4]>3.6505739029280164?-.0025888569756007704:.033556460788819964:-.011238496891848667:e[5]>3.5694334999727624?e[4]>2.012675845367575?e[2]>.8958797346140276?.03964701920383755:.024902380380505313:e[141]>1e-35?-.07221122170573789:.009221806859728395:e[2]>.8958797346140276?.09633850035166669:.007323280248710229:e[134]>1e-35?.038330704525669945:e[30]>1e-35?.01660549386778516:e[2]>2.524928003624769?e[217]>1e-35?.008967266036665084:e[29]>1e-35?-.12693911437262784:-.05779560753585583:e[29]>1e-35?-.0908743155940788:e[4]>3.314020688089767?-.030882471980034343:-.010429019903489632,c=e[0]>1e-35?e[2]>2.138333059508028?e[1]>1e-35?e[2]>3.4498615536424366?e[3]>2.249904835165133?.04956831432894648:e[2]>5.223051249395764?-.010305811579773205:.027491320728082233:.06656735137915168:e[38]>1e-35?.05309749470598965:e[30]>1e-35?.03843762763805799:-.030980078724697425:e[3]>1e-35?e[1]>1e-35?.08089335516186445:.04120452858949669:e[6]>4.832297822126891?e[2]>.8958797346140276?.10006865536846919:.11917243570572485:e[8]>1e-35?e[2]>.8958797346140276?.06704577104028654:-.1454046740476985:e[219]>1e-35?-.13678871665753098:.07859247859374968:e[1]>1e-35?e[2]>3.314020688089767?e[3]>2.249904835165133?.024623237775190106:e[2]>4.73179313355342?-.02080435685185878:.0026175118278487855:e[6]>3.417592293073651?e[22]>1e-35?-.025465692791530083:e[45]>1e-35?-.044807460105408044:e[8]>1e-35?.008766235663186964:.032712521408248645:e[3]>2.602003343538398?-.0056332432294706036:e[6]>2.524928003624769?.09592889105245415:-.013339150198983546:e[38]>1e-35?.03563564253379704:e[30]>1e-35?.014870517098142924:e[2]>2.970085626360216?-.054537994223319376:e[219]>1e-35?-.13242819761683536:e[39]>1e-35?-.0910629106840573:-.01970485337755703,l=e[0]>1e-35?e[2]>2.012675845367575?e[1]>1e-35?e[2]>3.4498615536424366?e[7]>.9246495578512688?.04812308497880073:e[29]>1e-35?.0005380021336956461:.03361690381564229:e[5]>3.5694334999727624?.05947219194425965:.11024468105183681:e[134]>1e-35?.04905351957215242:e[138]>1e-35?.05554447267811877:-.021863233324542066:e[29]>1e-35?e[5]>4.855921334140645?e[2]>.8958797346140276?.09590438270550732:.11498869480105023:.04093609484315685:.06588820186431316:e[1]>1e-35?e[2]>2.970085626360216?e[29]>1e-35?e[7]>.41763374498947375?.0043146758499583255:-.03443798345003191:e[58]>1e-35?-.08355523706358281:.017928058505534663:e[5]>3.5694334999727624?e[22]>1e-35?-.02209335592785362:e[2]>.8958797346140276?.03223396066919647:.0170789547385017:e[7]>.9546729796082215?e[2]>.8958797346140276?.09545837551902411:.008923660539643153:-.012322532316048181:e[134]>1e-35?.03182502017906531:e[138]>1e-35?e[29]>1e-35?-.06617589040350445:.040440282181288686:e[2]>2.802901033147999?-.043412758816960974:e[219]>1e-35?-.11700143817568372:e[48]>1e-35?-.11379636451926181:e[49]>1e-35?-.14202838670262277:e[39]>1e-35?-.08160450909782378:-.013448620144296253,u=e[1]>1e-35?e[2]>2.602003343538398?e[3]>2.249904835165133?e[4]>3.6505739029280164?.004170792297448336:.0368033867902024:e[7]>.8333442551332461?e[2]>4.677480030793064?.009136341105716223:.03568813371096505:e[7]>.22301866079069904?e[2]>5.1209788959100075?-.02365589472388456:.00919157417627931:-.0379399276194825:e[3]>1e-35?e[5]>3.5694334999727624?e[2]>.8958797346140276?e[22]>1e-35?-.019258819649469603:.03709105125649261:.016860660630369267:e[3]>2.602003343538398?-.00991261350028801:e[7]>.9626084674797213?.11517814309711256:-.009719045525281071:e[2]>1.2424533248940002?e[7]>.7316379010844482?.07097600019370685:.04586465946843457:e[6]>4.783307617946789?.09722756919612678:e[8]>1e-35?e[7]>.9793410316570949?-.11805054859481241:.07110946491407406:.05402719662002902:e[134]>1e-35?.03393227005537922:e[30]>1e-35?.023661319650909306:e[2]>2.970085626360216?e[121]>1e-35?.031049210793405797:e[135]>1e-35?-.10837216222444626:e[219]>1e-35?-.14640457784236915:-.03965818070110935:e[121]>1e-35?.039992710146502054:e[143]>1e-35?-.09311937611688731:e[46]>1e-35?-.07559392834101462:e[219]>1e-35?-.09895720087616466:e[135]>1e-35?-.07586062007425573:-.011775153504486295,d=e[1]>1e-35?e[3]>1e-35?e[141]>1e-35?-.03681630636575175:e[22]>1e-35?-.024594313135047084:e[7]>.9626084674797213?e[6]>3.676220550121792?.03355559026428929:e[3]>2.602003343538398?.012516956280523336:.1113827943542528:e[3]>2.3502401828962087?e[39]>1e-35?-.03483153469277968:e[29]>1e-35?-.06012725416594425:.03180949281577552:e[3]>1.2424533248940002?.007572391854701212:-.04833059473573461:e[7]>.5866799179067689?e[138]>1e-35?.084956566507563:e[7]>.9407436463973539?e[6]>5.161920636569023?.07174368742657447:e[7]>.9793410316570949?.024186357466630726:.07739671408330714:.048429456456843774:e[6]>5.078289090109146?e[138]>1e-35?.07555203090037793:.033181836695182196:-.02197298038836975:e[38]>1e-35?.031334580210504996:e[30]>1e-35?.021270582199851534:e[121]>1e-35?.0329970846397004:e[42]>1e-35?.04064092183581017:e[135]>1e-35?-.08440485061890712:e[219]>1e-35?-.10638369254266776:e[143]>1e-35?-.09755269717731242:e[144]>1e-35?-.1173397395002877:e[51]>1e-35?-.1288517354356988:e[49]>1e-35?-.13923283846721088:e[91]>1e-35?-.1224188861275682:e[3]>3.156774023138548?-.02477169567121223:-.006917307470148426,p=e[2]>2.802901033147999?e[7]>.9159108669154322?e[3]>3.314020688089767?-.0010700017432373199:e[2]>4.832297822126891?.009582861728698568:.029780100164495754:e[30]>1e-35?e[210]>1e-35?-.028942339056712313:.020599853201598167:e[3]>3.540854293052788?-.030156164189210577:e[2]>4.620046665062766?e[3]>1.8688348091416842?-.00103151911027294:e[217]>1e-35?.005930672148987754:-.03586108945255643:.004417350848115493:e[3]>1e-35?e[2]>.8958797346140276?e[5]>3.5694334999727624?e[3]>3.6242520361853052?e[30]>1e-35?.02388317653477103:-.0034021644637823034:e[125]>1e-35?-.059034648546006076:e[18]>1e-35?-.02514305472376584:e[46]>1e-35?-.05290744310611087:e[21]>1e-35?-.03750702516022783:e[39]>1e-35?-.031092446888446753:.028272541588979773:e[7]>.9676186228082213?e[3]>2.602003343538398?-.009169247394016047:.11347856526033356:-.00310251177264949:e[2]>1e-35?.00844340216096322:-.00894414829369423:e[2]>1.4978661367769956?e[7]>.6223082132708274?e[6]>3.0677824455408698?.04885293193722139:.10736598620828455:.026545392586289893:e[6]>4.938058177869999?e[2]>.8958797346140276?.07355143458077283:.09420954595651049:e[8]>1e-35?e[2]>.8958797346140276?.07966619891180966:-.10471235843714122:.04867207725748343,h=e[1]>1e-35?e[3]>1e-35?e[5]>3.5694334999727624?e[3]>2.249904835165133?e[22]>1e-35?-.0262424908256809:e[8]>1e-35?.001637419319408071:e[155]>1e-35?.053444838794586114:e[99]>1e-35?.05039717103923269:.02448689278350471:e[141]>1e-35?-.05723199469388615:.005411562031545046:e[7]>.9626084674797213?e[3]>2.602003343538398?.00980665121101267:.10420505846679201:-.001639851950872336:e[7]>.26911173821332884?e[138]>1e-35?.07591724033622518:e[7]>.9275861021112151?e[5]>5.173316863805991?.06276466446882598:e[194]>1e-35?-.1330802382498368:e[5]>3.156774023138548?e[8]>1e-35?-.027034262965141144:.03949417085855365:.08851962788853085:e[9]>1e-35?.05379608621573637:.032253635727649325:e[138]>1e-35?.058048925881989615:.005620237500451222:e[134]>1e-35?.02734220426041116:e[30]>1e-35?.017746745665275825:e[142]>1e-35?-.07814745820732061:e[143]>1e-35?-.08860968498533135:e[14]>1e-35?.01954819512523945:e[42]>1e-35?.03333354798081121:e[147]>1e-35?-.11642554317575503:e[49]>1e-35?-.12425086420883341:e[146]>1e-35?-.12996952774815626:e[3]>3.817651943129708?-.03275661606585881:-.014860694091417102,f=e[1]>1e-35?e[2]>2.524928003624769?e[3]>2.249904835165133?e[3]>3.725620842493839?-.000906155627647317:e[24]>1e-35?.0785324151067157:e[154]>1e-35?-.058309500036909157:.026762512119806844:e[7]>.26911173821332884?e[2]>4.505334588423558?-.010584135839537876:.013982545022862853:-.03208712711019827:e[3]>1e-35?e[2]>.8958797346140276?e[5]>3.5694334999727624?.026401003398891884:e[3]>2.602003343538398?-.008168418058515686:e[7]>.9662372103242399?.10626422692131453:-.01031637351522216:.010358942714602982:e[2]>1.2424533248940002?e[2]>2.012675845367575?.0312811686023135:.05423507965224627:e[6]>4.832297822126891?.08479742987484738:e[8]>1e-35?e[7]>.9793410316570949?-.09338070882722671:.058145805002919916:.04227449937397909:e[38]>1e-35?.025289091019879376:e[2]>3.1132683346437333?e[3]>.8958797346140276?e[46]>1e-35?-.09114331684757576:e[135]>1e-35?-.07948190608487016:e[48]>1e-35?-.12911151777601662:e[143]>1e-35?-.09735205976374478:-.017192402584465798:-.08661537827420282:e[217]>1e-35?.033425023239885124:e[14]>1e-35?.02729990952110066:e[48]>1e-35?-.09098188061865646:e[46]>1e-35?-.05848458618550134:e[91]>1e-35?-.10969774095556883:-.0068971807474334365,g=e[1]>1e-35?e[3]>1e-35?e[3]>1.2424533248940002?e[125]>1e-35?-.06150017523108556:e[39]>1e-35?-.03350257370473994:e[22]>1e-35?-.02193617429266551:e[8]>1e-35?7274245146620154e-20:e[6]>3.676220550121792?e[4]>2.3502401828962087?.026702786904914785:.00851181280021978:e[4]>2.673553765358735?.010358811529123666:e[6]>2.802901033147999?.08891517935366504:.023114323891227237:-.02875694375159779:e[4]>1.7005986908310777?e[138]>1e-35?.06720372648635974:e[6]>5.427147823217923?e[9]>1e-35?.0544777682515472:.037060547607205986:e[6]>1e-35?.022016394753027843:-.1559604133821172:e[6]>3.540854293052788?-.009372509268454739:-.24388295956457617:e[38]>1e-35?.023012278764368795:e[138]>1e-35?.03564423186175008:e[30]>1e-35?.008093643695090883:e[217]>1e-35?.028810461962454004:e[135]>1e-35?-.07120877224354143:e[46]>1e-35?-.06546454537408128:e[144]>1e-35?-.09534262423492412:e[143]>1e-35?-.0770344566882831:e[29]>1e-35?-.06285371287531509:e[14]>1e-35?.02073120300153793:e[123]>1e-35?-.09016320513643451:e[51]>1e-35?-.10496442920973255:e[3]>3.1132683346437333?-.019949599427836494:-.0019060085544902166,m=e[0]>1e-35?e[2]>1.8688348091416842?e[2]>3.1984648276080736?e[1]>1e-35?e[3]>2.249904835165133?.03174009468268253:e[2]>5.363634090365639?-.019608371322822362:.012560836552403976:-.006925466014569184:e[1]>1e-35?.047796055675515446:.014363935217773802:e[6]>5.391349638084432?e[2]>.8958797346140276?e[3]>1e-35?.05193425865217324:.07891754708034264:.09859506024630252:e[8]>1e-35?e[5]>4.424828703319957?.0288226384042998:-.09397342098461306:e[4]>.8958797346140276?.06181532763949055:e[3]>1e-35?.0661728888522049:-.18938681666136592:e[2]>3.6242520361853052?e[30]>1e-35?.005754128097002715:e[4]>1.7005986908310777?e[1]>1e-35?e[3]>1.8688348091416842?.003940381852503271:-.01767544594631589:e[134]>1e-35?.005683243725945637:-.033167818200618454:-.049739953036904844:e[1]>1e-35?e[5]>3.417592293073651?e[3]>2.249904835165133?e[3]>4.051747139190486?-.013281167238314323:.016971087295600894:-.0032296953806057044:e[8]>1e-35?e[3]>1e-35?-.09772932329003692:.10215199291158968:e[3]>1e-35?.04042124133857408:e[4]>1.7005986908310777?-.03780917296974188:-.29617407728303585:e[3]>1.2424533248940002?e[134]>1e-35?.019695468056761475:-.008073287117671947:-.07196945037292647,y=e[0]>1e-35?e[3]>1e-35?e[30]>1e-35?.04565870990720628:e[4]>3.481121732133104?-.0010242035152053465:e[46]>1e-35?-.06735757101078846:.028047085557873476:e[4]>.8958797346140276?.061451212522936484:-.008994471708946133:e[4]>3.8815106545092593?-.015862290359637304:e[4]>1.2424533248940002?e[156]>1e-35?-.0353203284829365:e[135]>1e-35?-.029955239188290975:e[153]>1e-35?-.024262881593313065:e[21]>1e-35?-.04039396048201336:e[155]>1e-35?.031605649750965394:e[46]>1e-35?-.0412690351363074:e[18]>1e-35?-.02516534034859168:e[51]>1e-35?-.09383050740007202:e[219]>1e-35?e[30]>1e-35?.05781620337941066:-.031029108058883783:e[54]>1e-35?-.1312103962175427:e[14]>1e-35?.029309503966067275:e[52]>1e-35?-.12376041877584809:e[49]>1e-35?-.08405476403385437:e[129]>1e-35?-.07017699310303659:e[3]>3.238486181444842?.0005864979938663785:e[90]>1e-35?-.19027994988708324:e[4]>2.4414009612931857?.013036973814688194:e[141]>1e-35?-.05866284827055356:e[196]>1e-35?e[3]>1.2424533248940002?e[3]>1.4978661367769956?.021738540839636195:.10410506831002041:-.25590968590756463:.0023982515170817725:-.04143304307857132,v=e[0]>1e-35?e[2]>1.8688348091416842?e[2]>3.417592293073651?e[2]>5.335128436483344?-.011443269019739626:e[1]>1e-35?.015228192424880932:-.005492858431736962:e[1]>1e-35?e[5]>3.5694334999727624?.03605247912942737:.08439131345296227:.009650676995478455:e[5]>5.096808314315481?e[2]>.8958797346140276?e[29]>1e-35?.07077360688836766:.044754385330663386:.09313294724999382:e[8]>1e-35?e[2]>.8958797346140276?.04214845406094496:-.10283747682230321:e[4]>.8958797346140276?.05232959789940822:e[2]>.8958797346140276?.00730829946441921:-.23825070451282065:e[7]>.9358314658959646?e[5]>3.417592293073651?e[8]>1e-35?-.013117301012430346:.010418379595902224:e[19]>1e-35?-.07514668047310291:.05032486941219513:e[29]>1e-35?e[1]>1e-35?e[7]>.14547530463198097?e[4]>2.138333059508028?-.009576060406554683:-.04582944318062007:-.04685159067258116:-.07022291581850879:e[1]>1e-35?e[4]>2.3502401828962087?e[4]>3.8815106545092593?-.008313873320272646:e[140]>1e-35?-.029352675967497712:e[37]>1e-35?-.09937923794037767:.015967772276156707:-.009857373135428817:e[38]>1e-35?.011345159604794278:e[2]>2.4414009612931857?e[30]>1e-35?.001522017389940959:-.026992183902105407:-.006358778971076675,_=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,b=e[0]>1e-35?e[1]>1e-35?e[7]>.30853255358841714?e[4]>.8958797346140276?e[138]>1e-35?.0708169212387357:e[7]>.9974623466432676?.06323909894881967:.04463133906529934:-.006876640569960593:e[4]>2.138333059508028?.02983313061920756:-.012849740499321841:e[138]>1e-35?.05170725384597862:e[134]>1e-35?.03407970940934425:e[32]>1e-35?.04641257566344885:e[217]>1e-35?.04726549849359106:e[152]>1e-35?.04284855498215312:-.018635981778740818:e[7]>.9358314658959646?e[1]>1e-35?.013495195381145214:-.0017562536904350947:e[153]>1e-35?-.035450683955968364:e[135]>1e-35?-.033677490938511655:e[1]>1e-35?e[156]>1e-35?-.03492338371344172:e[4]>2.012675845367575?e[8]>1e-35?-.012478407554855247:e[58]>1e-35?-.06588308463544146:.01024668455910621:-.017964352445712636:e[138]>1e-35?.023509519134334668:e[134]>1e-35?.009985116251562821:e[219]>1e-35?-.08089904073615993:e[144]>1e-35?-.08668450969211726:e[146]>1e-35?-.11193950701534479:e[91]>1e-35?-.09510832561737878:e[47]>1e-35?-.06671901650698997:e[145]>1e-35?-.10185972302071798:e[142]>1e-35?-.050979038763275586:-.008318124414257324,w=e[2]>2.4414009612931857?e[7]>.5866799179067689?e[1]>1e-35?e[2]>5.059420419187638?-.004966114458456121:e[3]>1.4978661367769956?e[6]>3.9219243190762363?.016160825033090097:e[4]>2.673553765358735?-.008119911797705546:e[7]>.9676186228082213?.10191214482603793:.010406721157764452:e[4]>2.602003343538398?.011963972867583182:e[209]>1e-35?e[24]>1e-35?-.4633165603515741:-.027241411195905924:-.01021341522779383:e[3]>.8958797346140276?e[39]>1e-35?-.07106669495723826:-.003949154414882924:-.06434150131915288:e[3]>1.7005986908310777?e[1]>1e-35?.005050893558647285:-.01649483548684653:e[217]>1e-35?.0027009145619870485:e[7]>.16413460456379095?-.021492035902356262:-.04956173856083012:e[3]>1e-35?e[2]>.8958797346140276?e[4]>3.314020688089767?.004614615289098078:e[125]>1e-35?-.053838919278819175:e[141]>1e-35?-.031232660335016666:e[7]>.9676186228082213?.031522536832188655:.016369948821613637:-.001970208279177045:e[2]>1.2424533248940002?e[7]>.8045995506441456?e[6]>3.0677824455408698?.035653122678366796:.09668798382116887:.017192957672541906:e[6]>5.427147823217923?e[2]>.8958797346140276?.05167603828162103:.07201242912898732:e[4]>.8958797346140276?e[6]>4.3882378946731615?.04079789432551034:-.00477197753110532:-.1330224689055222,C=e[0]>1e-35?e[1]>1e-35?e[6]>5.519456907163478?e[3]>1e-35?.025938224253040522:e[7]>.9480659774309611?.06369970668749851:.04567224211157202:e[8]>1e-35?-.03272937728465352:e[7]>.8002228006195066?e[219]>1e-35?-.06304921759586735:.04293432033794005:.0034607309539607385:e[30]>1e-35?.03333728636724803:e[134]>1e-35?.03171739664928598:e[32]>1e-35?.04247521237473512:e[217]>1e-35?.04515237436183519:e[138]>1e-35?.043674672816657406:-.021495642896979555:e[153]>1e-35?e[7]>.7405695827634472?-.005353425538700483:-.03818743916821677:e[1]>1e-35?e[156]>1e-35?-.026937004040991603:e[9]>1e-35?.01687211330975012:e[129]>1e-35?-.06344334253531962:e[5]>3.276966702012906?e[3]>2.4414009612931857?e[3]>4.3882378946731615?-.029787052855333836:e[140]>1e-35?-.0315337765152156:.01010125865272709:-.003643087951301554:e[3]>1.8688348091416842?-.009293469974765106:e[7]>.9407436463973539?e[19]>1e-35?-.10837629052758145:.08012552652666853:-.03240188731353479:e[3]>.8958797346140276?e[138]>1e-35?.028089541906112948:e[134]>1e-35?.011775653029555359:e[54]>1e-35?-.1329256322319015:-.010520589644656487:-.058476715353390545,E=e[0]>1e-35?e[2]>1.7005986908310777?e[2]>2.970085626360216?e[3]>1.4978661367769956?e[1]>1e-35?.015966021866473425:-.004942501766182043:e[7]>.7646034107159144?.0008922354520049755:-.02377096637770522:e[1]>1e-35?.03185471115279236:.009030463601278762:e[6]>5.033695261903033?e[2]>.8958797346140276?e[3]>1e-35?.03583918176912262:.05978765203310842:e[3]>1.4978661367769956?.04363706154403441:.08596238935719265:e[8]>1e-35?e[4]>3.676220550121792?-.14139420543234502:e[6]>4.135134555718313?.06641653507737781:-.08482961471233386:e[219]>1e-35?-.08432601495298837:.036383288293587494:e[2]>4.212100162283537?e[4]>4.06899022722607?-.027653216441781994:e[4]>1.2424533248940002?-.0074990353344818825:-.047274115298751654:e[3]>4.350257124271638?-.021535524001034215:e[7]>.9626084674797213?e[6]>3.314020688089767?.008343192891130257:e[3]>2.602003343538398?-.029175290449111352:e[19]>1e-35?-.0982821612709299:.07967468666491928:e[3]>2.012675845367575?e[1]>1e-35?e[141]>1e-35?-.050000478457880464:e[99]>1e-35?.03066844761711629:.00757148708610041:e[14]>1e-35?.030325269400598688:e[138]>1e-35?.029925649226634522:-.005865781126590595:e[7]>.14547530463198097?-.006746433384005582:-.03419211369300411,T=e[7]>.8453853180651066?e[9]>1e-35?e[204]>1e-35?e[5]>3.979637980058199?.03492440471960614:.10640952227810228:.024674544399570984:e[21]>1e-35?-.03056548710005192:e[24]>1e-35?.04417102228084844:e[18]>1e-35?e[5]>3.417592293073651?-.01915628728670732:.08218968786016527:e[22]>1e-35?-.015022557207326592:e[7]>.9941118339384912?.024199625103362956:e[135]>1e-35?-.01204089678887213:e[5]>3.156774023138548?e[14]>1e-35?.03343354440638259:e[144]>1e-35?-.06832894943893354:.0114980261254499:e[12]>1e-35?e[100]>1e-35?.09915326976032354:-.011405707270850872:.05400113313957842:e[138]>1e-35?.029070115198082648:e[7]>.11348809759407426?e[9]>1e-35?.0124381999772114:e[14]>1e-35?.021548670539672424:e[152]>1e-35?.02386756199239544:e[155]>1e-35?.024879667358339554:e[217]>1e-35?.014495299809094343:e[17]>1e-35?.023665548251738264:e[21]>1e-35?-.04352613176288253:e[142]>1e-35?-.041479100066479035:e[47]>1e-35?-.054730987834988636:e[135]>1e-35?-.02041552814087628:e[12]>1e-35?.00599257601351913:e[19]>1e-35?.017289098956116435:-.005346146967029123:-.015035114021856248,S=e[2]>2.524928003624769?e[39]>1e-35?-.054727205204329936:e[2]>5.1209788959100075?e[3]>1.7005986908310777?-.006846267565269392:e[5]>6.826002629905951?-.031164989612379426:-.002741497453668024:e[91]>1e-35?-.09671408062751485:e[4]>1.4978661367769956?e[1]>1e-35?e[3]>2.249904835165133?.01457038163563883:e[7]>.1998775237752378?.0022386178156093236:-.023878153904868322:e[138]>1e-35?.02577301491883366:e[134]>1e-35?.012196636151923639:-.011620066788940737:-.02547345266933859:e[3]>1e-35?e[2]>1e-35?e[1]>1e-35?e[125]>1e-35?-.054140900037670386:e[5]>3.5694334999727624?.011956526123643832:e[3]>2.602003343538398?-.02114925328017154:e[7]>.9662372103242399?.08782010508103752:-.017223208918198857:e[138]>1e-35?.03552967765214556:e[134]>1e-35?.02029988465200251:-.0027071098830831453:-.010563423003945922:e[2]>1.2424533248940002?e[1]>1e-35?e[5]>3.156774023138548?.020789754957971127:e[8]>1e-35?.09676607622337308:-.13431522143386382:-.04328684841078818:e[6]>5.427147823217923?e[2]>.8958797346140276?.04286558286931383:.0632450248289209:e[4]>.8958797346140276?e[8]>1e-35?e[4]>3.676220550121792?-.12134536828900527:-.0021406313647826976:.02703554321037796:-.10987991092748431,x=e[3]>3.238486181444842?e[30]>1e-35?.009506310623811853:e[39]>1e-35?-.0390989997202559:e[187]>1e-35?-.07249802958837052:e[46]>1e-35?-.05080833699879983:e[143]>1e-35?-.06014247774751084:e[219]>1e-35?-.05179602905357869:e[6]>6.1537953943602615?e[15]>1e-35?-.025022238573512268:.0011147676050071987:-.013840284878987585:e[7]>.9626084674797213?e[5]>3.417592293073651?e[3]>1e-35?e[6]>3.9219243190762363?.008593726678003006:.05272960047875293:e[5]>4.424828703319957?.03164186747443643:-.019512539098210834:e[3]>2.602003343538398?-.0016290671598964486:e[3]>1.2424533248940002?e[8]>1e-35?-.1920669264002081:.09024848315677546:e[8]>1e-35?.06434775905745808:e[44]>1e-35?.11389595321585716:-.036695137521575945:e[6]>4.987019604243537?e[141]>1e-35?-.03813401544172915:e[138]>1e-35?.029859363038130183:e[58]>1e-35?-.06135288076045784:e[39]>1e-35?-.04609789446034826:e[7]>.14547530463198097?e[11]>1e-35?.0007666746170242386:e[129]>1e-35?-.04984156530077896:e[18]>1e-35?-.01554744241744757:e[10]>1e-35?e[219]>1e-35?-.043774129950223145:.0062051346459236715:.014331149613197688:-.004868728135790881:-.009310258638274059,k=e[0]>1e-35?e[2]>1.7005986908310777?e[2]>3.817651943129708?e[3]>1.8688348091416842?.0015603015891380355:-.018128739944024166:e[5]>3.5694334999727624?e[6]>5.427147823217923?.017445711714402918:-.006013735620008879:e[3]>1.2424533248940002?.08568755276415789:e[4]>2.602003343538398?.03195371214541369:e[6]>2.970085626360216?-.3506562612672139:-.038898555979475155:e[6]>5.391349638084432?e[2]>.8958797346140276?.04755052122467952:e[3]>1.4978661367769956?.03861414711908666:.08185303441168128:e[8]>1e-35?e[5]>4.424828703319957?.016473058697350277:-.08025494910794358:e[219]>1e-35?-.06606152909975703:.033955083083682974:e[153]>1e-35?-.022769519242142378:e[155]>1e-35?.021917770434351808:e[3]>4.051747139190486?-.016298405734735375:e[4]>1.2424533248940002?e[156]>1e-35?-.023334559703496013:e[91]>1e-35?-.07354920004445119:e[21]>1e-35?-.03472005783841508:e[9]>1e-35?.0088614848397155:e[152]>1e-35?.01650058356046536:e[50]>1e-35?-.08689386936995537:e[219]>1e-35?-.025293957964644554:e[22]>1e-35?-.02911571993589908:e[52]>1e-35?-.10060771324188006:e[151]>1e-35?-.11187645020980451:e[49]>1e-35?-.07269389735370566:.00010096962399904588:-.0308050484468705,I=e[0]>1e-35?e[2]>1.7005986908310777?e[2]>3.1132683346437333?e[2]>5.589117819455554?-.01634394676179118:e[135]>1e-35?-.025978770194490092:.003478202132522329:e[5]>3.772694874805912?e[6]>5.55101783490842?.0201238113260563:-.003889163967162744:.0619995705843029:e[6]>5.391349638084432?e[2]>.8958797346140276?.04441301244720888:.07580163057048642:e[5]>4.424828703319957?.030400021609279876:e[135]>1e-35?e[6]>4.03420147928485?-.1614949959350695:.011868201115510678:e[144]>1e-35?-.24480189212017833:.00743113235503554:e[135]>1e-35?-.02500550080046047:e[155]>1e-35?.019914668189284807:e[14]>1e-35?.016272311078771865:e[2]>4.436734027666816?-.010942143677155697:e[152]>1e-35?.01655515192923104:e[5]>3.276966702012906?e[208]>1e-35?.01544696196221499:e[209]>1e-35?.011686634595667988:e[204]>1e-35?.012948259428096241:e[54]>1e-35?-.0987840586310838:e[17]>1e-35?.019642065140602974:e[9]>1e-35?.002408217148588979:e[129]>1e-35?-.051760999013377655:e[53]>1e-35?-.12326801905337725:e[156]>1e-35?-.027148214121600067:-.00591946140033722:e[141]>1e-35?.08076229481403298:e[100]>1e-35?.09029873540689846:.004633440115146894,A=e[1]>1e-35?e[4]>2.138333059508028?e[9]>1e-35?e[7]>.9738681190948303?e[4]>2.249904835165133?.0335386338744903:.08871810783567416:.019225035967642936:e[7]>.5866799179067689?e[44]>1e-35?-.028577747938027556:e[22]>1e-35?-.017080349342057245:e[123]>1e-35?-.06459630434555787:.01496396100048332:e[7]>.04507521918085865?.0037545927605624665:-.024364818555823085:e[7]>.3301972011875425?e[4]>.8958797346140276?.003955118988355861:-.024852972286710795:e[210]>1e-35?-.06918033561606161:-.016436360434421187:e[219]>1e-35?-.07074619361594191:e[14]>1e-35?.02288621182895308:e[30]>1e-35?.009951065285890723:e[4]>3.0677824455408698?e[48]>1e-35?-.08645289278185848:e[18]>1e-35?-.07128859518483391:e[46]>1e-35?-.059012415377229614:e[51]>1e-35?-.09897820075751956:e[143]>1e-35?-.0658809793369211:e[39]>1e-35?-.05072244120975425:e[145]>1e-35?-.1041573357946847:e[21]>1e-35?-.07265724033978356:e[121]>1e-35?.032340406020414894:e[150]>1e-35?-.12780465144045577:e[50]>1e-35?-.10084067045905792:-.008282579596590931:e[31]>1e-35?.09475423612489574:e[134]>1e-35?.016436600209473996:-.0032052350949025154,P=e[0]>1e-35?e[1]>1e-35?e[6]>5.980149988077803?e[3]>1e-35?.016868562767356994:e[7]>.9480659774309611?.0490126593301439:.03183712887814021:e[4]>.8958797346140276?e[8]>1e-35?-.018344689935240077:e[7]>.5762123732244849?.027823839417468396:.0022237549483396734:-.049221463486990365:e[30]>1e-35?.024881540664409785:e[4]>3.0677824455408698?-.012956173562801246:.010844244442972509:e[153]>1e-35?-.021011529883710918:e[135]>1e-35?-.022862755771243214:e[91]>1e-35?-.06523564179230792:e[3]>4.3372693810700085?-.01836396186345982:e[4]>1.2424533248940002?e[14]>1e-35?.018063557788938384:e[1]>1e-35?e[58]>1e-35?-.05666864992513037:e[37]>1e-35?-.09859173931566362:e[140]>1e-35?-.026368697925604742:e[139]>1e-35?-.06458698835998881:e[3]>2.4414009612931857?e[8]>1e-35?-.012750470980894203:e[128]>1e-35?-.06062526587440112:.011637315217958607:e[7]>.9569480028661056?e[6]>3.314020688089767?e[6]>8.256477558772088?-.01867324944649552:.013333709765106694:e[19]>1e-35?-.0862336521704207:.06263843669460754:-.005209374987876728:e[29]>1e-35?-.05314556259108334:e[144]>1e-35?-.06747511467043471:-.0032459743896180644:-.025647852465095045,R=e[0]>1e-35?e[2]>1.4978661367769956?e[2]>2.802901033147999?e[153]>1e-35?-.028446025186518367:e[135]>1e-35?-.030498458478750823:e[4]>1.4978661367769956?.0028332406263713176:-.029966327008991617:.018714561890725637:e[6]>5.033695261903033?e[2]>.8958797346140276?.041738631496127304:.0701395739744944:e[7]>.9811887196001154?e[28]>1e-35?e[194]>1e-35?-.6270617037879163:-.14198370205598315:-.008029082191082339:.03966126215239892:e[153]>1e-35?-.018792731305353614:e[135]>1e-35?-.020500053366640306:e[156]>1e-35?e[11]>1e-35?-.05063175110475535:-.0120172710473678:e[147]>1e-35?-.06181360325166399:e[7]>.06275229375044648?e[52]>1e-35?-.09381845963236321:e[4]>4.424828703319957?-.015836182358134197:e[4]>1.2424533248940002?e[48]>1e-35?-.047387335727107405:e[50]>1e-35?-.07061356901704502:e[151]>1e-35?-.09680213548388712:e[46]>1e-35?-.028970851669790916:e[123]>1e-35?-.035197840867969954:e[49]>1e-35?-.06299268464836878:e[149]>1e-35?-.10197175263174806:e[58]>1e-35?-.03908263666673043:e[22]>1e-35?-.021903737116021876:e[2]>.8958797346140276?.005307704388235018:-.0020984759645931708:-.021935509998616008:-.01887705116018838,N=e[2]>2.4414009612931857?e[2]>4.749261159734808?e[219]>1e-35?-.0427111578574511:e[153]>1e-35?-.030189831687705213:e[135]>1e-35?-.03512251542671204:-.005813108237155817:e[39]>1e-35?-.03612853474204475:e[91]>1e-35?-.07347487395456895:e[142]>1e-35?-.04314124434818331:e[21]>1e-35?-.03933135423264962:e[29]>1e-35?e[6]>4.3882378946731615?e[1]>1e-35?-.0015250307417007892:-.0490054084929899:e[209]>1e-35?-.19107169934362123:-.032434842765588306:e[18]>1e-35?-.04413318629193353:e[5]>3.772694874805912?.004026864766696988:e[7]>.9705672697050661?e[4]>2.602003343538398?-.0184663870129198:.08888448773905216:-.0040785146358560806:e[29]>1e-35?e[2]>1.2424533248940002?e[1]>1e-35?e[5]>3.156774023138548?.012676257607559291:e[4]>2.012675845367575?.07794141958502514:-.23905004122480836:-.03904279404529968:e[6]>5.818597045157784?e[1]>1e-35?.04439337662833094:-.009601154125838422:e[28]>1e-35?e[7]>.9926276364955392?e[156]>1e-35?.08495906118788314:e[153]>1e-35?.09808912606252018:-.41470362752984724:.024659633328041372:e[6]>4.3882378946731615?.02348696158531392:-.011219631635525798:e[2]>.8958797346140276?.00764827947682953:-.002636723662133651,O=e[0]>1e-35?e[138]>1e-35?.04040206743401164:e[7]>.47159631571429605?e[39]>1e-35?-.04204265697956852:e[18]>1e-35?-.02345608311313191:e[46]>1e-35?-.07250113205332377:e[47]>1e-35?-.06901706560471924:e[123]>1e-35?-.02471508138476658:e[91]>1e-35?-.08527667683257537:e[6]>5.519456907163478?e[7]>.9811887196001154?.033642311398086024:.019968221974742344:e[6]>3.540854293052788?e[28]>1e-35?e[7]>.9914949911911836?-.17171139407761582:.033182911468765224:.0060896749985828915:e[7]>.9626084674797213?.050178751374534494:-.008697473314227091:e[6]>5.957131031247307?.008840008772752947:-.00839587224544437:e[57]>1e-35?-.11000065936717814:e[187]>1e-35?-.039919217528968265:e[135]>1e-35?-.01777859479698383:e[7]>.841541958453746?e[6]>8.681774988134558?-.006645633391127337:.005363553180866138:e[7]>.06275229375044648?e[141]>1e-35?-.028575934798358252:e[147]>1e-35?-.06523418671938815:e[53]>1e-35?-.12439699935111644:e[47]>1e-35?-.04201034294282216:e[21]>1e-35?-.029998534764449716:e[11]>1e-35?-.008349262144218515:e[10]>1e-35?e[152]>1e-35?.03211843381827455:-.009616753935387912:.001507728277179471:-.018453367252451447,D=e[2]>2.4414009612931857?e[155]>1e-35?.02097415247337288:e[2]>5.1209788959100075?e[219]>1e-35?-.04107586321461544:e[153]>1e-35?-.030708779452328257:-.008547089256234949:e[24]>1e-35?e[113]>1e-35?.10372474211849725:.010871474495452506:e[46]>1e-35?-.048875079231930615:e[152]>1e-35?.0169028183837229:e[91]>1e-35?-.06545106192484919:e[7]>.5395500104437768?e[21]>1e-35?-.03634133884877529:e[123]>1e-35?-.04524486315275367:.0007726000210664368:e[153]>1e-35?-.026631444280113794:-.005897540198114922:e[29]>1e-35?e[2]>1.2424533248940002?e[141]>1e-35?.06938494238244022:e[1]>1e-35?e[4]>2.602003343538398?e[7]>.21160651352969054?.016731168841731828:-.009280453313693341:-.006549806005743951:-.035447929694275064:e[8]>1e-35?-.0032912467465369953:e[4]>1.2424533248940002?e[1]>1e-35?e[2]>.8958797346140276?.024369266212637037:e[138]>1e-35?.06205121318768558:.03811769435016647:-.009452348851889555:-.025248141993897872:e[2]>1e-35?e[57]>1e-35?-.12191990737301042:e[4]>3.3842466058243152?.00020591213976092076:e[141]>1e-35?-.03252260939244301:e[186]>1e-35?-.13818838492678748:.009368844137034227:-.007973426105216213,L=e[2]>2.3502401828962087?e[14]>1e-35?.015015656987761437:e[30]>1e-35?e[210]>1e-35?e[7]>.6876768869498817?.00543900892248828:-.04253496769494065:e[141]>1e-35?-.052958350924390156:e[140]>1e-35?-.10364099832282586:.010452960405207413:e[24]>1e-35?e[113]>1e-35?.09898709072741292:e[209]>1e-35?e[7]>.9821472231924556?-.26615665549082984:.09636256138859388:.01708542025496261:e[217]>1e-35?.008049408683788317:e[21]>1e-35?-.04590265539954756:e[90]>1e-35?-.13784770816769107:e[142]>1e-35?-.04628126597884301:e[47]>1e-35?-.05827975565933709:e[135]>1e-35?-.0223224900840969:e[18]>1e-35?-.03220713396184497:e[91]>1e-35?-.06447405488640102:e[58]>1e-35?-.05284544446869763:e[48]>1e-35?-.06649148594881385:e[123]>1e-35?-.04383701454842744:e[7]>.07815070294696584?e[52]>1e-35?-.11846610284210293:e[50]>1e-35?-.08907531725085399:e[156]>1e-35?-.018270336483319834:e[150]>1e-35?-.1090721461891663:e[151]>1e-35?-.12157322199183473:-.001565820654257863:-.02380240397829804:e[7]>.7957410883753849?.01267070049428537:e[9]>1e-35?.012970301396505988:.0031136826722851885,M=e[0]>1e-35?e[2]>1.4978661367769956?e[2]>3.817651943129708?e[29]>1e-35?-.01811927921170173:-.0007182192063435364:e[30]>1e-35?.024303187146750442:e[1]>1e-35?.011106265465270054:e[134]>1e-35?.029835980521591587:-.011058553872914158:e[29]>1e-35?e[4]>.8958797346140276?e[2]>.8958797346140276?.038081831260496:e[7]>.9761943980359399?e[7]>.9974623466432676?.0678338591810893:.02371719224774027:.0682898584583309:-.023148464063014726:e[30]>1e-35?.04610988679672867:.003060113702583105:e[29]>1e-35?e[2]>.8958797346140276?e[4]>2.4414009612931857?e[7]>.9587163092581167?.01081564552001606:-.006807357600587744:-.02409609521595022:-.033329165496176885:e[4]>4.051747139190486?-.01130115168237245:e[129]>1e-35?-.04589370141507604:e[21]>1e-35?-.029442074982620643:e[14]>1e-35?.016895124578179443:e[186]>1e-35?-.11907557430036886:e[1]>1e-35?e[139]>1e-35?-.06194447560538838:e[133]>1e-35?-.0758465323292204:e[58]>1e-35?-.04330766372695393:e[138]>1e-35?-.04155491116231014:e[156]>1e-35?-.04841608169206507:e[44]>1e-35?-.01948221703985556:.006580878599054945:e[217]>1e-35?.022433802380447482:-.00412091757515532,B=e[0]>1e-35?e[2]>1.4978661367769956?e[2]>2.970085626360216?e[153]>1e-35?-.024502725801264887:e[2]>5.589117819455554?-.01230190569981064:.0013078979950003464:e[1]>1e-35?.016172143068823742:.0006345060509537773:e[2]>.8958797346140276?.030005982109869073:e[7]>.9811887196001154?e[7]>.9983480540068196?.0671951915420627:e[4]>.8958797346140276?e[204]>1e-35?e[4]>2.4414009612931857?.044068636573383585:-.6634026033584294:e[28]>1e-35?e[194]>1e-35?-.3139210817530322:-.030502668897116853:.02841326513237545:-.12080826254458728:.05983169094937563:e[25]>1e-35?-.03468266531519899:e[17]>1e-35?.018557285805987474:e[91]>1e-35?-.051420462987159146:e[153]>1e-35?e[24]>1e-35?.04301006671297924:e[57]>1e-35?-.09748386515224282:e[7]>.43956365248689394?-.00756781004151352:-.03008603678955382:e[40]>1e-35?-.06712212199178254:e[9]>1e-35?e[99]>1e-35?.02709638137622776:.00311232737924217:e[219]>1e-35?-.021650545703290135:e[129]>1e-35?-.04139534817677377:e[4]>4.482986592105174?-.01666373169408667:e[7]>.14547530463198097?e[28]>1e-35?.0203181446326991:e[24]>1e-35?.019321702534414745:-.0013149142637674523:-.010572437649803333,F=e[1]>1e-35?e[99]>1e-35?.024922390516579074:e[7]>.6223082132708274?e[5]>8.674624195715621?-.0013697481432616754:e[8]>1e-35?e[5]>3.0201273556387074?e[5]>4.855921334140645?-.0034268395365245545:-.034186463672076346:e[29]>1e-35?.07759914281958613:-.07773573805144608:e[22]>1e-35?-.0175879419801366:e[7]>.9626084674797213?.016773359142537643:.008028381804196754:e[133]>1e-35?-.0535216100744091:-.0005000628423357899:e[38]>1e-35?e[14]>1e-35?.05090247458630403:.007750826606170666:e[30]>1e-35?.007698939719746262:e[121]>1e-35?.02303487268261317:e[56]>1e-35?.04301822779572479:e[219]>1e-35?-.061056125991793546:e[49]>1e-35?-.08519783826666813:e[54]>1e-35?-.11098408863832084:e[51]>1e-35?-.07495147940928196:e[52]>1e-35?-.10268521021357209:e[143]>1e-35?-.050337621945760906:e[50]>1e-35?-.08215637358309871:e[135]>1e-35?-.037923453156281546:e[29]>1e-35?-.03275476659364492:e[118]>1e-35?-.05655325181162936:e[46]>1e-35?-.03579874818682071:e[55]>1e-35?-.10858775815345066:e[98]>1e-35?-.02949179817285505:e[91]>1e-35?-.06114394873657414:-.0024381269826722327,j=e[0]>1e-35?e[138]>1e-35?.03188433658945665:e[6]>5.957131031247307?e[29]>1e-35?.02161439640262312:e[46]>1e-35?-.05856082884648366:.00579188508436574:e[5]>3.417592293073651?-.0023781291067078423:e[6]>2.524928003624769?e[29]>1e-35?-.009165058612451055:.06060298049441096:-.024654633200924148:e[29]>1e-35?e[141]>1e-35?.047057536167451744:e[5]>7.751690325550034?-.014630738159823437:e[6]>1e-35?-.0022830386545257364:-.1244934159203967:e[141]>1e-35?-.03108265181870111:e[151]>1e-35?-.0899976208431091:e[53]>1e-35?-.10125439914522794:e[57]>1e-35?-.08285049636367613:e[48]>1e-35?-.04071723813859757:e[147]>1e-35?-.05043191744833317:e[49]>1e-35?-.05480244282058292:e[52]>1e-35?-.07341553831872409:e[91]>1e-35?-.04164336745260387:e[50]>1e-35?-.05943962674275153:e[40]>1e-35?-.054773037913883875:e[129]>1e-35?-.03640370706396673:e[54]>1e-35?-.07483146938849299:e[22]>1e-35?-.02027834075472462:e[186]>1e-35?-.08116240011202293:e[143]>1e-35?-.028437692949603324:e[21]>1e-35?-.02421670339700474:e[46]>1e-35?-.02303808594532841:.0030552215125396933,U=e[0]>1e-35?e[1]>1e-35?e[4]>2.138333059508028?e[9]>1e-35?.02933727780739186:e[6]>4.722943345003718?e[7]>.9246495578512688?.024680404379144982:.012015730636539185:e[113]>1e-35?.09112392780348796:e[135]>1e-35?e[7]>.990877425524446?-.11617284449593282:-.005246041787488675:-.011069319481086321:e[90]>1e-35?-.2763006993902732:e[7]>.9546729796082215?e[6]>3.0677824455408698?.009233858920042097:.08920751503262825:-.008824102277148265:e[138]>1e-35?.02736126919460762:e[4]>2.917405368531303?e[30]>1e-35?.013112272135200274:e[217]>1e-35?.035799930603658235:-.015618218537266096:.010656981322113845:e[14]>1e-35?.01147191978691208:e[17]>1e-35?.016681596753170068:e[135]>1e-35?-.017396147137824756:e[4]>1.8688348091416842?e[4]>4.03420147928485?-.008863534867945834:e[31]>1e-35?.05416038384474034:e[113]>1e-35?.012656827040897288:e[204]>1e-35?.011410879858785482:e[208]>1e-35?e[1]>1e-35?.02085606775425661:-.008618410086291444:e[53]>1e-35?-.09674487817291225:e[155]>1e-35?.010841012663281826:-.0027234799964982103:e[100]>1e-35?e[6]>4.226807104886684?-.02684998739505702:.09196076999373319:-.014557367931257406,$=e[1]>1e-35?e[4]>2.4414009612931857?e[140]>1e-35?-.020508725755139606:e[9]>1e-35?.014160204295049248:e[37]>1e-35?-.06190233326923697:e[6]>1e-35?.005164496028342236:-.11389189550910446:e[141]>1e-35?-.04125881484049697:e[186]>1e-35?-.17160163910476212:e[29]>1e-35?e[6]>3.676220550121792?-.010283419868136159:e[7]>.9626084674797213?-.1716178372310524:-.008856137283327148:e[28]>1e-35?.05315666786902214:e[129]>1e-35?-.04136913767615559:e[7]>.9705672697050661?e[6]>3.540854293052788?.00751812285476753:e[8]>1e-35?-.11960098941111366:.06631760098044483:e[210]>1e-35?e[30]>1e-35?-.05338190010412709:.017275201286894953:e[30]>1e-35?.014424216946760394:e[99]>1e-35?.027062693955934525:-.006762492910108134:e[219]>1e-35?-.0534489198792768:e[138]>1e-35?.017328465617667224:e[4]>2.970085626360216?e[144]>1e-35?-.0662951231725991:e[143]>1e-35?-.04739088646917139:e[145]>1e-35?-.07635546796992515:e[14]>1e-35?.012433708195861912:e[217]>1e-35?.021046036228368578:e[51]>1e-35?-.07024391932712475:-.007585229386863768:e[127]>1e-35?.0788172427657374:.0036475442240054556,q=e[0]>1e-35?e[2]>1.4978661367769956?e[2]>2.802901033147999?e[153]>1e-35?-.02488671343402725:e[135]>1e-35?-.026342401137212534:e[4]>1.4978661367769956?-.0002120610158998857:-.02619014803287452:e[5]>3.772694874805912?.00791871819482647:.05245006986819034:e[5]>5.431533816254341?e[2]>.8958797346140276?.026755493155023333:.05657996196424821:e[5]>4.424828703319957?e[28]>1e-35?-.12833948112036647:.02009706276124955:e[135]>1e-35?-.1062651205805238:-.014392542658357654:e[156]>1e-35?e[11]>1e-35?-.0426876288098691:-.009210886749467585:e[25]>1e-35?-.029685120249418873:e[153]>1e-35?e[24]>1e-35?.039675921298659045:-.01470247025894634:e[135]>1e-35?-.013162475027411236:e[2]>1e-35?e[22]>1e-35?-.01924589513592333:e[21]>1e-35?-.02301719200164619:e[5]>8.75754777636908?e[4]>2.602003343538398?-.0007468484638490539:-.0158247553028744:e[1]>1e-35?e[99]>1e-35?.024493682002973784:e[42]>1e-35?-.07469088345156226:e[45]>1e-35?-.03838380763638677:e[114]>1e-35?.02409327545276692:e[154]>1e-35?-.038977286951036944:e[208]>1e-35?.021915882358345885:.003839964304606302:-.0014382346596150915:-.008713493537728363,H=e[0]>1e-35?e[2]>1.4978661367769956?e[2]>4.119004124609202?e[3]>1.2424533248940002?-.0017308950709495397:-.020269742816377157:e[5]>3.5694334999727624?e[6]>6.468474521450064?.007854184286630537:-.005163758444496073:e[3]>1.2424533248940002?e[12]>1e-35?-.009039854020477722:.08762320620103459:e[194]>1e-35?-.3433922378591172:e[24]>1e-35?-.2523113760729937:-.000461371156912453:e[5]>5.692045796563381?e[3]>1.4978661367769956?.007177758561499448:e[2]>.8958797346140276?.03195343200682438:.059909349900388334:e[5]>4.424828703319957?e[28]>1e-35?-.10695282804536732:.019125081292682575:e[135]>1e-35?-.09257011968677195:-.012855523323410875:e[14]>1e-35?.010052176448775013:e[152]>1e-35?.011482760058014926:e[156]>1e-35?-.017677609761538152:e[24]>1e-35?.01670301885059328:e[39]>1e-35?-.02425844450882272:e[12]>1e-35?e[3]>1.2424533248940002?e[6]>5.980149988077803?.01117036123239103:e[3]>1.4978661367769956?-.005154239762347923:.06349844063391799:-.011876368966362884:e[4]>3.772694874805912?-.010120762110714197:e[5]>3.276966702012906?e[4]>2.4414009612931857?e[4]>3.1132683346437333?-.0035902728428789336:.003411450739155564:e[5]>8.17933999189099?-.018866709049095685:-.0038747233097564068:.024379138339081993,V=e[7]>.5866799179067689?e[11]>1e-35?e[217]>1e-35?.01816196279626246:-.008720340174685528:e[14]>1e-35?.017422275374961747:e[3]>2.802901033147999?e[6]>6.0026509725338455?e[18]>1e-35?-.035421013136394335:e[219]>1e-35?-.03997357699142973:e[3]>4.993822430271426?-.03250278247092862:.004080430247607075:-.010055330454519094:e[5]>9.345963324807864?-.008136951493137817:e[90]>1e-35?-.16414188828180187:e[45]>1e-35?-.0395103723535772:e[17]>1e-35?e[6]>3.314020688089767?.03144428117941763:-.12305809642153893:e[5]>3.417592293073651?.006863569747629234:e[7]>.9626084674797213?e[204]>1e-35?.08986402088848823:e[100]>1e-35?.09658177526577977:e[141]>1e-35?.06795495668113817:e[28]>1e-35?e[3]>1e-35?.10311172778826272:-.12367638872784459:e[209]>1e-35?.06796205879581844:e[6]>3.0677824455408698?e[3]>2.012675845367575?-.1815028770626217:-.027600842388305583:.013979123567456554:-.003475039039176338:e[6]>4.3882378946731615?e[3]>3.6242520361853052?-.008151073332139989:e[3]>2.4414009612931857?e[48]>1e-35?-.05732062477153205:.0038104987226822806:e[7]>.14547530463198097?-.0015360108147469411:-.014797616303672155:e[3]>.8958797346140276?-.010446976011382926:-.039018423658353285,z=e[0]>1e-35?e[2]>1.4978661367769956?e[2]>4.620046665062766?e[3]>1.8688348091416842?-.0031733808376565214:-.019463570735432378:.0032566959999593536:e[5]>5.692045796563381?e[3]>1.4978661367769956?.006472511895453073:e[2]>.8958797346140276?.029439910335277677:.05703290277034656:e[219]>1e-35?-.06489530937321614:e[5]>4.424828703319957?.017756995160153607:e[125]>1e-35?-.13863131633711023:-.011337464460106939:e[29]>1e-35?e[2]>.8958797346140276?e[3]>1e-35?-.04822012795561216:e[125]>1e-35?.06083023155995546:e[141]>1e-35?.04503531231698771:e[5]>7.751690325550034?-.008826435995092507:.0004769856196102064:e[5]>5.895778350950796?-.03439788269853701:.0012862199645308793:e[141]>1e-35?e[3]>3.0677824455408698?.0046610227653059695:-.04504560149384845:e[3]>4.3372693810700085?-.011924612526365003:e[151]>1e-35?-.07909878419302184:e[40]>1e-35?-.04837106565429512:e[52]>1e-35?-.06478730352567258:e[18]>1e-35?e[46]>1e-35?.060888920864590634:e[5]>3.5694334999727624?-.02601024872439008:.07960150564774994:e[46]>1e-35?-.027213119561154103:e[51]>1e-35?-.054081846676903716:e[54]>1e-35?-.07375359621246233:e[50]>1e-35?-.0570341640965886:.0021129818482267812,K=e[2]>2.861792550976191?e[11]>1e-35?e[58]>1e-35?-.09222476830824185:e[156]>1e-35?-.044357001480428:-.009033627105152873:e[8]>1e-35?e[5]>7.429817490674132?-.007435399919321396:-.025630334739367253:e[155]>1e-35?.02064199664419035:e[5]>8.75754777636908?e[2]>4.119004124609202?-.012759040985224594:-.0009375109950390992:e[21]>1e-35?-.028664595543047417:e[187]>1e-35?-.03837361994986333:e[22]>1e-35?-.027274995074267547:e[14]>1e-35?.016392245342055616:e[17]>1e-35?.022509678093313362:e[28]>1e-35?.025145343126000193:e[39]>1e-35?-.02939647868188604:.00042395552644239256:e[29]>1e-35?e[2]>2.012675845367575?-.0030925701821976686:e[5]>6.0390628155997765?e[2]>.8958797346140276?.010736817315927911:.02426980448005241:e[28]>1e-35?e[194]>1e-35?-.3070569158934055:e[196]>1e-35?-.5506885961570867:-.033353293982668515:.006553036790621832:e[2]>1.2424533248940002?e[5]>3.5694334999727624?e[155]>1e-35?.02102370525016274:.003409533559556135:e[204]>1e-35?.08873962123163927:e[24]>1e-35?.10555359938821945:e[28]>1e-35?.09719645392539251:e[196]>1e-35?.08224623369607056:-.020134405544960793:-.0015937623030202052,W=e[0]>1e-35?e[2]>1.8688348091416842?e[3]>1.4978661367769956?e[3]>3.540854293052788?-.0076758153562413375:e[18]>1e-35?-.04295196457825341:e[51]>1e-35?-.13248011320062422:.008952360414023641:e[7]>.987306237235768?.006439776900137331:-.012660562195035134:e[3]>2.861792550976191?e[30]>1e-35?.026757175255811883:-.01062556784320532:e[2]>.8958797346140276?.02114926571950188:e[8]>1e-35?e[7]>.9738681190948303?e[7]>.996914501566243?.039844832378913425:-.06690456482695102:.05010759067838343:e[7]>.9901971344332651?e[204]>1e-35?e[7]>.9945060383544003?.03772632631184001:-.28522617893050056:e[28]>1e-35?-.060992612788434375:.03341245674945403:.051288950777861456:e[8]>1e-35?-.010769283931178146:e[29]>1e-35?e[2]>.8958797346140276?e[1]>1e-35?e[7]>.98482287934795?.009069204772381522:-.004081394384581673:-.03594060084257492:e[7]>.9216401592048815?-.00442206228805168:-.03576891499137606:e[55]>1e-35?-.08223884312902127:e[57]>1e-35?-.0742535346669798:e[149]>1e-35?-.07940704728071792:e[39]>1e-35?-.017161105634171125:e[49]>1e-35?-.04763279499691125:e[139]>1e-35?-.027192821855546695:e[10]>1e-35?-.0036316338579956914:.0026484338648234077,G=e[0]>1e-35?e[2]>1.4978661367769956?e[2]>5.527441013321604?-.012306712525171806:e[7]>.26911173821332884?e[18]>1e-35?-.027850707388722303:e[91]>1e-35?-.07216882827488169:e[2]>2.740319461670996?e[3]>1.4978661367769956?.005596837686865309:-.0059429747278747225:.009524033665726878:-.0077898166249992535:e[6]>5.912149824839399?e[3]>1.4978661367769956?e[30]>1e-35?.032201880996274065:-.009587971174292791:e[2]>.8958797346140276?.02761965407835318:.05238312639482409:e[7]>.990877425524446?e[28]>1e-35?e[156]>1e-35?.08220352701195494:-.16200772313735304:e[135]>1e-35?e[6]>4.310776603370241?-.03126230621131264:-.15437767199900418:e[219]>1e-35?e[2]>.8958797346140276?.018944713961164792:e[3]>1e-35?.06629929139668997:-.16790799717043633:e[192]>1e-35?-.3320398525405097:.009790162291004705:e[125]>1e-35?-.0996239956884951:.017982806591038288:e[25]>1e-35?-.02642518530716432:e[6]>9.286096980078398?e[3]>2.740319461670996?-.0027582177390145703:-.02047492290459601:e[17]>1e-35?.01622159988588393:e[7]>.5866799179067689?.0012556670436606133:e[3]>2.3502401828962087?e[3]>3.314020688089767?-.00567335909535631:.0036605424249172938:e[7]>.085616240166877?-.00662352094724046:-.024196995936398374,Q=e[0]>1e-35?e[2]>1.2424533248940002?e[2]>2.802901033147999?e[3]>1.8688348091416842?e[4]>3.6242520361853052?-.008283589876968955:.005263882290960596:e[7]>.9662372103242399?.0028703212438091555:-.014488335095453487:e[5]>3.5694334999727624?.006182444666070272:.04834325475124454:e[5]>5.821564412917691?e[3]>1.4978661367769956?.006862035478899274:e[2]>1e-35?.03694434517261685:.06818308291563471:e[8]>1e-35?e[4]>3.979637980058199?-.14792403668068005:e[5]>4.297262267176281?.04085199387960594:-.08112459203056922:e[7]>.990877425524446?e[204]>1e-35?e[4]>2.4414009612931857?.040094872099644886:-.37432021591644105:e[128]>1e-35?e[17]>1e-35?.11216772098992614:-.39517539261887863:-.006202508512715542:.031730389306944315:e[8]>1e-35?e[5]>3.156774023138548?-.011787620507206525:e[3]>1.2424533248940002?-.0681989521208321:.06597717957453096:e[2]>1e-35?e[25]>1e-35?-.024543929344106336:e[5]>8.193814844759492?e[4]>2.602003343538398?e[2]>5.167634984480833?-.00996811570890536:.001134417943860963:-.013004815776467261:e[1]>1e-35?e[22]>1e-35?-.019057324908699217:e[141]>1e-35?-.026707851278989517:.005608056403567553:-.0017699070677530831:e[3]>1.4978661367769956?-.005457163739006659:-.02994467745413277,Y=e[11]>1e-35?e[154]>1e-35?-.07640004589975245:e[153]>1e-35?-.027921183286970398:e[156]>1e-35?-.02508900369371103:e[47]>1e-35?-.09621039139423637:e[46]>1e-35?-.05890206826599292:-.0018521707885188695:e[7]>.1998775237752378?e[39]>1e-35?-.02026563108381904:e[91]>1e-35?-.03979999802398471:e[14]>1e-35?e[134]>1e-35?.044705853812635206:.01112016315736189:e[24]>1e-35?e[6]>3.417592293073651?.01585670681557334:.0820229237073549:e[9]>1e-35?e[204]>1e-35?e[6]>3.9219243190762363?.01475544028693712:e[30]>1e-35?.10219265831102325:-.0567832116465987:e[154]>1e-35?-.04682869193620295:.0058147572533605784:e[123]>1e-35?-.04011640490395746:e[17]>1e-35?e[6]>3.314020688089767?.016472642951500794:-.10372235311156908:e[19]>1e-35?.013619887374131652:e[28]>1e-35?e[6]>3.1984648276080736?e[6]>5.5816130673839615?.021404525777064917:-.022090537029637168:.07927547222505857:e[129]>1e-35?-.0315112950229846:e[90]>1e-35?-.08016175793969123:e[60]>1e-35?-.044255594885932:e[150]>1e-35?-.0643645650066138:18071436579202054e-21:e[6]>6.132312266239896?.00017227075512669227:-.010904669702571911,J=e[0]>1e-35?e[1]>1e-35?e[7]>.30853255358841714?e[154]>1e-35?-.053460642910797676:.009652079082741289:-.0017676195976280011:e[134]>1e-35?.01746182064829904:e[32]>1e-35?.033149881191962445:e[138]>1e-35?.02149173543949675:e[37]>1e-35?.028519159270523897:e[152]>1e-35?.023352031441951773:e[217]>1e-35?.02290558132732214:-.01850975101703459:e[152]>1e-35?.010488854074509982:e[155]>1e-35?e[12]>1e-35?.027490522294963154:.002575743497494008:e[131]>1e-35?-.07138027268500055:e[57]>1e-35?-.06658662137088783:e[28]>1e-35?.015141080652315508:e[55]>1e-35?-.07156337757427284:e[204]>1e-35?.008085415901726045:e[99]>1e-35?e[1]>1e-35?.01803019280250009:-.012275416064615064:e[113]>1e-35?.007680714218522011:e[102]>1e-35?.01923593781092882:e[38]>1e-35?.00598208846998872:e[112]>1e-35?.00895148693111358:e[217]>1e-35?.004322676779141819:e[114]>1e-35?e[1]>1e-35?.019173900241286065:e[18]>1e-35?-.1302545616586715:-.012219608237225175:e[89]>1e-35?.019080595932083305:e[95]>1e-35?.009182530113836561:-.006531048204768366,X=e[2]>4.135134555718313?e[47]>1e-35?-.06057129526622943:e[5]>6.805168536739806?e[3]>2.4414009612931857?e[1]>1e-35?e[32]>1e-35?-.09672976728291365:e[217]>1e-35?-.09138286775903748:e[114]>1e-35?.034435801312936894:.003550781249532139:e[56]>1e-35?.06582022232543998:e[144]>1e-35?-.08601101006110747:-.006766914059699758:e[217]>1e-35?.001822103802069182:-.013646878234832634:e[8]>1e-35?-.02495807137678248:e[1]>1e-35?.009517017217557915:-.007488737506950444:e[6]>6.1537953943602615?e[140]>1e-35?-.013180308369805589:e[51]>1e-35?-.0496089337787575:e[15]>1e-35?e[30]>1e-35?.017032153502995334:-.01330098154550191:e[10]>1e-35?e[56]>1e-35?.04713518460375107:-.0016223104582873055:e[131]>1e-35?-.07291331059881433:e[27]>1e-35?-.015619378359486803:.006051005570772542:e[3]>3.1132683346437333?e[8]>1e-35?-.02945681137428643:-.00725026522062693:e[6]>1e-35?e[3]>1.2424533248940002?.0035081297381004684:e[194]>1e-35?e[5]>3.772694874805912?-.03142097937872678:-.17253564001853064:e[5]>3.156774023138548?-.004860170522962415:e[12]>1e-35?-.04169370739781986:.05886396855048806:-.10415236736977414,Z=e[2]>2.3502401828962087?e[11]>1e-35?e[58]>1e-35?-.07548370555339029:-.009060327134219393:e[21]>1e-35?-.02536204329245056:e[155]>1e-35?.01626198918750622:e[142]>1e-35?-.029262265693304763:e[4]>1.8688348091416842?e[48]>1e-35?-.0522966414357639:e[47]>1e-35?-.03867213359133592:e[149]>1e-35?-.10392339919606915:e[135]>1e-35?-.010541433982611018:e[51]>1e-35?-.06273170107556418:e[54]>1e-35?-.08769404750229767:e[18]>1e-35?e[1]>1e-35?.0022966362330231133:e[31]>1e-35?.19571528454816625:-.04919246049942885:e[50]>1e-35?-.06766114512966344:e[7]>.9793410316570949?.00837983401462093:.0007986280224776339:e[186]>1e-35?-.16446174535054356:e[62]>1e-35?.06508947502037822:-.010260699234562241:e[6]>5.486867329823672?e[140]>1e-35?-.01589822136096899:e[125]>1e-35?-.025465846683560996:e[190]>1e-35?-.03671457167643481:e[91]>1e-35?-.03821691103237143:e[57]>1e-35?-.07502589184745939:e[50]>1e-35?-.05395522531288487:.005241788285288346:e[4]>3.1132683346437333?-.008741587825172916:e[12]>1e-35?e[100]>1e-35?.06608964318040904:-.012827641806975033:.004744161815471635,ee=e[4]>.8958797346140276?e[2]>5.4049245766661995?e[5]>6.0051201133541365?-.008352440702113342:.00818161196788124:e[123]>1e-35?-.02387242845183433:e[190]>1e-35?-.03574127589374163:e[152]>1e-35?.01262147105943106:e[11]>1e-35?e[58]>1e-35?-.05955906348417553:-.003717083835106387:e[6]>6.0026509725338455?e[15]>1e-35?e[30]>1e-35?.023589988800048537:-.01290090410411923:e[38]>1e-35?.015295369946508892:e[1]>1e-35?e[4]>2.740319461670996?e[22]>1e-35?-.01614208413608714:e[42]>1e-35?-.05454658382875832:.008894057269932708:e[141]>1e-35?-.029660896741885025:.0007918628584206305:e[12]>1e-35?.010735865892076339:e[218]>1e-35?.06499398466334683:e[29]>1e-35?-.02987220407530282:e[118]>1e-35?-.05994319680494358:-.0022119035344297464:e[113]>1e-35?e[24]>1e-35?.09992180359591052:.003953091072683087:e[204]>1e-35?e[4]>2.249904835165133?.0012737346185997833:e[5]>3.979637980058199?.012350990163327259:e[29]>1e-35?-.4173182186315585:.09483857671510697:-.0034771114722081282:e[19]>1e-35?.04818172610227253:e[158]>1e-35?.09085872490042819:e[123]>1e-35?.046170414156546824:-.030833991141721785,te=e[0]>1e-35?e[2]>1.2424533248940002?e[2]>2.138333059508028?e[3]>1.4978661367769956?e[3]>4.197173680708697?-.015067858446918237:e[5]>3.979637980058199?.0025493966284458503:e[24]>1e-35?.10170949517680355:e[3]>2.3502401828962087?-.010182198776560389:e[7]>.9662372103242399?.0855616171705204:-.0044290837387121786:e[7]>.992067132663463?.006950766900495411:-.011703657118613042:e[3]>3.314020688089767?-.007590151825214328:.011931088318037653:e[5]>4.424828703319957?e[3]>1.4978661367769956?.003895993078605918:e[2]>1e-35?e[5]>5.859359688974663?.03311360926528595:e[7]>.9936484368123463?e[28]>1e-35?-.1296383065201116:e[18]>1e-35?-.2304238024287801:-.0007035160942990814:.03872938637191365:.05931958562003542:e[204]>1e-35?e[7]>.9926276364955392?-.2503820824196552:.01514980593659256:e[135]>1e-35?e[7]>.990877425524446?-.12146435764173391:.03579230653026111:e[125]>1e-35?-.11990587076136816:-.0017264106529335022:e[2]>.8958797346140276?e[3]>4.878999622893762?-.028006872909888104:e[17]>1e-35?.015327119563713427:e[14]>1e-35?.008966123864441086:e[24]>1e-35?.014884319812071584:-.0008180929266082377:e[29]>1e-35?e[5]>5.895778350950796?-.02927173520516398:.004256706136162408:-.0030692852485265805,re=e[39]>1e-35?-.019116728566000912:e[152]>1e-35?.011159312353677259:e[52]>1e-35?-.06556505864685434:e[7]>.14547530463198097?e[187]>1e-35?-.02203060071288757:e[48]>1e-35?-.03406851575382452:e[10]>1e-35?e[219]>1e-35?-.026242020752538932:-.0026163734864036088:e[21]>1e-35?-.016803181860075653:e[8]>1e-35?e[5]>3.0201273556387074?e[6]>4.722943345003718?e[125]>1e-35?-.07907862980413462:-.0024968534057976956:e[141]>1e-35?.01751368963010255:-.035334686232177996:e[3]>1e-35?-.049727650261844114:.06649006602788514:e[51]>1e-35?-.047051279496267896:e[58]>1e-35?e[19]>1e-35?.06794814379814933:-.033933057704283995:e[6]>8.681774988134558?-.001906867260604815:e[3]>3.3842466058243152?e[23]>1e-35?.029126145919054786:e[12]>1e-35?e[59]>1e-35?.06547842372312768:.005706402727440608:e[89]>1e-35?.05238448470974841:-.003970577798047124:e[141]>1e-35?e[3]>1e-35?-.02994666941636212:.029175297065511276:e[139]>1e-35?-.03926804943552878:e[7]>.9626084674797213?.010270060885238803:e[6]>4.5379471377116305?.0051640733904868355:-.006326617548806485:e[3]>2.3502401828962087?-.001064039369711557:-.015232776877478657,ne=e[4]>.8958797346140276?e[0]>1e-35?e[3]>3.540854293052788?e[138]>1e-35?.020620751195117866:-.007657642824282572:e[9]>1e-35?.013255738783000171:e[123]>1e-35?-.04553588467808997:e[14]>1e-35?.020257942633657516:e[17]>1e-35?.02379466680602821:e[7]>.26911173821332884?.004563013176326579:-.006044878247080096:e[208]>1e-35?e[1]>1e-35?.016583051243963785:-.005473696128326885:e[53]>1e-35?-.07392011100318682:e[3]>4.840234496705036?-.022277334024938686:e[49]>1e-35?-.04140311782670083:e[40]>1e-35?-.041278341040658334:e[156]>1e-35?-.01087788432462589:e[8]>1e-35?e[141]>1e-35?.032404890147508435:-.008762958389316138:e[153]>1e-35?e[18]>1e-35?.03064796696780178:e[19]>1e-35?.025912082684934896:e[7]>.9033253454895247?.00010665286308939541:-.019390651252802232:e[133]>1e-35?-.013215417920201165:e[35]>1e-35?-.07409193965805899:e[16]>1e-35?.010595288788401727:.0004445963442680354:e[19]>1e-35?.043800560164078434:e[62]>1e-35?.08440762960688118:e[123]>1e-35?.04196062757398021:e[44]>1e-35?e[7]>.9880960409521241?-.14025705728324367:.07605327900446729:-.030453882536033008,ie=e[14]>1e-35?e[134]>1e-35?.03807815059641535:.007895137847547357:e[39]>1e-35?-.019172673927560828:e[138]>1e-35?.009207480510332959:e[152]>1e-35?e[10]>1e-35?.029310247627617716:.006422126177312616:e[3]>3.5114340430413216?e[155]>1e-35?.02869511059037871:e[137]>1e-35?.048763707543632046:e[218]>1e-35?.0393143924208134:-.0065205942363783:e[4]>2.4414009612931857?e[113]>1e-35?.016047178137914484:e[35]>1e-35?-.09486179869071369:e[118]>1e-35?-.032706818831570415:e[0]>1e-35?.004733859562945298:-4345884264792552e-20:e[29]>1e-35?e[204]>1e-35?e[4]>2.3502401828962087?-.23804773582311067:.0015066742334155967:e[194]>1e-35?e[4]>1.7005986908310777?-.013296404682101122:-.14340192620927933:e[196]>1e-35?-.17446678790111786:-.01140535620661492:e[141]>1e-35?-.03362328403627273:e[99]>1e-35?.02082592497315901:e[196]>1e-35?.02125156827172031:e[204]>1e-35?.018738441981476887:e[194]>1e-35?.022230335367621302:e[114]>1e-35?.017460982004618885:e[210]>1e-35?e[11]>1e-35?-.07421933796695453:-.02600449772874995:e[62]>1e-35?.0435295764572802:-.0036358741919687645,oe=e[2]>4.749261159734808?e[5]>6.826002629905951?e[29]>1e-35?-.012866931871530748:e[47]>1e-35?-.06511122680099479:-.0033152297369715466:e[1]>1e-35?.00634942519508748:-.008516826211528918:e[6]>6.1537953943602615?e[11]>1e-35?e[121]>1e-35?e[1]>1e-35?-.06214080664476329:.037029947625630194:e[47]>1e-35?-.08203414630098728:-.0044122376347199765:e[15]>1e-35?e[30]>1e-35?.012452689013210465:-.011970977023212193:e[10]>1e-35?e[152]>1e-35?.02888624440861723:-.0026872248277927456:e[27]>1e-35?-.01471521834054285:e[21]>1e-35?-.014970363019863132:e[13]>1e-35?-.0057151868439017945:e[38]>1e-35?.01633003881478886:.005850603591179588:e[113]>1e-35?e[5]>3.979637980058199?.006600693642185256:e[6]>3.1984648276080736?.07576534772024612:-.013028252220942527:e[204]>1e-35?e[9]>1e-35?e[6]>3.9219243190762363?.01266221511189265:e[29]>1e-35?-.20167612409830682:.09361829582187109:.0016303497789744046:e[6]>4.310776603370241?-.0015960016142716584:e[141]>1e-35?e[2]>2.249904835165133?e[6]>2.970085626360216?-.05054316446311788:.06528096075929847:e[29]>1e-35?.07763431964140277:-.017239135292908336:-.011068823413100247,se=e[91]>1e-35?-.03524202222673902:e[55]>1e-35?-.07505808762820981:e[47]>1e-35?-.026314216162986376:e[49]>1e-35?-.045488810456426665:e[54]>1e-35?-.06424779605129435:e[0]>1e-35?e[39]>1e-35?-.03267263134559766:e[46]>1e-35?-.049285436356671077:e[51]>1e-35?-.09277060040547602:e[4]>.8958797346140276?e[123]>1e-35?-.027164727231258436:e[7]>.4232249052377311?e[14]>1e-35?.021561483416797714:e[9]>1e-35?e[58]>1e-35?-.08387877475105178:.014404401501386124:.004694473365260974:-.0001897538693116325:-.017140588284242805:e[5]>9.119594757170685?e[3]>2.740319461670996?-.0007153953072197825:-.010378474356201449:e[8]>1e-35?e[5]>3.276966702012906?e[125]>1e-35?-.06966241558514917:e[4]>4.82429765145367?-.05703428861212874:-.007549683006633188:e[3]>1.2424533248940002?-.05340556429257431:.0524214727387076:e[22]>1e-35?-.012756524179901607:e[186]>1e-35?-.06578146880564559:e[208]>1e-35?.011189277267677045:e[11]>1e-35?e[58]>1e-35?-.05051984734793551:e[3]>1.2424533248940002?-.0002576217567062796:e[134]>1e-35?-.07452351335236179:-.010366062496356129:e[94]>1e-35?-.04206673603732986:.0017654268359667174,ae=e[2]>2.3502401828962087?e[28]>1e-35?.018743416209068924:e[142]>1e-35?-.027628078748284907:e[4]>1.7005986908310777?e[123]>1e-35?-.039485087567133176:e[48]>1e-35?-.04707407726639779:e[49]>1e-35?-.0644727439161007:e[47]>1e-35?-.03586301268310228:e[52]>1e-35?-.08213761833929575:e[60]>1e-35?-.036939376764301805:e[22]>1e-35?-.02264827779335228:e[153]>1e-35?e[24]>1e-35?.03651632275248908:-.010403215174169965:e[18]>1e-35?e[31]>1e-35?.17011943799802248:-.024083374989820074:e[147]>1e-35?-.05792387046048145:e[39]>1e-35?-.019000152117179:e[54]>1e-35?-.09256681585621543:e[50]>1e-35?-.06535283940797192:e[187]>1e-35?-.023020538580498528:e[149]>1e-35?-.09670391878996044:e[8]>1e-35?e[6]>5.865049616265698?.0007122257672540384:-.024203929126070334:e[55]>1e-35?-.10687519344783902:e[21]>1e-35?-.019836359134795922:.0028141634686288143:e[153]>1e-35?-.044827592367532504:-.009894012855110334:e[140]>1e-35?e[18]>1e-35?.060584003745668275:-.015006980258423744:e[6]>5.161920636569023?e[125]>1e-35?-.021624709427283298:.0035264081894521636:-.0030260520850755417,ce=e[57]>1e-35?-.06665941268716478:e[2]>5.4049245766661995?-.0048763725607228565:e[17]>1e-35?.012937023835595996:e[91]>1e-35?-.032642493399923284:e[40]>1e-35?-.04355571234278559:e[14]>1e-35?e[217]>1e-35?-.030555708374197955:.010895997063478696:e[1]>1e-35?e[99]>1e-35?.016029829045206837:e[114]>1e-35?.017475123428921584:e[139]>1e-35?-.042037981483985604:e[210]>1e-35?e[29]>1e-35?.015395913258454092:-.024779051599098958:e[90]>1e-35?-.09436512907953146:e[25]>1e-35?-.0385103760507401:e[113]>1e-35?.014955995782471:e[208]>1e-35?.01363101947809469:.0004708078358576994:e[29]>1e-35?-.02567148566035587:e[217]>1e-35?.017896286118860596:e[118]>1e-35?-.04366196842115269:e[144]>1e-35?-.04332564222613586:e[54]>1e-35?-.08095356842154083:e[31]>1e-35?e[15]>1e-35?-.12797365603832508:.05407709367007049:e[56]>1e-35?.030874690971051524:e[148]>1e-35?-.06664437092250396:e[50]>1e-35?-.05710031053092695:e[114]>1e-35?e[18]>1e-35?-.12348764088627251:-.014081947133593207:e[147]>1e-35?-.044629298717173554:-.000742893245658901,le=e[138]>1e-35?.008266725465725232:e[1]>1e-35?e[37]>1e-35?-.06288072801700428:e[114]>1e-35?.01701875404216428:e[128]>1e-35?-.022207708344996902:e[113]>1e-35?e[24]>1e-35?.08078133512323216:.010126216487392538:e[11]>1e-35?e[58]>1e-35?-.0542116306120395:-.004962440421854299:e[155]>1e-35?e[30]>1e-35?.02107443326718807:-.01069225359959257:.0009105709984003484:e[218]>1e-35?.05160355321154702:e[134]>1e-35?.006114948378400552:e[121]>1e-35?.016106484014031797:e[89]>1e-35?.01912348851711998:e[56]>1e-35?.029777849606436514:e[157]>1e-35?.04060172642469715:e[31]>1e-35?.040190765597096945:e[115]>1e-35?.038285461163007885:e[144]>1e-35?-.04397941351839926:e[53]>1e-35?-.09153555712989248:e[34]>1e-35?.05063635650139542:e[145]>1e-35?-.05531793235403996:e[18]>1e-35?e[142]>1e-35?.050915836711889595:-.038668153033606156:e[142]>1e-35?-.03161888799270195:e[21]>1e-35?-.039152400008548416:e[147]>1e-35?-.06369054146375448:e[146]>1e-35?-.06687062048733548:e[143]>1e-35?-.0374398909044375:-.004075281311375503,ue=e[19]>1e-35?.011138060439416179:e[7]>.054053454943712505?e[17]>1e-35?e[30]>1e-35?.031458353209402545:.006712963530887799:e[135]>1e-35?-.008268741342836259:e[60]>1e-35?-.026373116795568554:e[7]>.8375851232899904?e[3]>2.602003343538398?e[6]>4.832297822126891?.001164103411669833:e[8]>1e-35?-.04419920795209664:-.007580602414427876:e[6]>3.417592293073651?e[6]>8.80963889693121?-.00653283113371423:e[8]>1e-35?e[125]>1e-35?-.10156793652811894:-.004200534838133274:e[18]>1e-35?-.01192673279840267:.007421951916920296:e[7]>.9626084674797213?e[29]>1e-35?e[6]>2.970085626360216?-.0032059430383565256:.05159315082197918:e[8]>1e-35?-.0890031715943104:e[22]>1e-35?-.16814104441488775:e[12]>1e-35?e[100]>1e-35?.1021284677424052:-.13655977142603173:.09393254504800182:-.0008030674521708154:e[153]>1e-35?e[18]>1e-35?.028570793527563892:-.01146507406243734:e[125]>1e-35?e[3]>1e-35?-.04344386283066575:.049543778722220704:e[47]>1e-35?-.025602694767462936:41633336342102227e-21:e[3]>2.3502401828962087?e[3]>3.3497501700808394?-.018924000087166926:.005374758944061522:e[14]>1e-35?.02825013192303339:-.028367959366723622,de=e[190]>1e-35?-.033259392758942484:e[4]>2.4414009612931857?e[123]>1e-35?-.030965448877928344:e[150]>1e-35?-.05353588365501967:e[53]>1e-35?-.07322459471644706:e[0]>1e-35?e[6]>6.9012339353508745?.007566110700214329:e[4]>3.0677824455408698?e[7]>.5242163672259389?e[8]>1e-35?e[6]>4.722943345003718?-.00508197369229565:e[4]>3.5694334999727624?-.09566908841488272:-.009799018561370653:e[29]>1e-35?.01134634874419129:-.008480456528154491:-.010775036248093376:.006611525544742429:e[23]>1e-35?.01761735039511882:e[19]>1e-35?.01278442042249664:-.0002242132003162585:e[186]>1e-35?-.1282956565830828:e[99]>1e-35?.018493666625505303:e[141]>1e-35?-.026024552608676074:e[29]>1e-35?e[5]>3.5694334999727624?e[217]>1e-35?.010089877008871859:e[7]>.9569480028661056?-.0021891593882122327:-.019455050281455402:e[7]>.960816451500545?-.13777176433158442:.02722608122697913:e[28]>1e-35?e[194]>1e-35?.09549833737461155:.012447932823540411:e[129]>1e-35?e[26]>1e-35?.147381625399948:-.03418523266130075:e[7]>.26911173821332884?.0014660191124088442:e[217]>1e-35?-.08282397562490618:e[210]>1e-35?-.0386848317545183:-.001892646396528824,pe=e[57]>1e-35?-.059790543460520464:e[55]>1e-35?-.06524069243313577:e[3]>4.283562780082224?e[37]>1e-35?-.054605342954169904:-.006343751747681404:e[17]>1e-35?.011961708215735271:e[40]>1e-35?-.04296088601962452:e[6]>1e-35?e[24]>1e-35?e[113]>1e-35?e[6]>4.460127707454046?-.026498922218692673:.10501477027016158:e[6]>4.03420147928485?.012792216148037112:e[7]>.9830997303909479?-.2271005546552327:-.008348690537914538:e[9]>1e-35?e[153]>1e-35?e[7]>.20588252599634785?-.004842123367456505:-.03575275485660392:e[99]>1e-35?e[1]>1e-35?.032397176999597294:-.0033271937210452387:e[204]>1e-35?.02154799118278769:.0034498877728340095:e[28]>1e-35?e[6]>3.0677824455408698?e[6]>5.5816130673839615?.01602715871650751:e[7]>.9901971344332651?e[194]>1e-35?-.21161676626091178:e[127]>1e-35?-.4024450297968636:-.030976570087232314:.0031980605341801454:.07943810970798848:e[135]>1e-35?-.00869354055420051:e[123]>1e-35?-.022241787113206086:e[62]>1e-35?.037165483434744594:e[7]>.04507521918085865?e[21]>1e-35?-.013433718654288605:e[155]>1e-35?.00919342834132915:-.0002729025327531227:-.012537468897218136:-.07894994665155514,he=e[4]>.8958797346140276?e[14]>1e-35?.007800140351631253:e[138]>1e-35?.007294945388686309:e[1]>1e-35?e[32]>1e-35?e[28]>1e-35?.09462192942805535:-.06376046128949985:e[37]>1e-35?-.06442220885770956:e[140]>1e-35?e[30]>1e-35?-.09261012186873348:-.015294712278584928:e[98]>1e-35?.019329173498247088:e[58]>1e-35?-.026405515460271967:e[5]>8.608586615680721?e[4]>2.602003343538398?6125118307170923e-20:-.009497787119169794:e[40]>1e-35?-.05491317248554455:e[7]>.30853255358841714?.003951848833690266:-.0021827028977256715:e[219]>1e-35?-.03918852409108207:e[98]>1e-35?-.025490621458423603:e[218]>1e-35?.04685239586600909:e[4]>2.970085626360216?e[152]>1e-35?.019288400231624092:e[132]>1e-35?.04845025214421127:e[157]>1e-35?.03681235344369351:e[18]>1e-35?-.034132162265456074:e[48]>1e-35?-.04861483835690636:e[142]>1e-35?-.031057400959951156:e[148]>1e-35?-.06903688486009983:-.004426858558248682:e[31]>1e-35?.06983425899920179:.002335587968443938:e[19]>1e-35?.04178364096434334:e[123]>1e-35?.03954255208630935:e[62]>1e-35?.07169067239737285:-.022094630155173406,fe=e[190]>1e-35?-.029705030481716018:e[2]>2.4414009612931857?e[125]>1e-35?e[3]>1e-35?-.052080713549693486:.015237248725743169:e[49]>1e-35?-.05738028956460733:e[28]>1e-35?.015629889576502864:e[14]>1e-35?.007178838639724632:e[217]>1e-35?.006873744757442591:e[3]>.8958797346140276?-.0009297977761919447:e[4]>2.740319461670996?-.0032588616048005344:e[209]>1e-35?-.09352716353634213:-.015820890219545396:e[0]>1e-35?e[2]>.8958797346140276?e[30]>1e-35?.019248760742983276:e[3]>2.861792550976191?e[6]>8.372051799062541?.011687619771455333:-.014380012538782239:.007119108038702808:e[5]>4.424828703319957?e[3]>2.249904835165133?-.004571416888569663:e[4]>.8958797346140276?e[2]>1e-35?.03291298609827498:.056149641245301286:e[6]>5.66469358412419?.03259771207074825:-.09357704176112766:e[135]>1e-35?e[4]>3.1132683346437333?e[4]>3.276966702012906?-.061655392996083594:-.32745698278768204:.05791789791717941:-.018505458368810124:e[2]>1.2424533248940002?.0026761409362875913:e[3]>1e-35?e[30]>1e-35?e[210]>1e-35?-.039544237504098204:-.00840469876565937:e[138]>1e-35?-.03964217397514852:-4.311139741723525e-7:e[5]>6.136645972583987?-.022772355719852342:.00817231129409795,ge=e[91]>1e-35?-.028069212077752072:e[2]>5.1209788959100075?e[25]>1e-35?e[4]>3.314020688089767?-.07374751231467579:-.012603466600012023:-.003323309316995181:e[0]>1e-35?e[2]>1.2424533248940002?e[11]>1e-35?-.008138434386494645:e[2]>1.8688348091416842?e[18]>1e-35?-.021752576521312197:e[142]>1e-35?-.03703704004008216:e[21]>1e-35?-.031901873695323615:.0007949433315561949:e[156]>1e-35?.04622194605125366:.007164185384903575:e[156]>1e-35?.05649230717257425:e[192]>1e-35?-.14560972428612223:e[144]>1e-35?-.0847860756426489:e[4]>.8958797346140276?e[2]>.8958797346140276?.009443385055723438:e[9]>1e-35?.0384706300742172:e[7]>.9738681190948303?e[7]>.9983480540068196?.03566002120217884:e[125]>1e-35?-.08601531943220733:e[28]>1e-35?-.07136595081940608:.005430826378707227:.026279964393698674:e[2]>.8958797346140276?.025916235406054845:-.05093685243097706:e[2]>.8958797346140276?e[4]>2.4414009612931857?e[22]>1e-35?-.018458649485324576:e[123]>1e-35?-.027048533130577097:e[9]>1e-35?.005768627348361876:.0011976274380886302:e[196]>1e-35?.024074476840894424:-.0040891042038809855:e[156]>1e-35?-.03722816735059365:-.004021663177778795,me=e[57]>1e-35?-.054174378986311306:e[55]>1e-35?-.05937408126377534:e[35]>1e-35?-.06355743050048665:e[52]>1e-35?-.049028563645544726:e[10]>1e-35?e[152]>1e-35?.023779508772836917:e[217]>1e-35?.00760039749111183:-.005758267779536595:e[6]>1e-35?e[50]>1e-35?-.03899686693288482:e[53]>1e-35?-.06158372699069763:e[19]>1e-35?.009506113370718208:e[154]>1e-35?-.021220440237800273:e[129]>1e-35?e[26]>1e-35?.12643307498280917:-.02322694568396696:e[49]>1e-35?-.03489161935560748:e[173]>1e-35?-.041310484369004336:e[116]>1e-35?-.026931019221510855:e[150]>1e-35?-.04336081700276943:e[46]>1e-35?-.01503021840754708:e[21]>1e-35?-.011723313966476847:e[187]>1e-35?e[30]>1e-35?.029035482597327224:-.020238143126606493:e[22]>1e-35?-.0092659038594408:e[6]>8.954867306462836?-.002270298325316596:e[25]>1e-35?e[1]>1e-35?e[152]>1e-35?.025059955137215612:-.058962720741665454:4061285457160542e-20:e[7]>.787025207541384?.0045073893285534905:e[156]>1e-35?-.00956127321029558:e[153]>1e-35?-.006428735642845697:.0020065887307204903:-.07142994726664682,ye=e[190]>1e-35?-.026482483927372538:e[11]>1e-35?e[153]>1e-35?-.019448665116575673:e[46]>1e-35?-.046207503035123526:e[143]>1e-35?-.060693025841649276:e[125]>1e-35?-.0635615784828548:-.0020226769939179086:e[10]>1e-35?e[152]>1e-35?.021657999498329004:e[217]>1e-35?.006867901248533881:e[186]>1e-35?-.17526174685635476:e[7]>.3736576099860928?e[125]>1e-35?-.06860813037660739:-.0030373931794416857:e[153]>1e-35?-.036659407900460406:-.009138716679401575:e[8]>1e-35?e[141]>1e-35?.022488528656368925:-.004824813956579289:e[155]>1e-35?e[29]>1e-35?-.0923825728762917:.013279779321478072:e[13]>1e-35?e[29]>1e-35?-.02015430689927317:-.0014075476679032272:e[21]>1e-35?-.010052866682366596:e[15]>1e-35?e[127]>1e-35?-.11613127921904604:-.004425492436566155:e[61]>1e-35?-.04761391619756717:e[38]>1e-35?.010790742168686546:e[138]>1e-35?e[25]>1e-35?-.03936956646884221:.012187893435100131:e[18]>1e-35?e[46]>1e-35?.052404637972043124:e[29]>1e-35?e[219]>1e-35?-.026128288926960785:.01402455905339408:-.018095204676971146:.002238241111198228,ve=e[3]>4.993822430271426?-.021704560089024494:e[39]>1e-35?-.012978601337522922:e[57]>1e-35?-.04850734344953324:e[190]>1e-35?-.02323817835232452:e[55]>1e-35?-.054265924680079236:e[144]>1e-35?-.020797331827991154:e[52]>1e-35?-.04407078296749134:e[50]>1e-35?-.03531075513550682:e[14]>1e-35?e[217]>1e-35?-.02603818360896512:.00845420085528292:e[90]>1e-35?e[3]>3.5114340430413216?.010289606334961197:-.10259966877314837:e[139]>1e-35?-.01903913128660918:e[17]>1e-35?e[30]>1e-35?.027295226228104732:e[38]>1e-35?.036847447575421244:e[3]>2.861792550976191?-.016454620470329126:.010475083165212631:e[19]>1e-35?.008675111927467:e[40]>1e-35?-.036362054443170776:e[9]>1e-35?.0031294075955568394:e[123]>1e-35?-.02131953072683769:e[24]>1e-35?e[113]>1e-35?e[3]>2.602003343538398?-.005045224468848018:e[3]>2.3502401828962087?.1006727710215487:-.21606952724358763:e[209]>1e-35?-.07903381656359819:.0099843967860757:e[28]>1e-35?.009909672751437115:e[155]>1e-35?e[3]>3.941534675652877?.04961274235179155:.005113567009198253:e[158]>1e-35?.031566828492110836:-.0012534895812835874,_e=e[4]>2.4414009612931857?e[123]>1e-35?-.022743199998420272:e[47]>1e-35?-.02199867034393067:e[3]>3.238486181444842?e[155]>1e-35?.015256601991879549:e[23]>1e-35?.01997791344831838:e[97]>1e-35?.024977281654938052:e[218]>1e-35?.031730655567930977:e[32]>1e-35?e[1]>1e-35?-.05855958691798028:-.009630189044251312:e[195]>1e-35?-.009842090802252708:e[125]>1e-35?-.030084333742373532:-.0009935375527704107:e[135]>1e-35?-.006040875366017567:e[43]>1e-35?-.03616920022546756:e[44]>1e-35?-.014787601622259254:e[0]>1e-35?.005949240867095038:.0018435357767462809:e[141]>1e-35?e[3]>1e-35?-.030610116678182732:.01960307197844505:e[3]>1.2424533248940002?e[101]>1e-35?-.04366907994393087:e[28]>1e-35?e[194]>1e-35?.0927536258129216:.00806369969474508:e[198]>1e-35?.03402296877725087:-.00033907517363096143:e[194]>1e-35?e[19]>1e-35?-.16957712930341856:e[28]>1e-35?-.2078243840685859:-.01982072284112783:e[134]>1e-35?-.059093837808976674:e[155]>1e-35?-.11429749518431415:e[1]>1e-35?e[123]>1e-35?.04159085402090426:-.0053579302271092874:-.038428527597709254,be=e[2]>2.249904835165133?e[53]>1e-35?-.09149569302330776:e[142]>1e-35?-.020143603866796752:e[29]>1e-35?e[1]>1e-35?e[4]>2.740319461670996?e[0]>1e-35?-.005838073295705989:.0025448179376697196:e[217]>1e-35?.010391363152324442:e[6]>3.9219243190762363?e[7]>.9546729796082215?.00016709708501075782:-.019274537854809464:e[7]>.9717523368299734?e[2]>4.848108675189105?.0038332904395533517:e[141]>1e-35?e[6]>3.0677824455408698?-.12592300140122323:-1.2073741246841418:-.17682453022795175:-.004373737265888883:-.032810714691009164:e[18]>1e-35?-.024280045660709612:e[156]>1e-35?-.023509654115095334:e[1]>1e-35?e[141]>1e-35?-.032438707623116556:e[32]>1e-35?-.061272201063817755:.004415514992097752:-.0017176659108089432:e[0]>1e-35?e[6]>6.288787065535392?e[2]>.8958797346140276?.008680085548304642:e[29]>1e-35?.03767506445697859:-.0007537359215762705:e[4]>.8958797346140276?.0002799056937607271:-.039667032027283916:e[2]>1.2424533248940002?.002506908961838236:e[29]>1e-35?e[7]>.950335336459789?.0027367426972748597:-.021265206402010337:e[30]>1e-35?e[210]>1e-35?-.03496264625173957:-.007705718616493613:e[138]>1e-35?-.035840689909527164:.0006855012949462712,we=e[2]>5.418317700738354?e[5]>6.0051201133541365?e[156]>1e-35?-.024776046248283234:-.004761578172448051:e[8]>1e-35?-.025343070913887773:.012224469039913016:e[150]>1e-35?-.04079051452350429:e[10]>1e-35?e[152]>1e-35?.019743419118584654:e[186]>1e-35?-.15575093795294756:e[217]>1e-35?.0056968023991711995:-.004356449942923164:e[5]>6.0051201133541365?e[125]>1e-35?-.01597803134795572:e[151]>1e-35?-.05058454115923059:e[50]>1e-35?-.03619853041443809:e[49]>1e-35?-.03261722685392842:e[24]>1e-35?.011909155984778505:e[2]>2.012675845367575?.0004933624031973823:e[219]>1e-35?.015579421213152617:.002812703494519415:e[113]>1e-35?e[24]>1e-35?.09675188599473092:.0008025077587732017:e[204]>1e-35?e[9]>1e-35?e[5]>3.772694874805912?.02609533140492082:e[29]>1e-35?-.21256031284758028:.09442590919716193:-.004086903422513798:e[24]>1e-35?e[5]>3.979637980058199?-.011071875945121415:e[209]>1e-35?-.19367443751378252:-.04414838576908475:e[178]>1e-35?-.06538606241685795:e[100]>1e-35?e[5]>3.772694874805912?-.01294941588968201:e[5]>2.673553765358735?.08150000027300734:-.08989919051554107:-.0032151101072856354,Ce=e[35]>1e-35?-.05704221149718709:e[91]>1e-35?-.023832002943165256:e[102]>1e-35?.015441451551750014:e[3]>4.993822430271426?-.020159490027748073:e[4]>2.3502401828962087?e[144]>1e-35?-.022873219553742163:e[22]>1e-35?-.01287591196884623:e[47]>1e-35?e[18]>1e-35?.07657102696661595:-.0243921910773003:e[150]>1e-35?-.043982850497096056:e[138]>1e-35?e[25]>1e-35?-.03740348349716821:.008237493112057112:e[49]>1e-35?-.03254806921800082:e[53]>1e-35?-.057370285686186163:e[3]>4.085941003063911?e[37]>1e-35?-.04084726667137505:e[155]>1e-35?.0323666619020495:-.0038866525930422893:e[118]>1e-35?e[18]>1e-35?-.0975422096275863:-.014038224866250074:e[136]>1e-35?-.03199938604211209:.0014268928516615767:e[99]>1e-35?.018668567929263327:e[5]>7.334002872979111?e[156]>1e-35?-.05380541629812827:e[210]>1e-35?e[30]>1e-35?-.047112416583853595:.00900546030963941:e[208]>1e-35?.02334424121914086:e[158]>1e-35?.04595592178250823:-.006709820970668842:e[204]>1e-35?e[5]>3.772694874805912?.009489783712825852:e[3]>2.249904835165133?.09999429949553015:-.03961464289941561:-.001190853283470586,Ee=e[39]>1e-35?-.011391872842603505:e[190]>1e-35?-.021093147889461955:e[51]>1e-35?e[18]>1e-35?.08723256651643213:-.04233732133209843:e[19]>1e-35?.008078856044745801:e[4]>.8958797346140276?e[60]>1e-35?-.022165860715145688:e[129]>1e-35?e[3]>3.314020688089767?.019990677612126993:-.035520772730423776:e[153]>1e-35?e[2]>.8958797346140276?-.006946377120973384:e[0]>1e-35?e[8]>1e-35?e[5]>5.692045796563381?.04230611914121616:-.1152833284663223:.03987788751961305:-.02748865099804465:e[46]>1e-35?e[18]>1e-35?.047655531405650486:-.022707509947190632:e[18]>1e-35?e[3]>.8958797346140276?e[31]>1e-35?.1425984397283696:e[143]>1e-35?.05597721538261218:-.02117927246804007:.011077153043550766:e[143]>1e-35?-.0158979963012007:e[187]>1e-35?e[30]>1e-35?.02515771028113912:-.019084229614362958:e[49]>1e-35?e[1]>1e-35?.014623537050735559:-.05320125987679328:e[58]>1e-35?e[3]>3.1132683346437333?.021421346835282216:-.03287702034784505:e[16]>1e-35?.008645735809593434:e[3]>4.993822430271426?-.01889537207927676:.00131546333396141:e[153]>1e-35?-.09822789507794744:-.010292962989428067,Te=e[11]>1e-35?e[156]>1e-35?e[4]>3.1132683346437333?-.009153166060719259:-.035386636811765286:e[58]>1e-35?-.03881024236774208:e[153]>1e-35?e[7]>.12645023619128054?-.01286680669029116:-.0573874491021103:e[3]>3.276966702012906?e[38]>1e-35?-.03084033316462023:-.00517175216868761:e[195]>1e-35?.01773824295809578:e[131]>1e-35?-.17828043850421407:.0005554487984838318:e[7]>.14547530463198097?e[105]>1e-35?-.018589129226123456:e[116]>1e-35?-.0227108777687536:e[24]>1e-35?.009520152980411787:e[135]>1e-35?-.004364970908897872:e[0]>1e-35?e[18]>1e-35?-.015737703364129243:.003711277180349787:e[12]>1e-35?e[4]>3.540854293052788?e[155]>1e-35?.04655165952772795:.009321761971665682:e[210]>1e-35?.018839890489201528:e[129]>1e-35?-.03111680952187252:.0002649813454447912:e[23]>1e-35?.014110539528977999:e[109]>1e-35?.014168740682742625:-.0008607565404007093:e[3]>2.3502401828962087?e[9]>1e-35?e[4]>3.3842466058243152?-.004252607769147212:.02017003996344357:e[16]>1e-35?.01594899805169211:-.006372071796745688:e[12]>1e-35?-.0251011457777017:e[121]>1e-35?-.07822588279288774:-.005026529762858,Se=e[7]>.8375851232899904?e[155]>1e-35?e[3]>1.2424533248940002?.014982109981371684:-.08302064203662592:e[3]>2.602003343538398?e[125]>1e-35?-.02862612402789537:-.0004831913476108919:e[42]>1e-35?-.08030278175390543:e[90]>1e-35?-.11931838045625616:.003328726909052652:e[125]>1e-35?e[3]>1e-35?-.03347653784336098:.0381767649776156:e[3]>2.4414009612931857?e[3]>3.1132683346437333?e[137]>1e-35?.04078434374172937:e[130]>1e-35?.04811471469938318:e[152]>1e-35?.012079515899716571:e[23]>1e-35?.017817807971301534:e[122]>1e-35?.049338146544587284:e[115]>1e-35?.026905923036994708:e[10]>1e-35?-.008135082370740723:e[89]>1e-35?.023584069012120446:e[95]>1e-35?.013988944683250695:-.002584756192745314:e[139]>1e-35?-.04454469703180858:e[99]>1e-35?e[3]>2.524928003624769?.010620580427538877:.047779724434429495:e[131]>1e-35?-.08155143867377633:.0031488702256745843:e[7]>.06275229375044648?e[99]>1e-35?.016956254821045937:e[90]>1e-35?-.11685880917620971:e[210]>1e-35?e[11]>1e-35?-.040607887814632475:-.006287900824728332:-.0018997472673294537:e[14]>1e-35?.02358706984105576:-.01737075534918072,xe=e[6]>1e-35?e[2]>5.4049245766661995?e[5]>6.441743353550561?e[29]>1e-35?e[4]>2.673553765358735?-.007517267159018327:-.02379463821120899:-.0026543290628044274:e[8]>1e-35?-.022865480180725452:.009005117181880752:e[6]>5.161920636569023?e[0]>1e-35?e[2]>.8958797346140276?e[2]>2.012675845367575?e[3]>2.3502401828962087?.0021573820428423146:-.0046125093600082965:e[3]>3.314020688089767?-.005566488595229649:e[6]>6.288787065535392?.012796965207082116:-.0023971957228440767:e[3]>2.249904835165133?e[2]>1e-35?-.0003832411399288501:e[1]>1e-35?-.03148874544425103:-.3158553329522586:e[2]>1e-35?.025981575700247922:.052944809618023905:e[6]>8.681774988134558?e[3]>2.970085626360216?-.0005280655103032829:-.009402467452152188:e[2]>.8958797346140276?.0018798828715775142:e[3]>1.7005986908310777?-.0002583719758369029:-.014467497542301198:e[128]>1e-35?-.03075061856353219:e[3]>3.0201273556387074?e[8]>1e-35?-.03107874404542307:-.0063178690978266385:e[113]>1e-35?e[24]>1e-35?.10168122236339333:.0027676566086997536:e[100]>1e-35?e[3]>1.4978661367769956?-.019182725682091863:e[3]>1.2424533248940002?.10007959215270637:-.049901874168813753:e[12]>1e-35?-.008354674563617942:.000556773623388255:-.06338083699889271,ke=e[14]>1e-35?e[5]>7.841296344941067?e[217]>1e-35?-.03452197748259044:e[141]>1e-35?-.05526745933972476:.003096257901065188:.013468654879205778:e[90]>1e-35?-.04633994478668718:e[7]>.04507521918085865?e[39]>1e-35?-.011427282692256308:e[188]>1e-35?-.11824461537515621:e[17]>1e-35?e[5]>3.276966702012906?.009014346731620665:-.10784986305366669:e[102]>1e-35?.014356846380168074:e[109]>1e-35?.0100955463134877:e[31]>1e-35?.025672511171270042:e[127]>1e-35?-.10904631172619624:e[19]>1e-35?.007015456473363717:e[60]>1e-35?-.02409044800892067:e[217]>1e-35?e[7]>.9914949911911836?.02334115299069277:e[1]>1e-35?-29013080593250377e-21:.014307421165143329:e[1]>1e-35?e[42]>1e-35?-.06673983904970003:e[37]>1e-35?-.05636396687178933:e[32]>1e-35?-.042854874962508754:e[140]>1e-35?-.014546243613252019:e[119]>1e-35?.02592806792359847:.0008331579108247542:e[12]>1e-35?.004348565717870661:e[195]>1e-35?-.016064193157584304:e[210]>1e-35?-.01896835246692864:e[122]>1e-35?.06415669138405272:e[219]>1e-35?-.03191239858069586:-.0022170295258555585:-.00965022020696389,Ie=e[55]>1e-35?-.04649484416236924:e[6]>1e-35?e[35]>1e-35?-.04814595674860986:e[173]>1e-35?-.030965289355370126:e[190]>1e-35?-.01892908615035444:e[50]>1e-35?-.03023310323845746:e[14]>1e-35?e[134]>1e-35?.029102388421738776:e[217]>1e-35?-.021829759931582565:.005209049556942947:e[90]>1e-35?e[3]>3.276966702012906?.007482519637019732:e[28]>1e-35?.08823476156200263:-.1134870648564767:e[17]>1e-35?e[5]>3.156774023138548?e[3]>2.861792550976191?e[134]>1e-35?.037573808092493166:-.008120569804875069:.015185866424900767:-.10150107137017012:e[39]>1e-35?-.011108691883331833:e[4]>2.4414009612931857?e[123]>1e-35?-.019406534412652932:e[22]>1e-35?-.011646225036274034:e[118]>1e-35?e[1]>1e-35?.007977856608752276:-.038946271309380914:.0009257226566265858:e[101]>1e-35?e[6]>5.769881059461895?-.06484570063989317:.016294764421436982:e[29]>1e-35?e[204]>1e-35?e[5]>5.859359688974663?.036329398743295674:-.20474934656494398:e[4]>1.7005986908310777?-.0005630875641286038:e[5]>3.5694334999727624?e[19]>1e-35?.03322386202318951:-.01687696637036405:-.10533305728771972:-.0004901077590279651:-.05758869249681345,Ae=e[57]>1e-35?-.043478488738181505:e[53]>1e-35?-.05188532777589009:e[11]>1e-35?e[156]>1e-35?-.01733439245316815:e[58]>1e-35?-.03508850349398082:e[134]>1e-35?e[38]>1e-35?e[3]>3.156774023138548?-.02641618586067251:.0053883499998111746:-.04111067521339709:e[46]>1e-35?-.03960880739147387:e[56]>1e-35?.02833430038101972:e[3]>4.548585836935273?-.028156779064728323:-.0006287807275955149:e[105]>1e-35?-.018589321466431944:e[187]>1e-35?e[30]>1e-35?.021938681282791916:-.016917430307970042:e[7]>.015258684697466883?e[132]>1e-35?.026815659384164206:e[204]>1e-35?e[7]>.992067132663463?-.010565408217521758:e[7]>.9738681190948303?e[9]>1e-35?e[30]>1e-35?.09345774314045512:-.003460687191126055:.009778848673591349:.006207652194161698:e[134]>1e-35?e[14]>1e-35?.026940863472122597:.004032635910042969:e[16]>1e-35?e[156]>1e-35?-.014571620220052964:e[219]>1e-35?.03394257525872151:e[189]>1e-35?-.16441255476933125:.006890416623408193:e[7]>.5866799179067689?e[156]>1e-35?e[9]>1e-35?-.002374233797129139:.015343494638416642:.0007085956801478842:-.0014226167854637043:-.014931890774210171,Pe=e[52]>1e-35?-.040552145534119004:e[88]>1e-35?-.11616238297789526:e[147]>1e-35?e[21]>1e-35?.08405882357263977:-.028120036866471673:e[89]>1e-35?.013417411709807947:e[138]>1e-35?e[25]>1e-35?-.03104795267483152:e[8]>1e-35?-.013793892541819341:.007067793368543704:e[3]>4.212100162283537?e[37]>1e-35?-.04169781427571004:e[59]>1e-35?.039366779099462186:e[190]>1e-35?-.0746572875957972:-.0046665287028623895:e[31]>1e-35?e[3]>3.3497501700808394?-.015043885860062665:.04427790295514171:e[127]>1e-35?-.09222397003880911:e[188]>1e-35?-.11791399942046604:e[116]>1e-35?-.022670774074606673:e[21]>1e-35?e[118]>1e-35?-.08590814127371893:-.009079159755287763:e[10]>1e-35?e[153]>1e-35?e[7]>.12025037553499339?-.010834658570263708:-.06942979142484561:e[59]>1e-35?-.0368654965105411:e[186]>1e-35?-.13585047638050318:-.001475385731000911:e[11]>1e-35?e[47]>1e-35?-.07021793045868131:e[58]>1e-35?-.03264322466138671:e[153]>1e-35?e[7]>.4982752029697964?-.000719771928860618:-.02550581685370434:-.001300530189452872:e[216]>1e-35?-.04553949138490546:.0013445292966782988,Re=e[152]>1e-35?.005642349825665321:e[108]>1e-35?e[1]>1e-35?.012759171568581189:-.0015650437871311187:e[102]>1e-35?.012533880283367552:e[10]>1e-35?e[4]>1.4978661367769956?e[7]>.9888588760569341?.007453521083396632:-.0036225862281260785:e[3]>.8958797346140276?-.0027177080775155366:e[5]>5.782284349061034?-.04454373321655838:.021964247026786614:e[11]>1e-35?e[47]>1e-35?-.06196070580382676:e[121]>1e-35?e[1]>1e-35?-.06122312462911518:e[7]>.3847172300624272?.03518239795956787:e[3]>2.4414009612931857?.006811972713764457:-.0933556055347465:e[5]>4.938058177869999?-.004012086267764631:.01930669434547199:e[5]>6.0051201133541365?e[27]>1e-35?-.012304580143719986:.0013650712455989071:e[3]>2.802901033147999?-.0083470520183599:e[7]>.5811983411966435?e[7]>.990877425524446?e[219]>1e-35?e[3]>1e-35?.06211865200552023:e[17]>1e-35?.06775644666502018:-.06866304616688222:e[217]>1e-35?.059656960273077646:-.004328630560280456:e[204]>1e-35?e[4]>2.249904835165133?.006371564018556469:e[3]>2.138333059508028?.09486061534469152:-.09409330595635478:e[4]>2.602003343538398?.011308844028341723:e[100]>1e-35?.0439316487073224:-.003403233436702135:-.00960652384005499,Ne=e[144]>1e-35?e[18]>1e-35?.07197995497453837:e[1]>1e-35?-.001274320993832369:-.040032546534329444:e[52]>1e-35?e[18]>1e-35?.09098124993319018:-.04537404774072243:e[40]>1e-35?-.02515534903180516:e[53]>1e-35?-.04736675675905027:e[178]>1e-35?-.021374380471858013:e[55]>1e-35?-.04240162360893064:e[51]>1e-35?e[18]>1e-35?.07999652271774131:-.036649228565504045:e[109]>1e-35?.009067075019741765:e[54]>1e-35?e[1]>1e-35?.019160818735605257:-.05967997790089002:e[35]>1e-35?-.043420689526233285:e[173]>1e-35?-.027561163630755333:e[190]>1e-35?-.016370101115869642:e[14]>1e-35?e[217]>1e-35?-.019735056448517897:e[141]>1e-35?-.028090004807030017:.006865378253320941:e[139]>1e-35?e[1]>1e-35?-.032389864623829076:.005458607214221278:e[60]>1e-35?-.019089857559617188:e[153]>1e-35?e[18]>1e-35?.015189336996079859:e[19]>1e-35?.013745154147527805:e[1]>1e-35?-.005284271350108698:-.0374184512092477:e[18]>1e-35?e[99]>1e-35?-.0595395395199616:e[100]>1e-35?-.09991342902311327:-.0042488091801234805:.0006682804828197052,Oe=e[46]>1e-35?-.012191380765172536:e[88]>1e-35?-.10266216005056819:e[91]>1e-35?-.018445844031974568:e[50]>1e-35?-.027431707051961525:e[144]>1e-35?e[7]>.9945060383544003?.03614842925379388:-.02095650990295711:e[4]>2.4414009612931857?e[123]>1e-35?e[3]>3.0201273556387074?-.01053451990903616:-.05114195197878968:e[16]>1e-35?.007316468830803533:e[9]>1e-35?.003316750172048933:860911526134492e-20:e[141]>1e-35?e[3]>1e-35?-.02547358042212171:.019472890771357998:e[186]>1e-35?-.09288424685816356:e[41]>1e-35?-.1310231930206974:e[42]>1e-35?-.056216247465863484:e[29]>1e-35?e[5]>3.5694334999727624?e[134]>1e-35?-.054747915129536466:e[1]>1e-35?e[131]>1e-35?-.16815706432319097:-.002818043413853223:-.041951940639575136:e[7]>.960816451500545?e[219]>1e-35?.10052885656939581:-.11599835225683999:.029922858316313545:e[101]>1e-35?e[5]>7.429817490674132?-.06576516230122952:-.0008540865426696243:e[210]>1e-35?e[114]>1e-35?.013062456952379193:e[7]>.7267616382562012?.0022613700798703854:-.03938763940013096:e[59]>1e-35?e[12]>1e-35?.008501036224046256:-.06542467236134167:.002585754319607976,De=e[28]>1e-35?.008779900390406317:e[7]>.9880960409521241?e[8]>1e-35?-.008991654120695218:e[3]>1e-35?e[140]>1e-35?-.02731072195122447:.002008744895602654:e[217]>1e-35?.02359361264236281:.007024522001417586:e[2]>2.138333059508028?e[3]>2.4414009612931857?e[125]>1e-35?-.04199133736767654:e[47]>1e-35?-.027561033349225085:e[3]>4.085941003063911?e[12]>1e-35?.007807873722550442:e[152]>1e-35?.030689318204494505:e[137]>1e-35?.06699720359975746:-.010441301216813357:e[118]>1e-35?-.03153852460438172:e[48]>1e-35?-.03440026517387997:.0015296602873888215:e[0]>1e-35?e[2]>6.607325405747152?-.027110120892630915:e[153]>1e-35?-.017016088064422574:-.005723165911539293:e[187]>1e-35?-.031718114891806884:-.0005272212291525389:e[0]>1e-35?e[2]>.8958797346140276?e[46]>1e-35?-.09171631422683799:.003327268948098216:e[3]>2.3502401828962087?e[125]>1e-35?-.5887915327321841:e[2]>1e-35?-.006637502258168407:-.08424468641004934:e[125]>1e-35?-.06617256968162606:.028846174454930092:e[2]>1.2424533248940002?e[15]>1e-35?-.016616715415331784:.002680237807803091:e[3]>1e-35?-.0012589163812412535:-.015154395987664649,Le=e[6]>9.286096980078398?e[4]>2.970085626360216?-.001155963563974424:-.011949331884445141:e[6]>6.3071868642287745?e[2]>5.150393035655617?-.0033183579364470086:e[11]>1e-35?-.0018887492076874403:e[169]>1e-35?-.09486398911649394:.0025252552927441433:e[4]>3.0677824455408698?e[7]>.09963982551990838?e[141]>1e-35?e[6]>3.314020688089767?.012137569190879735:.09584425242224671:e[8]>1e-35?e[7]>.987306237235768?e[2]>.8958797346140276?-.020817404206469048:-.06464699261956137:-.008121005894366425:-.002273798477153842:e[4]>3.5114340430413216?-.024199637055494112:-.0044500308011184275:e[12]>1e-35?-.00483411782477681:e[5]>3.156774023138548?e[8]>1e-35?e[5]>3.772694874805912?e[6]>3.795426061844291?.0013628724281773107:-.04205266437322089:e[141]>1e-35?e[4]>2.861792550976191?e[5]>3.417592293073651?-.15445392240959782:e[2]>2.970085626360216?-.5683130345409004:-1.2639522532467855:-.12861577169349267:-.08527127841498366:e[4]>2.4414009612931857?e[7]>.29163353806150266?.003881870206848933:.01474849027472377:e[18]>1e-35?e[219]>1e-35?-.07387984252991263:-.013089382916580447:-.0008129634296833813:e[3]>2.3502401828962087?e[2]>3.1132683346437333?.019943967048858428:-.04278248600927625:e[17]>1e-35?-.11809979934412335:.03777084692378827,Me=e[57]>1e-35?-.03805766278012468:e[6]>9.286096980078398?e[2]>3.725620842493839?-.010152097691926694:-.000726856757223527:e[25]>1e-35?e[4]>2.917405368531303?e[6]>4.226807104886684?e[5]>8.866229029069968?.016965184252348844:-.027524673351863413:-.09999982742666325:e[219]>1e-35?-.11642840619184194:e[6]>3.1984648276080736?.02202934385365115:-.0758508504188626:e[17]>1e-35?e[5]>3.276966702012906?e[3]>2.861792550976191?e[38]>1e-35?.03529859841404316:-.005442656204983076:.013832633319757828:-.07099090377505678:e[40]>1e-35?e[12]>1e-35?.020780509349314687:-.0412229778697227:e[178]>1e-35?e[6]>4.832297822126891?-.012751356404573045:-.07365946414911166:e[6]>1e-35?e[91]>1e-35?-.018973855754862178:e[31]>1e-35?e[3]>3.3497501700808394?-.019342018507399077:.04336755184633714:e[52]>1e-35?-.034601279556920723:e[53]>1e-35?-.04570921257037347:e[4]>2.4414009612931857?e[22]>1e-35?-.009909029766665835:e[88]>1e-35?-.13759996623650647:.0010774168904012999:e[90]>1e-35?-.09942790916464699:e[5]>8.17933999189099?-.006237804261380787:e[154]>1e-35?-.02869365685254793:e[41]>1e-35?-.11951308633255478:.0005720279396045617:-.05091927304878396,Be=e[2]>8.18910569469239?-.011281718118735835:e[2]>8.136957041085973?.007639929297282146:e[2]>6.178980383851587?-.006867711027875817:e[6]>4.5379471377116305?e[125]>1e-35?e[3]>1e-35?-.026657037414316055:.03822052894720058:e[89]>1e-35?.01442240494610187:.0005482931472826037:e[3]>2.970085626360216?e[8]>1e-35?-.04157937378268839:e[25]>1e-35?-.07438346384769444:-.007688780027797844:e[113]>1e-35?e[24]>1e-35?.10208422768618285:-.0025376848550412623:e[24]>1e-35?e[209]>1e-35?e[7]>.9738681190948303?-.18081467351794253:.06403272706376394:-.006045919721112658:e[100]>1e-35?e[3]>1.4978661367769956?-.034372452343283254:e[3]>1.2424533248940002?.10087241747333926:-.06270133551905664:e[12]>1e-35?e[209]>1e-35?.02872327658284419:-.012940407270969699:e[5]>3.276966702012906?e[8]>1e-35?-.02165149142042258:e[3]>2.249904835165133?.011522668417532612:-.005129494488342788:e[3]>2.3502401828962087?e[2]>3.1132683346437333?.018894357520732635:-.03443967069634786:e[19]>1e-35?e[0]>1e-35?.0868126244943877:e[2]>1.4978661367769956?e[194]>1e-35?-.16834554324370338:.08799302490518951:.007907573815540844:e[17]>1e-35?-.07843101628051594:.04322926522720053,Fe=e[7]>.987306237235768?e[8]>1e-35?e[5]>6.285066127789834?6536595256810364e-20:e[153]>1e-35?-.07687008855803332:-.015088524832702519:e[18]>1e-35?-.012556097563484098:e[217]>1e-35?e[5]>8.28387302567733?-.004574660978375117:.02566519458840368:.003837771337656032:e[28]>1e-35?e[194]>1e-35?e[29]>1e-35?e[5]>3.979637980058199?.04675774128546983:-.16922871147253024:e[5]>5.821564412917691?.017788548280824237:.101599048954043:e[5]>4.424828703319957?.009470487487627452:-.046977132290520585:e[95]>1e-35?.008579165333164537:e[204]>1e-35?e[7]>.9782662069407232?e[9]>1e-35?.0717824359443052:.01776258010455891:.003970948558978321:e[208]>1e-35?e[1]>1e-35?.012428835257375037:e[18]>1e-35?-.08152843296689005:-.0059907248803252305:e[109]>1e-35?.008117980905290326:e[89]>1e-35?e[1]>1e-35?-.08097766993639294:.014258345453663996:e[62]>1e-35?.025185598552042956:e[213]>1e-35?.01261362855232781:e[138]>1e-35?e[1]>1e-35?e[29]>1e-35?.004355449069502461:-.03327693117307522:e[29]>1e-35?-.024228224306581475:e[5]>5.244385543610066?.01690188327986934:-.02426164440751183:-.0016932467092565535,je=e[116]>1e-35?-.018106356667092538:e[24]>1e-35?e[113]>1e-35?e[5]>4.658699722134796?-.0289267666661116:.10225466717059267:e[5]>3.979637980058199?.007715497036238576:e[209]>1e-35?-.1596622066794057:-.02153459011172981:e[46]>1e-35?e[18]>1e-35?.044010040060630896:-.018791912393741998:e[39]>1e-35?-.008648992983623099:e[3]>4.993822430271426?-.01442291433054286:e[158]>1e-35?.023944934429097977:e[21]>1e-35?-.008731676115726167:e[51]>1e-35?e[18]>1e-35?.07015276907667169:-.03981801316250594:e[152]>1e-35?e[12]>1e-35?e[7]>.9811887196001154?.025342984951627335:e[56]>1e-35?-.039652717595259894:-.003499774006708361:e[4]>3.676220550121792?.026612369959601385:e[0]>1e-35?e[2]>2.012675845367575?.012259156005894655:.04466570041636591:.002369030228609974:e[50]>1e-35?-.02625338435100237:e[198]>1e-35?e[5]>3.156774023138548?e[4]>2.602003343538398?.004706524615587467:.03172381727140614:-.08877100979833137:e[19]>1e-35?e[156]>1e-35?.047690620764284854:.004980692597287184:e[188]>1e-35?-.10330323519600788:e[108]>1e-35?.006389080836282864:e[217]>1e-35?.0034861135133741716:-.0005184951270632008,Ue=e[150]>1e-35?-.03083355660591381:e[6]>8.681774988134558?e[0]>1e-35?.0032708551521722813:e[3]>2.970085626360216?-.0008773771112515323:-.008194765714031488:e[1]>1e-35?e[42]>1e-35?-.0544661644610188:e[114]>1e-35?.014743200719322279:e[25]>1e-35?-.03415156332118204:e[121]>1e-35?e[0]>1e-35?-.012241568524042012:-.08332027167107449:e[119]>1e-35?.02487058944439717:e[210]>1e-35?e[4]>2.602003343538398?.003409540133128587:e[7]>.985694415330804?.014360134818665793:-.029939754177999198:e[140]>1e-35?e[30]>1e-35?-.07017324311241228:-.00954038893956995:e[32]>1e-35?-.0321895511220355:.0018389054792352236:e[3]>.8958797346140276?e[138]>1e-35?.014210083256713822:e[3]>2.970085626360216?e[56]>1e-35?.03179391063657913:e[132]>1e-35?.044860161753142676:e[122]>1e-35?.056053352587009365:e[44]>1e-35?.011126140459263092:e[217]>1e-35?.015177735064648389:e[30]>1e-35?.00292550151642784:e[0]>1e-35?-.01370614277688821:-.00467240699644943:e[30]>1e-35?e[17]>1e-35?.06455607454604466:-.018525791968354337:e[127]>1e-35?.058525937257934674:.004550050432870272:-.024273015893662056,$e=e[57]>1e-35?-.03433295479723807:e[35]>1e-35?-.039185287251387806:e[2]>8.18910569469239?-.01005594457537474:e[2]>8.136957041085973?.006899889609485921:e[2]>5.6542404955442525?e[156]>1e-35?-.021428903659715646:-.003794036359277691:e[6]>4.3882378946731615?e[125]>1e-35?-.012625422706971806:e[0]>1e-35?e[2]>.8958797346140276?e[32]>1e-35?.024078606665492636:e[6]>6.9309832857755405?e[2]>2.012675845367575?.00015676395930232578:.008324926956588046:-.0031526636810443134:e[156]>1e-35?.053603289446623514:e[6]>5.912149824839399?.022861200347258755:e[128]>1e-35?e[9]>1e-35?-.44322676747225076:-.07989645752877887:.005736631305989689:e[6]>9.286096980078398?-.005302861539231229:e[133]>1e-35?-.011410750972764748:e[2]>1e-35?e[139]>1e-35?-.01695599188677891:e[12]>1e-35?e[129]>1e-35?-.029257180272820173:e[106]>1e-35?.03593102425808264:e[59]>1e-35?.03336711951593411:e[114]>1e-35?.021293721644930708:.0031644417228525465:e[140]>1e-35?e[2]>2.802901033147999?.005338088459754211:-.018863893195455395:e[59]>1e-35?e[20]>1e-35?-.2145461556048109:-.013833058686928565:.0010745795613665528:-.003974960846380726:-.004018386137909663,qe=e[55]>1e-35?-.038436881673730244:e[49]>1e-35?e[1]>1e-35?.013340924551504776:-.04038081752369706:e[135]>1e-35?e[17]>1e-35?.02160784630817418:e[6]>4.722943345003718?e[2]>3.9981586158983733?-.012347824466576033:-.000545766507983511:e[4]>3.0201273556387074?e[2]>1e-35?-.0252070573488502:-.13173630032620282:.009893647988200364:e[6]>1e-35?e[73]>1e-35?-.05384174968342247:e[52]>1e-35?e[1]>1e-35?.02326718288961822:-.04799167043714381:e[7]>.8453853180651066?e[4]>3.481121732133104?e[12]>1e-35?e[59]>1e-35?.061286381265316374:e[3]>3.481121732133104?.005424469650470853:e[6]>4.310776603370241?.014609485744972962:.06126754321077295:e[156]>1e-35?e[2]>8.898092196194755?-.2427431056579565:.018014774163852717:.0018695162213364096:e[61]>1e-35?-.07802947082997094:e[45]>1e-35?-.024426413301391545:e[140]>1e-35?e[4]>.8958797346140276?-.021126260874271455:e[6]>4.03420147928485?-.08415757514826445:e[3]>1e-35?.10708927158160722:-.24178647896179492:.0008522369825914582:e[218]>1e-35?.02373187641553724:e[57]>1e-35?-.04729470896114382:e[6]>4.135134555718313?-.00014270136560779048:-.007024429214918294:-.08338039048086893,He=e[72]>1e-35?.056415744834310104:e[102]>1e-35?.010312560108512227:e[109]>1e-35?.007457767681676636:e[208]>1e-35?e[4]>3.0677824455408698?e[18]>1e-35?-.06595581480202953:.0010087955639505731:.010976237400105874:e[4]>2.4414009612931857?e[123]>1e-35?e[2]>4.5900436644025815?-.05474288807524913:-.010369052951168002:e[47]>1e-35?e[18]>1e-35?.06670108938458437:e[20]>1e-35?.08555144132474565:-.021968528557862133:e[48]>1e-35?e[18]>1e-35?.06392608504748652:-.02321056177872842:e[54]>1e-35?-.03592967725793262:e[6]>5.519456907163478?.0008682946366782881:e[133]>1e-35?-.029370515479889298:e[4]>3.0201273556387074?-.004567764283497172:e[12]>1e-35?-.008355751724201374:e[113]>1e-35?.04158028065835193:.005544170962219649:e[141]>1e-35?-.01706283616408152:e[186]>1e-35?-.08075713781164345:e[196]>1e-35?e[4]>2.012675845367575?-.004591551989937031:e[4]>.8958797346140276?e[18]>1e-35?-.1239344826496822:.026355647530608275:-.07955511774996737:e[41]>1e-35?-.10181506412232362:e[42]>1e-35?-.0453542732395041:e[116]>1e-35?-.040407946567398226:e[158]>1e-35?.027239009428531448:-.002118967070037752,Ve=e[174]>1e-35?-.02339144841300339:e[173]>1e-35?-.02466576607302462:e[60]>1e-35?-.014400177078045:e[187]>1e-35?-.009580909976967153:e[6]>8.681774988134558?-.0018832004566674773:e[1]>1e-35?e[42]>1e-35?e[10]>1e-35?-.13287881120130746:-.03759084751116859:e[25]>1e-35?-.029737667621816583:e[119]>1e-35?.022639692376110337:e[98]>1e-35?.014991063146855506:e[195]>1e-35?e[6]>3.417592293073651?.008961268500787772:-.023240187732927162:e[61]>1e-35?e[7]>.428769371249852?-.08413653233956772:.0010489731231787087:e[140]>1e-35?e[3]>.8958797346140276?e[5]>4.855921334140645?e[44]>1e-35?-.009299863216357543:-.0613782065666655:-.06705655672927394:e[5]>3.772694874805912?.0008635593500817348:.08361268069705163:.001087642897550713:e[98]>1e-35?-.021712258264119783:e[3]>.8958797346140276?e[105]>1e-35?-.039681509263849626:e[195]>1e-35?e[18]>1e-35?-.07079074829049314:-.008109353986158243:e[210]>1e-35?e[18]>1e-35?-.10610285355896108:-.009292320249100847:e[157]>1e-35?.03507595269407085:e[97]>1e-35?.0249669535461336:e[48]>1e-35?-.027595291123779366:.0011643902717306173:-.0211420439263067,ze=e[138]>1e-35?e[1]>1e-35?e[42]>1e-35?e[3]>3.5114340430413216?-.022448598781455772:-.07031164685918086:e[2]>1e-35?e[2]>2.740319461670996?.00894455632762117:-.003454709734759444:e[0]>1e-35?.060858110677215166:-.03435493609374257:e[3]>2.602003343538398?e[2]>.8958797346140276?.0168978378983998:-.009237748165804088:-.016931758267026403:e[3]>4.424828703319957?-.005659352703826067:e[24]>1e-35?e[113]>1e-35?e[6]>4.460127707454046?-.023722482692479133:.10064484300766507:e[6]>4.03420147928485?.007526717802235146:e[209]>1e-35?e[4]>2.970085626360216?.11711852031495243:-.15067622815741855:-.011085192149895408:e[108]>1e-35?.0059255171206349135:e[19]>1e-35?e[156]>1e-35?.04454460743043898:e[37]>1e-35?-.14161163738926447:e[4]>1.4978661367769956?e[4]>1.7005986908310777?e[217]>1e-35?-.020705364221039385:.006460529078997639:e[0]>1e-35?e[98]>1e-35?.10347448218504114:-.04090123141769794:e[6]>5.636572136251498?-.001212671493834005:e[2]>1.8688348091416842?-.15821279618670178:-.03563734739460456:.027924859655082585:e[57]>1e-35?-.03743904649648422:e[35]>1e-35?-.0414066369468363:e[46]>1e-35?-.011240341460759123:-.0003091959047563666,Ke=e[14]>1e-35?e[5]>7.841296344941067?e[141]>1e-35?-.04382809259971909:e[217]>1e-35?e[4]>3.417592293073651?-.05008164665262682:.0007032387608254502:e[190]>1e-35?-.19371592847895003:.0017489801221668277:e[129]>1e-35?-.24591656603456258:.011026730387591234:e[72]>1e-35?.05658163433406649:e[90]>1e-35?e[4]>3.5114340430413216?.017141361021852975:e[28]>1e-35?.07243997319099477:-.08677988948169385:e[138]>1e-35?.0038201430289573884:e[23]>1e-35?e[4]>2.917405368531303?.014990462643385919:-.013592080985068531:e[217]>1e-35?e[4]>1.8688348091416842?.0022421195021632245:e[4]>1.2424533248940002?.03891295508085918:e[4]>.8958797346140276?-.08902318396862074:.02476911275463073:e[2]>3.1132683346437333?e[29]>1e-35?e[19]>1e-35?.023731839695418987:e[5]>7.366761104104307?e[4]>3.417592293073651?e[6]>6.633975895571033?e[8]>1e-35?.016171629088047517:e[134]>1e-35?.03196373735768742:-.006820341969572339:-.02712238491085242:-.016309188486296804:-.0019386576944297078:e[156]>1e-35?-.03079416196682616:e[123]>1e-35?-.020888866054988395:e[4]>3.238486181444842?-.0027078359220281674:e[141]>1e-35?-.029581214969996845:.002299670778244013:.0001804027795430786;const We=function(e){if(e<0){const t=Math.exp(e);return t/(1+t)}return 1/(1+Math.exp(-e))}(t+r+n+i+o+s+a+c+l+u+d+p+h+f+g+m+y+v+_+b+w+C+E+T+S+x+k+I+A+P+R+N+O+D+L+M+B+F+j+U+$+q+H+V+z+K+W+G+Q+Y+J+X+Z+ee+te+re+ne+ie+oe+se+ae+ce+le+ue+de+pe+he+fe+ge+me+ye+ve+_e+be+we+Ce+Ee+Te+Se+xe+ke+Ie+Ae+Pe+Re+Ne+Oe+De+Le+Me+Be+Fe+je+Ue+$e+qe+He+Ve+ze+Ke);return[1-We,We]}},63993:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.completionsFromGhostTextResults=void 0;const n=r(7057),i=r(52369),o=r(40702),s=r(35034);t.completionsFromGhostTextResults=function(e,t,r,a,c,l,u){const d=e.get(i.LocationFactory),p=a.lineAt(c);let h=t.map((e=>{let t,i="";if(l&&(e.completion=(0,s.normalizeIndentCharacter)(l,e.completion,p.isEmptyOrWhitespace)),e.completion.displayNeedsWsOffset&&p.isEmptyOrWhitespace)t=d.range(d.position(c.line,0),c),i=e.completion.completionText;else if(p.isEmptyOrWhitespace&&e.completion.completionText.startsWith(p.text))t=d.range(d.position(c.line,0),c),i=e.completion.completionText;else{const r=a.getWordRangeAtPosition(c);if(e.isMiddleOfTheLine){const r=a.lineAt(c),n=d.range(d.position(c.line,0),c),o=a.getText(n);t=e.coversSuffix?r.range:n,i=o+e.completion.displayText}else if(r){const n=a.getText(r);t=d.range(r.start,c),i=n+e.completion.completionText}else{const r=d.range(d.position(c.line,0),c);t=r,i=a.getText(r)+e.completion.displayText}}return{uuid:(0,n.v4)(),text:i,range:t,file:a.uri,index:e.completion.completionIndex,telemetry:e.telemetry,displayText:e.completion.displayText,position:c,offset:a.offsetAt(c),resultType:r}}));if(r===o.ResultType.TypingAsSuggested&&void 0!==u){const e=h.find((e=>e.index===u));if(e){const t=h.filter((e=>e.index!==u));h=[e,...t]}}return h}},54619:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDebounceLimit=t.GhostTextDebounceManager=void 0;const n=r(16905);class i{constructor(e){this.forceDelayMs=e,this.extraDebounceMs=0}}t.GhostTextDebounceManager=i,t.getDebounceLimit=async function(e,t){let r;if(await e.get(n.Features).debouncePredict()&&t.measurements.contextualFilterScore){const e=t.measurements.contextualFilterScore,n=.3475,i=7;r=25+250/(1+Math.pow(e/n,i))}else r=await e.get(n.Features).debounceMs();return(r>0?r:75)+e.get(i).extraDebounceMs}},40702:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getGhostText=t.completionCache=t.ResultType=t.ghostTextLogger=void 0;const n=r(44617),i=r(76679),o=r(7057),s=r(70140),a=r(83940),c=r(11661),l=r(39800),u=r(70769),d=r(16905),p=r(5798),h=r(20039),f=r(47553),g=r(52031),m=r(598),y=r(86635),v=r(47917),_=r(24090),b=r(3591),w=r(71153),C=r(3883),E=r(65489),T=r(20913),S=r(52369),x=r(96817),k=r(54619),I=r(41749);var A;let P,R,N;async function O(e,r,n,i,o,s,a){t.ghostTextLogger.debug(e,`Getting ${s} from network`),n=n.extendedBy();const c=await async function(e,t){const r=await e.get(d.Features).overrideNumGhostCompletions();return r?t.isCycling?Math.max(0,3-r):r:(0,l.shouldDoParsingTrimming)(t.blockMode)&&t.multiline?(0,l.getConfig)(e,l.ConfigKey.InlineSuggestCount):t.isCycling?2:1}(e,r),p=(0,m.getTemperatureForSamples)(e,c),f={stream:!0,n:c,temperature:p,extra:{language:r.languageId,next_indent:r.indentation.next??0,trim_by_indentation:(0,l.shouldDoServerTrimming)(r.blockMode)}};r.multiline||(f.stop=["\n"]),r.multiline&&r.multiLogitBias&&(f.logit_bias={50256:-100});const y=Date.now(),v={endpoint:"completions",uiKind:g.CopilotUiKind.GhostText,isCycling:JSON.stringify(r.isCycling),temperature:JSON.stringify(p),n:JSON.stringify(c),stop:JSON.stringify(f.stop)??"unset",logit_bias:JSON.stringify(f.logit_bias??null)},_=(0,E.telemetrizePromptLength)(r.prompt);Object.assign(n.properties,v),Object.assign(n.measurements,_);try{const s={prompt:r.prompt,languageId:r.languageId,repoInfo:r.repoInfo,ourRequestId:r.ourRequestId,engineUrl:r.engineURL,count:c,uiKind:g.CopilotUiKind.GhostText,postOptions:f};r.delayMs>0&&await new Promise((e=>setTimeout(e,r.delayMs)));const l=await e.get(g.OpenAIFetcher).fetchAndStreamCompletions(e,s,n,o,i);return"failed"===l.type?{type:"failed",reason:l.reason,telemetryData:(0,I.mkBasicResultTelemetry)(n)}:"canceled"===l.type?(t.ghostTextLogger.debug(e,"Cancelled after awaiting fetchCompletions"),{type:"canceled",reason:l.reason,telemetryData:(0,I.mkCanceledResultTelemetry)(n)}):a(c,y,l.getProcessingTime(),l.choices)}catch(r){if((0,h.isAbortError)(r))return{type:"canceled",reason:"network request aborted",telemetryData:(0,I.mkCanceledResultTelemetry)(n,{cancelledNetworkRequest:!0})};if(t.ghostTextLogger.error(e,`Error on ghost text request ${r}`),e.get(u.UserErrorNotifier).notifyUser(e,r),(0,T.shouldFailForDebugPurposes)(e))throw r;return{type:"failed",reason:"non-abort error on ghost text request",telemetryData:(0,I.mkBasicResultTelemetry)(n)}}}function D(e,t){const r={...e};return r.completionText=e.completionText.trimEnd(),t.forceSingleLine&&(r.completionText=r.completionText.split("\n")[0]),r}t.ghostTextLogger=new p.Logger(p.LogLevel.INFO,"ghostText"),function(e){e[e.Network=0]="Network",e[e.Cache=1]="Cache",e[e.TypingAsSuggested=2]="TypingAsSuggested",e[e.Cycling=3]="Cycling"}(A=t.ResultType||(t.ResultType={})),t.completionCache=new s.LRUCache(100);const L=new a.Debouncer;function M(e,t,r){P=e,R=t,N=r}function B(e,r,n){const i=(0,s.keyForPrompt)(r.prompt),o=t.completionCache.get(i);o&&o.multiline===n.multiline?t.completionCache.put(i,{multiline:o.multiline,choices:o.choices.concat(n.choices)}):t.completionCache.put(i,n),t.ghostTextLogger.debug(e,`Appended cached ghost text for key: ${i}, multiline: ${n.multiline}, number of suggestions: ${n.choices.length}`)}function F(e,r){const n=t.completionCache.get(e);if(n&&(!r||n.multiline))return n.choices}function j(e,t,r){if(r.length>0){if(t.startsWith(r))return{completionIndex:e,completionText:t,displayText:t.substr(r.length),displayNeedsWsOffset:!1};{const n=t.substr(0,t.length-t.trimLeft().length);return r.startsWith(n)?{completionIndex:e,completionText:t,displayText:t.trimLeft(),displayNeedsWsOffset:!0}:{completionIndex:e,completionText:t,displayText:t,displayNeedsWsOffset:!1}}}return{completionIndex:e,completionText:t,displayText:t,displayNeedsWsOffset:!1}}function U(e,r){const n=r.requestId,i={choiceIndex:r.choiceIndex.toString()},o={numTokens:r.numTokens,compCharLen:r.completionText.length,numLines:r.completionText.split("\n").length};r.meanLogProb&&(o.meanLogProb=r.meanLogProb),r.meanAlternativeLogProb&&(o.meanAlternativeLogProb=r.meanAlternativeLogProb);const s=r.telemetryData.extendedBy(i,o);return s.extendWithRequestId(n),s.measurements.confidence=(0,w.ghostTextScoreConfidence)(e,s),s.measurements.quantile=(0,w.ghostTextScoreQuantile)(e,s),t.ghostTextLogger.debug(e,`Extended telemetry for ${r.telemetryData.properties.headerRequestId} with retention confidence ${s.measurements.confidence} (expected as good or better than about ${s.measurements.quantile} of all suggestions)`),s}function $(e,t,r,n,i){const o=Date.now()-n,s=o-i,a=r.telemetryData.extendedBy({},{completionCharLen:r.completionText.length,requestTimeMs:o,processingTimeMs:i,deltaMs:s,meanLogProb:r.meanLogProb||NaN,meanAlternativeLogProb:r.meanAlternativeLogProb||NaN,numTokens:r.numTokens});a.extendWithRequestId(r.requestId),(0,E.telemetry)(e,`ghostText.${t}`,a)}t.getGhostText=async function(e,r,a,u,p,h){const m=await(0,_.extractPrompt)(e,r,a);if("contextTooShort"===m.type)return t.ghostTextLogger.debug(e,"Breaking, not enough context"),{type:"abortedBeforeIssued",reason:"Not enough context"};if(h?.isCancellationRequested)return t.ghostTextLogger.info(e,"Cancelled after extractPrompt"),{type:"abortedBeforeIssued",reason:"Cancelled after extractPrompt"};const w=function(e,t){const r=(i=t,0!=e.lineAt(i).text.substr(i.character).trim().length),n=function(e,t){const r=t.lineAt(e).text.substr(e.character).trim();return/^\s*[)}\]"'`]*\s*[:{;,]?\s*$/.test(r)}(t,e);var i;if(r&&!n)return;return r&&n}(r,a);if(void 0===w)return t.ghostTextLogger.debug(e,"Breaking, invalid middle of the line"),{type:"abortedBeforeIssued",reason:"Invalid middle of the line"};const q=e.get(y.StatusReporter),H=e.get(S.LocationFactory),V=await async function(e,t,r,i,o,s){const a=await e.get(l.BlockModeConfig).forLanguage(e,t.languageId);switch(a){case l.BlockMode.Server:return{blockMode:l.BlockMode.Server,requestMultiline:!0,isCyclingRequest:o,finishedCb:async e=>{}};case l.BlockMode.Parsing:case l.BlockMode.ParsingAndServer:default:{const c=await async function(e,t,r,i){if(t.lineCount>=8e3)(0,E.telemetry)(e,"ghostText.longFileMultilineSkip",E.TelemetryData.createAndMarkAsIssued({languageId:t.languageId,lineCount:String(t.lineCount),currentLine:String(r.line)}));else{if(!i&&(0,n.isSupportedLanguageId)(t.languageId))return await(0,v.isEmptyBlockStart)(t,r);if(i&&(0,n.isSupportedLanguageId)(t.languageId))return await(0,v.isEmptyBlockStart)(t,r)||await(0,v.isEmptyBlockStart)(t,t.lineAt(r).range.end)}return!1}(e,t,r,s);return c?{blockMode:a,requestMultiline:!0,isCyclingRequest:!1,finishedCb:async n=>{let o;return o=i.trailingWs.length>0&&!i.prompt.prefix.endsWith(i.trailingWs)?e.get(S.LocationFactory).position(r.line,Math.max(r.character-i.trailingWs.length,0)):r,(0,v.isBlockBodyFinished)(e,t,o,n)}}:{blockMode:a,requestMultiline:!1,isCyclingRequest:o,finishedCb:async e=>{}}}}}(e,r,a,m,u,w);if(h?.isCancellationRequested)return t.ghostTextLogger.info(e,"Cancelled after requestMultiline"),{type:"abortedBeforeIssued",reason:"Cancelled after requestMultiline"};const[z]=(0,_.trimLastLine)(r.getText(H.range(H.position(0,0),a)));let K=function(e,r,n,i){const o=function(e,r,n,i){const o=!!P&&r.startsWith(P),s=null!=R&&n.suffix==R;if(!(P&&N&&o&&s))return;const a=F(N,i);if(!a)return;const c=r.substring(P.length);t.ghostTextLogger.debug(e,`Getting completions for user-typing flow - remaining prefix: ${c}`);const l=[];return a.forEach((e=>{const t=D(e,{forceSingleLine:!1});t.completionText.startsWith(c)&&(t.completionText=t.completionText.substring(c.length),l.push(t))})),l}(e,r,n,i);if(o&&o.length>0)return[o,A.TypingAsSuggested];const a=function(e,r,n,i){const o=(0,s.keyForPrompt)(n);t.ghostTextLogger.debug(e,`Trying to get completions from cache for key: ${o}`);const a=F(o,i);if(a){t.ghostTextLogger.debug(e,`Got completions from cache for key: ${o}`);const s=[];a.forEach((e=>{const t=D(e,{forceSingleLine:!i});s.push(t)}));const c=s.filter((e=>e.completionText));return c.length>0&&M(r,n.suffix,o),c}}(e,r,n,i);return a&&a.length>0?[a,A.Cache]:void 0}(e,z,m.prompt,V.requestMultiline);const W=o.v4(),G=(0,b.extractRepoInfoInBackground)(e,r.fileName),Q=(0,b.getDogFood)(G),Y=await(0,b.getUserKind)(e),J=await(0,f.getEngineURL)(e,(0,b.tryGetGitHubNWO)(G),r.languageId,Q,Y,p),X=await e.get(d.Features).beforeRequestWaitMs((0,b.tryGetGitHubNWO)(G)||"",r.languageId,Y,Q),Z=await e.get(d.Features).multiLogitBias((0,b.tryGetGitHubNWO)(G)||"",r.languageId,Y,Q),ee={blockMode:V.blockMode,languageId:r.languageId,repoInfo:G,engineURL:J,ourRequestId:W,prefix:z,prompt:m.prompt,multiline:V.requestMultiline,indentation:(0,v.contextIndentation)(r,a),isCycling:u,delayMs:X,multiLogitBias:Z},te=await e.get(d.Features).debouncePredict(),re=await e.get(d.Features).contextualFilterEnable(),ne=await e.get(d.Features).contextualFilterAcceptThreshold(),ie=await e.get(d.Features).contextualFilterEnableTree(),oe=await e.get(d.Features).contextualFilterExplorationTraffic();let se=!1;(te||re)&&(se=!0);const ae=function(e,t,r,n,o,s,a,c){const l=e.get(S.LocationFactory),u=t.lineAt(n.line),d=t.getText(l.range(u.range.start,n)),p=t.getText(l.range(n,u.range.end)),h={languageId:t.languageId,beforeCursorWhitespace:JSON.stringify(""===d.trim()),afterCursorWhitespace:JSON.stringify(""===p.trim())},f={...(0,E.telemetrizePromptLength)(o.prompt),promptEndPos:t.offsetAt(n),documentLength:t.getText().length,delayMs:r.delayMs},m=s.extendedBy(h,f);m.properties.promptChoices=JSON.stringify(o.promptChoices,((e,t)=>t instanceof Map?Array.from(t.entries()).reduce(((e,[t,r])=>({...e,[t]:r})),{}):t)),m.properties.promptBackground=JSON.stringify(o.promptBackground,((e,t)=>t instanceof Map?Array.from(t.values()):t));const y=Array.from(o.neighborSource.entries()).map((e=>[e[0],e[1].map((e=>(0,i.SHA256)(e).toString()))]));m.properties.neighborSource=JSON.stringify(y),m.measurements.promptComputeTimeMs=o.computeTimeMs,a&&(m.measurements.contextualFilterScore=(0,x.contextualFilterScore)(e,m,o.prompt,c));const v=r.repoInfo;return m.properties.gitRepoInformation=void 0===v?"unavailable":v===b.ComputationStatus.PENDING?"pending":"available",void 0!==v&&v!==b.ComputationStatus.PENDING&&(m.properties.gitRepoUrl=v.url,m.properties.gitRepoHost=v.hostname,m.properties.gitRepoOwner=v.owner,m.properties.gitRepoName=v.repo,m.properties.gitRepoPath=v.pathname),m.properties.engineName=(0,g.extractEngineName)(e,r.engineURL),m.properties.isMultiline=JSON.stringify(r.multiline),m.properties.blockMode=r.blockMode,m.properties.isCycling=JSON.stringify(r.isCycling),m.properties.headerRequestId=r.ourRequestId,(0,E.telemetry)(e,"ghostText.issued",m),m}(e,r,ee,a,m,p,se,ie);if(V.isCyclingRequest&&(K?.[0].length??0)>1||!V.isCyclingRequest&&void 0!==K)t.ghostTextLogger.info(e,"Found inline suggestions locally");else{if(q?.setProgress(),V.isCyclingRequest){const r=await async function(e,r,n,i,o){return O(e,r,n,i,o,"all completions",(async(o,s,a,c)=>{const l=[];for await(const r of c){if(i?.isCancellationRequested)return t.ghostTextLogger.debug(e,"Cancelled after awaiting choices iterator"),{type:"canceled",reason:"after awaiting choices iterator",telemetryData:(0,I.mkCanceledResultTelemetry)(n)};if(r.completionText.trimEnd()){if(-1!==l.findIndex((e=>e.completionText.trim()===r.completionText.trim())))continue;l.push(r)}}return l.length>0&&(B(e,r,{multiline:r.multiline,choices:l}),$(e,"cyclingPerformance",l[0],s,a)),{type:"success",value:l,telemetryData:(0,I.mkBasicResultTelemetry)(n),telemetryBlob:n}}))}(e,ee,ae,h,V.finishedCb);if("success"===r.type){const e=K?.[0]??[];r.value.forEach((t=>{-1===e.findIndex((e=>e.completionText.trim()===t.completionText.trim()))&&e.push(t)})),K=[e,A.Cycling]}else if(void 0===K)return q?.removeProgress(),r}else{const r=await(0,k.getDebounceLimit)(e,ae);try{await L.debounce(r)}catch{return{type:"canceled",reason:"by debouncer",telemetryData:(0,I.mkCanceledResultTelemetry)(ae)}}if(h?.isCancellationRequested)return t.ghostTextLogger.info(e,"Cancelled during debounce"),{type:"canceled",reason:"during debounce",telemetryData:(0,I.mkCanceledResultTelemetry)(ae)};if(re&&ae.measurements.contextualFilterScore&&ae.measurements.contextualFilterScore{const u=l[Symbol.asyncIterator](),d=await u.next();if(d.done)return t.ghostTextLogger.debug(e,"All choices redacted"),{type:"empty",reason:"all choices redacted",telemetryData:(0,I.mkBasicResultTelemetry)(n)};if(i?.isCancellationRequested)return t.ghostTextLogger.debug(e,"Cancelled after awaiting redactedChoices iterator"),{type:"canceled",reason:"after awaiting redactedChoices iterator",telemetryData:(0,I.mkCanceledResultTelemetry)(n)};const p=d.value;if(void 0===p)return t.ghostTextLogger.debug(e,"Got undefined choice from redactedChoices iterator"),{type:"empty",reason:"got undefined choice from redactedChoices iterator",telemetryData:(0,I.mkBasicResultTelemetry)(n)};$(e,"performance",p,a,c);const h=o-1;t.ghostTextLogger.debug(e,`Awaited first result, id: ${p.choiceIndex}`),function(e,r,n){const i=(0,s.keyForPrompt)(r.prompt);M(r.prefix,r.prompt.suffix,i),t.completionCache.put(i,n),t.ghostTextLogger.debug(e,`Cached ghost text for key: ${i}, multiline: ${n.multiline}, number of suggestions: ${n.choices.length}`)}(e,r,{multiline:r.multiline,choices:[p]});const f=[];for(let e=0;e{u.next(),t.ghostTextLogger.debug(e,`Awaited remaining results, number of results: ${n.length}`);const i=[];for(const r of n){const n=r.value;if(void 0!==n&&(t.ghostTextLogger.info(e,`GhostText later completion: [${n.completionText}]`),n.completionText.trimEnd())){if(-1!==i.findIndex((e=>e.completionText.trim()===n.completionText.trim())))continue;if(n.completionText.trim()===p.completionText.trim())continue;i.push(n)}}i.length>0&&B(e,r,{multiline:r.multiline,choices:i})}));return(0,T.isRunningInTest)(e)&&await g,{type:"success",value:D(d.value,{forceSingleLine:!1}),telemetryData:(0,I.mkBasicResultTelemetry)(n),telemetryBlob:n}}))}(e,ee,ae,h,V.finishedCb);if("success"!==n.type)return q?.removeProgress(),n;K=[[n.value],A.Network]}q?.removeProgress()}if(void 0===K)return{type:"failed",reason:"internal error: choices should be defined after network call",telemetryData:(0,I.mkBasicResultTelemetry)(ae)};const[ce,le]=K,ue=(0,c.asyncIterableMapFilter)((0,c.asyncIterableFromArray)(ce),(async n=>(0,C.postProcessChoice)(e,"ghostText",r,a,n,w,t.ghostTextLogger))),de=[];for await(const n of ue){const i=w&&(0,C.checkSuffix)(r,a,n);if(h?.isCancellationRequested)return t.ghostTextLogger.info(e,"Cancelled after post processing completions"),{type:"canceled",reason:"after post processing completions",telemetryData:(0,I.mkCanceledResultTelemetry)(ae)};const o=U(e,n),s={completion:j(n.choiceIndex,n.completionText,m.trailingWs),telemetry:o,isMiddleOfTheLine:w,coversSuffix:i};de.push(s)}return{type:"success",value:[de,le],telemetryData:(0,I.mkBasicResultTelemetry)(ae),telemetryBlob:ae}}},35034:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeIndentCharacter=void 0,t.normalizeIndentCharacter=function(e,t,r){function n(e,t,r){const n=new RegExp(`^(${t})+`,"g");return e.split("\n").map((e=>{const t=e.replace(n,""),i=e.length-t.length;return r(i)+t})).join("\n")}let i;if(i=void 0===e.tabSize||"string"==typeof e.tabSize?4:e.tabSize,!1===e.insertSpaces){const e=e=>n(e," ",(e=>"\t".repeat(Math.floor(e/i))+" ".repeat(e%i)));t.displayText=e(t.displayText),t.completionText=e(t.completionText)}else if(!0===e.insertSpaces){const e=e=>n(e,"\t",(e=>" ".repeat(e*i)));if(t.displayText=e(t.displayText),t.completionText=e(t.completionText),r){const e=e=>{const t=e.length-e.trimLeft().length,r=t%i;return 0!==r&&t>0?n(e," ".repeat(r),(e=>" ".repeat((Math.floor(e/i)+1)*i))):e};t.displayText=e(t.displayText),t.completionText=e(t.completionText)}}return t}},41749:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleGhostTextResultTelemetry=t.mkBasicResultTelemetry=t.mkCanceledResultTelemetry=t.telemetryRejected=t.telemetryAccepted=t.telemetryShown=void 0;const n=r(65489),i=r(96817);t.telemetryShown=function(e,t,r,i){r.markAsDisplayed();const o=i?`${t}.shownFromCache`:`${t}.shown`;(0,n.telemetry)(e,o,r)},t.telemetryAccepted=function(e,t,r){const o=t+".accepted",s=e.get(i.ContextualFilterManager);s.previousLabel=1,s.previousLabelTimestamp=Date.now(),(0,n.telemetry)(e,o,r)},t.telemetryRejected=function(e,t,r){const o=t+".rejected",s=e.get(i.ContextualFilterManager);s.previousLabel=0,s.previousLabelTimestamp=Date.now(),(0,n.telemetry)(e,o,r)},t.mkCanceledResultTelemetry=function(e,t={}){return{...t,telemetryBlob:e}},t.mkBasicResultTelemetry=function(e){return{headerRequestId:e.properties.headerRequestId,copilot_trackingId:e.properties.copilot_trackingId}},t.handleGhostTextResultTelemetry=async function(e,t){if("success"===t.type)return(0,n.telemetryRaw)(e,"ghostText.produced",t.telemetryData,{}),t.value;"abortedBeforeIssued"!==t.type&&("canceled"!==t.type?(0,n.telemetryRaw)(e,`ghostText.${t.type}`,{...t.telemetryData,reason:t.reason},{}):(0,n.telemetry)(e,"ghostText.canceled",t.telemetryData.telemetryBlob.extendedBy({reason:t.reason,cancelledNetworkRequest:t.telemetryData.cancelledNetworkRequest?"true":"false"})))}},5798:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.logger=t.toPlainText=t.Logger=t.MultiLog=t.OutputChannelLog=t.ConsoleLog=t.LogTarget=t.verboseLogging=t.LogVerbose=t.LogLevel=void 0;const n=r(32137),i=r(39800),o=r(65489);var s;!function(e){e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR"}(s=t.LogLevel||(t.LogLevel={}));class a{constructor(e){this.logVerbose=e}}function c(e){return e.get(a).logVerbose}t.LogVerbose=a,t.verboseLogging=c;class l{shouldLog(e,t){}}t.LogTarget=l,t.ConsoleLog=class extends l{constructor(e){super(),this.console=e}logIt(e,t,r,...n){c(e)||t==s.ERROR?this.console.error(r,...n):t==s.WARN&&this.console.warn(r,...n)}},t.OutputChannelLog=class extends l{constructor(e){super(),this.output=e}logIt(e,t,r,...n){this.output.appendLine(`${r} ${n.map(d)}`)}},t.MultiLog=class extends l{constructor(e){super(),this.targets=e}logIt(e,t,r,...n){this.targets.forEach((i=>i.logIt(e,t,r,...n)))}};class u{constructor(e,t){this.minLoggedLevel=e,this.context=t}setLevel(e){this.minLoggedLevel=e}stringToLevel(e){return s[e]}log(e,t,r,...i){const a=s[t];t==s.ERROR&&(0,o.telemetryError)(e,"log",o.TelemetryData.createAndMarkAsIssued({context:this.context,level:a,message:i.length>0?JSON.stringify(i):"no msg"}),r);const c=e.get(l),u=c.shouldLog(e,t);if(!1===u)return;if(void 0===u&&!this.shouldLog(e,t,this.context))return;const d=e.get(n.Clock).now().toISOString(),p=`[${a}] [${this.context}] [${d}]`;c.logIt(e,t,p,...i)}shouldLog(e,t,r){if(c(e))return!0;const n=(0,i.getConfig)(e,i.ConfigKey.DebugFilterLogCategories);if(n.length>0&&!n.includes(r))return!1;if((0,i.isProduction)(e))return t>=this.minLoggedLevel;const o=(0,i.getConfig)(e,i.ConfigKey.DebugOverrideLogLevels);return t>=(this.stringToLevel(o["*"])??this.stringToLevel(o[this.context])??this.minLoggedLevel)}debug(e,...t){this.log(e,s.DEBUG,!1,...t)}info(e,...t){this.log(e,s.INFO,!1,...t)}warn(e,...t){this.log(e,s.WARN,!1,...t)}error(e,...t){this.log(e,s.ERROR,!1,...t)}secureError(e,t,...r){this.log(e,s.ERROR,!1,t),this.log(e,s.ERROR,!0,t,...r)}}function d(e){return"object"==typeof e?JSON.stringify(e):String(e)}t.Logger=u,t.toPlainText=d,t.logger=new u(s.INFO,"default")},15291:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRootCertificateReader=t.RootCertificateReader=void 0;const n=r(32081),i=r(57147),o=r(22037),s=r(71017),a=r(40084),c=r(5798),l=new c.Logger(c.LogLevel.WARN,"certificates");class u{}t.RootCertificateReader=u;const d=new Map;t.getRootCertificateReader=(e,t=process.platform)=>new p(e.get(a.CopilotTokenNotifier),h(t,e),new w);class p{constructor(e,t,r){this.realReader=t,this.noopReader=r,this.delegate=t,e.on("onCopilotToken",(e=>{this.delegate="1"===e.getTokenValue("ssc")?this.realReader:this.noopReader}))}getAllRootCAs(){return this.delegate.getAllRootCAs()}}const h=(e,t)=>{let r=d.get(e);if(!r){const n=f(e),i=new m(n);r=new g(t,i),d.set(e,r)}return r},f=e=>{switch(e){case"linux":return new y;case"darwin":return new v;case"win32":return new _;default:return new b}};class g{constructor(e,t){this.ctx=e,this.delegate=t}async getAllRootCAs(){try{return await this.delegate.getAllRootCAs()}catch(e){return l.warn(this.ctx,`Failed to read root certificates: ${e}`),[]}}}class m extends u{constructor(e){super(),this.delegate=e}async getAllRootCAs(){return this.certificates||(this.certificates=await this.delegate.getAllRootCAs()),this.certificates}}class y extends u{async getAllRootCAs(){let e=[];for(const t of["/etc/ssl/certs/ca-certificates.crt","/etc/ssl/certs/ca-bundle.crt"]){const r=await this.readCerts(t);e=e.concat(r)}return e}async readCerts(e){try{const t=await i.promises.readFile(e,{encoding:"utf8"}),r=new Set(t.split(/(?=-----BEGIN CERTIFICATE-----)/g).filter((e=>!!e.length)));return Array.from(r)}catch(e){if("ENOENT"!==e?.code)throw e}return[]}}class v extends u{async getAllRootCAs(){const e=r(11240),t=r(35758);return e.all().map((e=>t.pki.certificateToPem(e)))}}class _ extends u{async getAllRootCAs(){return new Promise(((e,t)=>{const i=this.setupExecFileWithLargeBuffer(t);try{const t=r(60809);this.exePath||(this.exePath=this.setupCertificateFallbackExecutable()),t.exe(this.exePath);const o=[];t({format:t.der2.pem,fallback:!0,async:!0,ondata:e=>o.push(e),onend:()=>e(o)})}catch(e){t(e)}finally{n.execFile=i}}))}setupExecFileWithLargeBuffer(e){const t=n.execFile;return n.execFile=function(r,n,i){return t(r,n,{maxBuffer:12582912},(function(t){i(t,"",""),e(t)}))},t}setupCertificateFallbackExecutable(){let e=__dirname;"dist"===s.basename(__dirname)&&(e=s.dirname(__dirname));const t=s.join(e,"dist","roots.exe"),r=i.mkdtempSync(s.join(o.tmpdir(),"copilot-")),n=s.join(r,"copilot-find-certificates.exe");return i.copyFileSync(t,n),i.chmodSync(n,493),n}}class b extends u{async getAllRootCAs(){throw new Error("No certificate reader available for unsupported platform")}}class w extends u{async getAllRootCAs(){return[]}}},58290:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RootCertificateConfigurator=void 0;const n=r(24404),i=r(15291);t.RootCertificateConfigurator=class{constructor(e){this._certificateReader=e.get(i.RootCertificateReader)}async createTunnelSettings(e){return{...e,ca:await this.getCertificates()}}async getCertificates(){const e=await this._certificateReader.getAllRootCAs();if(0!==e.length)return e}async applyToRequestOptions(e){const t=await this._certificateReader.getAllRootCAs(),r={_vscodeAdditionalCaCerts:t};e.secureContext=n.createSecureContext(r),t.map((t=>{e.secureContext.context.addCACert(t)}))}}},57158:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HelixFetcher=void 0;const n=r(98606),i=r(13582),o=r(39800),s=r(20039),a=r(58290);class c extends s.Fetcher{constructor(e){super(),this.ctx=e,this.createSocketFactory=e=>async t=>{const r=await this.certificateConfigurator.createTunnelSettings(e),n=i.httpOverHttp({proxy:r});return t.rejectUnauthorized=e.rejectUnauthorized,await this.certificateConfigurator.applyToRequestOptions(t),new Promise(((i,o)=>{this.fixTunnelErrorHandling(t,o);const s=setTimeout((()=>{o({message:`tunneling socket could not be established, proxy socket connection timeout while connecting to ${r.host}:${r.port}`})}),e.connectionTimeoutInMs??1e4);n.createSocket(t,(e=>{clearTimeout(s),i(e)}))}))},this.fetchApi=this.createFetchApi(e),this.certificateConfigurator=new a.RootCertificateConfigurator(e)}fixTunnelErrorHandling(e,t){e.request?.emit||(e.request={},e.request.emit=function(e,r){t(r)})}set proxySettings(e){this._proxySettings=e,this.fetchApi=this.createFetchApi(this.ctx)}get proxySettings(){return this._proxySettings}createFetchApi(e){const t=e.get(o.BuildInfo);return!1===this._proxySettings?.rejectUnauthorized&&(process.env.NODE_TLS_REJECT_UNAUTHORIZED="0"),n.context({userAgent:`GithubCopilot/${t.getVersion()}`,socketFactory:this._proxySettings?this.createSocketFactory(this._proxySettings):void 0})}async fetch(e,t){const r={...t,body:t.body?t.body:t.json,signal:t.signal},n=await this.fetchApi.fetch(e,r);return new s.Response(n.status,n.statusText,n.headers,(()=>n.text()),(()=>n.json()),(async()=>n.body))}disconnectAll(){return this.fetchApi.reset()}makeAbortController(){return new n.AbortController}}t.HelixFetcher=c},20039:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.postRequest=t.Response=t.isAbortError=t.Fetcher=t.init=void 0;const n=r(98606),i=r(73837),o=r(39800),s=r(54619),a=r(65489);let c,l=!1;t.init=function(e){if(l){if(e!==c)throw new Error(`Networking re-initialized with mismatched version (old: ${c}, new: ${e})`)}else c=e,l=!0};class u{}t.Fetcher=u,t.isAbortError=function(e){return e instanceof n.AbortError},t.Response=class{constructor(e,t,r,n,i,o){this.status=e,this.statusText=t,this.headers=r,this.getText=n,this.getJson=i,this.getBody=o,this.ok=this.status>=200&&this.status<300}async text(){return this.getText()}async json(){return this.getJson()}async body(){return this.getBody()}},t.postRequest=function(e,t,r,n,c,d,p){if(!l)throw new Error("Networking must be initialized before being used");const h={Authorization:i.format("Bearer %s",r),"X-Request-Id":c,"Openai-Organization":"github-copilot","VScode-SessionId":e.get(o.VscInfo).sessionId,"VScode-MachineId":e.get(o.VscInfo).machineId,...(0,o.editorVersionHeaders)(e)};n&&(h["OpenAI-Intent"]=n);const f=e.get(s.GhostTextDebounceManager).forceDelayMs;f&&(h["X-Copilot-Force-Delay"]=f.toString());const g={method:"POST",headers:h,json:d,timeout:3e4},m=e.get(u);if(p){const t=m.makeAbortController();p.onCancellationRequested((()=>{(0,a.telemetry)(e,"networking.cancelRequest",a.TelemetryData.createAndMarkAsIssued({headerRequestId:c})),t.abort()})),g.signal=t.signal}return m.fetch(t,g).catch((r=>{if("ECONNRESET"==r.code||"ETIMEDOUT"==r.code||"ERR_HTTP2_INVALID_SESSION"==r.code||"ERR_HTTP2_GOAWAY_SESSION"==r.message)return(0,a.telemetry)(e,"networking.disconnectAll"),m.disconnectAll().then((()=>m.fetch(t,g)));throw r}))}},69035:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotificationSender=void 0,t.NotificationSender=class{}},47553:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEngineURL=t.TEST_ENGINE_PATHS=t.OPENAI_PROXY_HOST=void 0;const n=r(39800),i=r(16905),o=r(20913);t.OPENAI_PROXY_HOST="https://copilot-proxy.githubusercontent.com";const s="/v1/engines/copilot-codex";t.TEST_ENGINE_PATHS=[s],t.getEngineURL=async function(e,r="",a,c="",l="",u){return function(e,r){let i=function(e){return(0,o.isRunningInTest)(e)?(0,n.getConfig)(e,n.ConfigKey.DebugTestOverrideProxyUrl):(0,n.getConfig)(e,n.ConfigKey.DebugOverrideProxyUrl)}(e);return 0==i.length&&(i=t.OPENAI_PROXY_HOST),`${i}${r}`}(e,await async function(e,t,r,o,a,c){const l=(0,n.getConfig)(e,n.ConfigKey.DebugOverrideEngine);if(l)return`/v1/engines/${l}`;const u=await e.get(i.Features).customEngine(t,r,o,a,c);return""!==u?`/v1/engines/${u}`:s}(e,r,a,c,l,u))}},52031:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LiveOpenAIFetcher=t.postProcessChoices=t.OpenAIFetcher=t.extractEngineName=t.getProcessingTime=t.getRequestId=t.CopilotUiKind=void 0;const n=r(73837),i=r(35765),o=r(11661),s=r(39800),a=r(16905),c=r(54619),l=r(5798),u=r(20039),d=r(86635),p=r(3591),h=r(54604),f=r(65489),g=r(598),m=r(24586),y=new l.Logger(l.LogLevel.INFO,"fetch");var v;function _(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")||""}}function b(e){const t=e.headers.get("openai-processing-ms");return t?parseInt(t,10):0}function w(e,t){return t.split("/").pop()||(y.error(e,"Malformed engine URL: "+t),t)}!function(e){e.GhostText="ghostText",e.Panel="synthesize"}(v=t.CopilotUiKind||(t.CopilotUiKind={})),t.getRequestId=_,t.getProcessingTime=b,t.extractEngineName=w;class C{}function E(e,t){return t?e:(0,o.asyncIterableFilter)(e,(async e=>e.completionText.trim().length>0))}t.OpenAIFetcher=C,t.postProcessChoices=E,t.LiveOpenAIFetcher=class extends C{async fetchAndStreamCompletions(e,t,r,n,i){const s=e.get(d.StatusReporter),a="completions",c=await this.fetchWithParameters(e,a,t,i);if("not-sent"===c)return{type:"canceled",reason:"before fetch request"};if(i?.isCancellationRequested){const t=await c.body();try{t.destroy()}catch(t){l.logger.error(e,`Error destroying stream: ${t}`)}return{type:"canceled",reason:"after fetch request"}}if(void 0===c){const r=this.createTelemetryData(a,e,t);return s.setWarning(),r.properties.error="Response was undefined",(0,f.telemetry)(e,"request.shownWarning",r),{type:"failed",reason:"fetch response was undefined"}}if(200!==c.status){const r=this.createTelemetryData(a,e,t);return this.handleError(e,s,r,c)}const u=(await m.SSEProcessor.create(e,t.count,c,r,i)).processSSE(n);return{type:"success",choices:E((0,o.asyncIterableMap)(u,(async t=>(0,m.prepareSolutionForReturn)(e,t,r))),t.allowEmptyChoices),getProcessingTime:()=>b(c)}}createTelemetryData(e,t,r){return f.TelemetryData.createAndMarkAsIssued({endpoint:e,engineName:w(t,r.engineUrl),uiKind:r.uiKind,headerRequestId:r.ourRequestId})}async fetchWithParameters(e,t,r,o){const m=(0,s.getLanguageConfig)(e,s.ConfigKey.Stops),y=await e.get(a.Features).disableLogProb(),b={prompt:r.prompt.prefix,suffix:r.prompt.suffix,max_tokens:(0,s.getConfig)(e,s.ConfigKey.SolutionLength),temperature:(0,g.getTemperatureForSamples)(e,r.count),top_p:(0,s.getConfig)(e,s.ConfigKey.TopP),n:r.count,stop:m};!r.requestLogProbs&&y||(b.logprobs=2);const C=(0,p.tryGetGitHubNWO)(r.repoInfo);return void 0!==C&&(b.nwo=C),[h.RepetitionFilterMode.PROXY,h.RepetitionFilterMode.BOTH].includes(await e.get(a.Features).repetitionFilterMode())&&(b.feature_flags=[...b.feature_flags??[],"filter-repetitions"]),r.postOptions&&Object.assign(b,r.postOptions),o?.isCancellationRequested?"not-sent":(l.logger.info(e,`[fetchCompletions] engine ${r.engineUrl}`),await function(e,t,r,i,o,s,a,p,h){const g=e.get(d.StatusReporter),m=n.format("%s/%s",r,i);if(!a)return void l.logger.error(e,`Failed to send request to ${m} due to missing key`);const y=f.TelemetryData.createAndMarkAsIssued({endpoint:i,engineName:w(e,r),uiKind:p},(0,f.telemetrizePromptLength)(t));for(const[e,t]of Object.entries(s))"prompt"!=e&&"suffix"!=e&&(y.properties[`request.option.${e}`]=JSON.stringify(t)??"undefined");y.properties.headerRequestId=o,(0,f.telemetry)(e,"request.sent",y);const b=(0,f.now)(),C=function(e){switch(e){case v.GhostText:return"copilot-ghost";case v.Panel:return"copilot-panel"}}(p);return(0,u.postRequest)(e,m,a,C,o,s,h).then((r=>{const n=_(r,void 0);y.extendWithRequestId(n);const i=(0,f.now)()-b;y.measurements.totalTimeMs=i,l.logger.info(e,`request.response: [${m}] took ${i} ms`),l.logger.debug(e,"request.response properties",y.properties),l.logger.debug(e,"request.response measurements",y.measurements),l.logger.debug(e,`prompt: ${JSON.stringify(t)}`),(0,f.telemetry)(e,"request.response",y);const o=r.headers.get("x-copilot-delay"),s=o?parseInt(o,10):0;return e.get(c.GhostTextDebounceManager).extraDebounceMs=s,r})).catch((t=>{if((0,u.isAbortError)(t))throw t;g.setWarning(t.message);const r=y.extendedBy({error:"Network exception"});(0,f.telemetry)(e,"request.shownWarning",r),y.properties.code=String(t.code??""),y.properties.errno=String(t.errno??""),y.properties.message=String(t.message??""),y.properties.type=String(t.type??"");const n=(0,f.now)()-b;throw y.measurements.totalTimeMs=n,l.logger.debug(e,`request.response: [${m}] took ${n} ms`),l.logger.debug(e,"request.error properties",y.properties),l.logger.debug(e,"request.error measurements",y.measurements),l.logger.error(e,`Request Error: ${t.message}`),(0,f.telemetry)(e,"request.error",y),t})).finally((()=>{(0,f.logEnginePrompt)(e,t,y)}))}(e,r.prompt,r.engineUrl,t,r.ourRequestId,b,(await e.get(i.CopilotTokenManager).getCopilotToken(e)).token,r.uiKind,o))}async handleError(e,t,r,n){if(t.setWarning(),r.properties.error=`Response status was ${n.status}`,r.properties.status=String(n.status),(0,f.telemetry)(e,"request.shownWarning",r),401===n.status||403===n.status)return e.get(i.CopilotTokenManager).resetCopilotToken(e,n.status),{type:"failed",reason:`token expired or invalid: ${n.status}`};if(499===n.status)return y.info(e,"Cancelled by server"),{type:"failed",reason:"canceled by server"};const o=await n.text();return 466===n.status?(t.setError(o),y.info(e,o),{type:"failed",reason:`client not supported: ${o}`}):(y.error(e,"Unhandled status from server:",n.status,o),{type:"failed",reason:`unhandled status from server: ${n.status} ${o}`})}}},598:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTemperatureForSamples=t.calculateMeanAlternativeLogProb=t.calculateMeanLogProb=t.cleanupIndentChoices=t.convertToAPIChoice=t.DEFAULT_CHARACTER_MULTIPLIER=t.MAX_PROMPT_LENGTH=t.OpenAIFetcher=t.LiveOpenAIFetcher=t.getRequestId=t.CopilotUiKind=void 0;const n=r(39800),i=r(5798),o=r(65489),s=r(20913);var a=r(52031);function c(e,t){if(t?.logprobs?.token_logprobs)try{let e=0,r=0,n=50;for(let i=0;i0;i++,n--)e+=t.logprobs.token_logprobs[i],r+=1;return r>0?e/r:void 0}catch(t){i.logger.error(e,`Error calculating mean prob: ${t}`)}}function l(e,t){if(t?.logprobs?.top_logprobs)try{let e=0,r=0,n=50;for(let i=0;i0;i++,n--){const n={...t.logprobs.top_logprobs[i]};delete n[t.logprobs.tokens[i]],e+=Math.max(...Object.values(n)),r+=1}return r>0?e/r:void 0}catch(t){i.logger.error(e,`Error calculating mean prob: ${t}`)}}Object.defineProperty(t,"CopilotUiKind",{enumerable:!0,get:function(){return a.CopilotUiKind}}),Object.defineProperty(t,"getRequestId",{enumerable:!0,get:function(){return a.getRequestId}}),Object.defineProperty(t,"LiveOpenAIFetcher",{enumerable:!0,get:function(){return a.LiveOpenAIFetcher}}),Object.defineProperty(t,"OpenAIFetcher",{enumerable:!0,get:function(){return a.OpenAIFetcher}}),t.MAX_PROMPT_LENGTH=1500,t.DEFAULT_CHARACTER_MULTIPLIER=3,t.convertToAPIChoice=function(e,t,r,n,i,s,a,u){return(0,o.logEngineCompletion)(e,t,r,i,n),{completionText:t,meanLogProb:c(e,r),meanAlternativeLogProb:l(e,r),choiceIndex:n,requestId:i,modelInfo:u,blockFinished:s,tokens:r.tokens,numTokens:r.tokens.length,telemetryData:a}},t.cleanupIndentChoices=async function*(e,t){for await(const r of e){const e={...r},n=e.completionText.split("\n");for(let e=0;e=0&&r<=1?r:t<=1?0:t<10?.2:t<20?.4:.8}},24586:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.prepareSolutionForReturn=t.SSEProcessor=t.splitChunk=void 0;const n=r(16905),i=r(5798),o=r(65489),s=r(598),a=new i.Logger(i.LogLevel.INFO,"streamChoices");class c{constructor(){this.logprobs=[],this.top_logprobs=[],this.text=[],this.tokens=[],this.text_offset=[]}append(e){this.text.push(e.text),e.logprobs&&(this.tokens.push(e.logprobs.tokens??[]),this.text_offset.push(e.logprobs.text_offset??[]),this.logprobs.push(e.logprobs.token_logprobs??[]),this.top_logprobs.push(e.logprobs.top_logprobs??[]))}}function l(e){const t=e.split("\n"),r=t.pop();return[t.filter((e=>""!=e)),r]}t.splitChunk=l;class u{constructor(e,t,r,n,i,o){this.ctx=e,this.expectedNumChoices=t,this.response=r,this.body=n,this.telemetryData=i,this.cancellationToken=o,this.requestId=(0,s.getRequestId)(this.response),this.stats=new d(this.expectedNumChoices),this.solutions={}}static async create(e,t,r,n,i){const o=await r.body();return o.setEncoding("utf8"),new u(e,t,r,o,n,i)}async*processSSE(e=(async()=>{})){try{yield*this.processSSEInner(e)}finally{this.cancel(),a.info(this.ctx,`request done: headerRequestId: [${this.requestId.headerRequestId}] model deployment ID: [${this.requestId.deploymentId}]`),a.debug(this.ctx,`request stats: ${this.stats}`)}}async*processSSEInner(e){const t=await this.ctx.get(n.Features).dropCompletionReasons();let r="";e:for await(const n of this.body){if(this.maybeCancel("after awaiting body chunk"))return;a.debug(this.ctx,"chunk",n.toString());const[i,u]=l(r+n.toString());r=u;for(const r of i){const n=r.slice("data:".length).trim();if("[DONE]"==n)return void(yield*this.finishSolutions());let i;try{i=JSON.parse(n)}catch(e){a.error(this.ctx,"Error parsing JSON stream data",r);continue}if(void 0!==i.choices){if(0==this.requestId.created&&(this.requestId=(0,s.getRequestId)(this.response,i),0==this.requestId.created&&a.error(this.ctx,`Request id invalid, should have "completionId" and "created": ${this.requestId}`,this.requestId)),this.allSolutionsDone())break e;for(let r=0;r-1)&&(l=await e(s.text.join("")),this.maybeCancel("after awaiting finishedCb")))return;if(!n.finish_reason&&void 0===l)continue;const u=n.finish_reason??"client-trimmed";if((0,o.telemetry)(this.ctx,"completion.finishReason",this.telemetryData.extendedBy({completionChoiceFinishReason:u})),t.includes(n.finish_reason)?this.solutions[n.index]=null:(this.stats.markYielded(n.index),yield{solution:s,finishOffset:l,reason:n.finish_reason,requestId:this.requestId,index:n.index}),this.maybeCancel("after yielding finished choice"))return;this.solutions[n.index]=null}}else void 0!==i.error?a.error(this.ctx,"Error in response:",i.error.message):a.error(this.ctx,"Unexpected response with no choices or error")}}for(const[e,t]of Object.entries(this.solutions)){const r=Number(e);if(null!=t&&(this.stats.markYielded(r),yield{solution:t,finishOffset:void 0,reason:"Iteration Done",requestId:this.requestId,index:r},this.maybeCancel("after yielding after iteration done")))return}if(r.length>0)try{const e=JSON.parse(r);void 0!==e.error&&a.error(this.ctx,`Error in response: ${e.error.message}`,e.error)}catch(e){a.error(this.ctx,`Error parsing extraData: ${r}`)}}async*finishSolutions(){for(const[e,t]of Object.entries(this.solutions)){const r=Number(e);if(null!=t&&(this.stats.markYielded(r),yield{solution:t,finishOffset:void 0,reason:"DONE",requestId:this.requestId,index:r},this.maybeCancel("after yielding on DONE")))return}}maybeCancel(e){return!!this.cancellationToken?.isCancellationRequested&&(a.debug(this.ctx,"Cancelled: "+e),this.cancel(),!0)}cancel(){this.body.destroy()}allSolutionsDone(){const e=Object.values(this.solutions);return e.length==this.expectedNumChoices&&e.every((e=>null==e))}}t.SSEProcessor=u,t.prepareSolutionForReturn=function(e,t,r){let n=t.solution.text.join(""),i=!1;void 0!==t.finishOffset&&(a.debug(e,`solution ${t.index}: early finish at offset ${t.finishOffset}`),n=n.substring(0,t.finishOffset),i=!0),a.info(e,`solution ${t.index} returned. finish reason: [${t.reason}]`),a.debug(e,`solution ${t.index} details: finishOffset: [${t.finishOffset}] completionId: [{${t.requestId.completionId}}] created: [{${t.requestId.created}}]`);const o=function(e,t){const r={text:t.text.join(""),tokens:t.text};if(0===t.logprobs.length)return r;const n=t.logprobs.reduce(((e,t)=>e.concat(t)),[]),i=t.top_logprobs.reduce(((e,t)=>e.concat(t)),[]),o=t.text_offset.reduce(((e,t)=>e.concat(t)),[]),s=t.tokens.reduce(((e,t)=>e.concat(t)),[]);return{...r,logprobs:{token_logprobs:n,top_logprobs:i,text_offset:o,tokens:s}}}(0,t.solution);return(0,s.convertToAPIChoice)(e,n,o,t.index,t.requestId,i,r)};class d{constructor(e){this.choices=new Map;for(let t=0;t`${e}: ${t.yieldedTokens} -> ${t.seenTokens}`)).join(", ")}}class p{constructor(){this.yieldedTokens=-1,this.seenTokens=0}increment(){this.seenTokens++}markYielded(){this.yieldedTokens=this.seenTokens}}},93402:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.postInsertionTasks=t.postRejectionTasks=t.captureCode=void 0;const n=r(25135),i=r(41749),o=r(5798),s=r(47917),a=r(24090),c=r(59558),l=r(65489),u=r(70216),d=r(70819),p=new o.Logger(o.LogLevel.INFO,"post-insertion"),h=[{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}];async function f(e,t,r){const n=await e.get(d.TextDocumentManager).getTextDocument(t);if(!n)return p.info(e,`Could not get document for ${t.fsPath}. Maybe it was closed by the editor.`),{prompt:{prefix:"",suffix:"",isFimEnabled:!1,promptElementRanges:[]},capturedCode:"",terminationOffset:0};const i=n.getText(),o=i.substring(0,r),c=n.positionAt(r),l=await(0,a.extractPrompt)(e,n,c),u="prompt"===l.type?l.prompt:{prefix:o,suffix:"",isFimEnabled:!1,promptElementRanges:[]},h=i.substring(r),f=(0,s.contextIndentationFromText)(o,r,n.languageId),g=(0,s.indentationBlockFinished)(f,void 0),m=await g(h),y=Math.min(i.length,r+(m?2*m:500));return{prompt:u,capturedCode:i.substring(r,y),terminationOffset:m??-1}}function g(e,t,r,n){const i=e.substring(Math.max(0,n-r),Math.min(e.length,n+t.length+r)),o=(0,c.lexEditDistance)(i,t),s=o.lexDistance/o.needleLexLength,{distance:a}=(0,c.editDistance)(i.substring(o.startOffset,o.endOffset),t);return{relativeLexEditDistance:s,charEditDistance:a,completionLexLength:o.needleLexLength,foundOffset:o.startOffset+Math.max(0,n-r),lexEditDistance:o.lexDistance,stillInCodeHeuristic:s<=.5?1:0}}t.captureCode=f,t.postRejectionTasks=function(e,t,r,o,s){s.forEach((({completionText:r,completionTelemetryData:n})=>{p.debug(e,`${t}.rejected choiceIndex: ${n.properties.choiceIndex}`),(0,i.telemetryRejected)(e,t,n)}));const a=new n.ChangeTracker(e,o,r);h.filter((e=>e.captureRejection)).map((n=>{a.push((async()=>{p.debug(e,`Original offset: ${r}, Tracked offset: ${a.offset}`);const{completionTelemetryData:i}=s[0],{prompt:c,capturedCode:u,terminationOffset:d}=await f(e,o,a.offset);let h;h=c.isFimEnabled?{hypotheticalPromptPrefixJson:JSON.stringify(c.prefix),hypotheticalPromptSuffixJson:JSON.stringify(c.suffix)}:{hypotheticalPromptJson:JSON.stringify(c.prefix)};const g=i.extendedBy({...h,capturedCodeJson:JSON.stringify(u)},{timeout:n.seconds,insertionOffset:r,trackedOffset:a.offset,terminationOffsetInCapturedCode:d});p.debug(e,`${t}.capturedAfterRejected choiceIndex: ${i.properties.choiceIndex}`,g),(0,l.telemetry)(e,t+".capturedAfterRejected",g,!0)}),1e3*n.seconds)}))},t.postInsertionTasks=async function(e,t,r,o,s,a){p.debug(e,`${t}.accepted choiceIndex: ${a.properties.choiceIndex}`),(0,i.telemetryAccepted)(e,t,a);const c=new n.ChangeTracker(e,s,o),m=r.trim();h.map((r=>c.push((()=>async function(e,t,r,n,i,o,s,a){const c=await e.get(d.TextDocumentManager).getTextDocument(i);if(c){const u=c.getText();let d=g(u,r,50,a.offset);d.stillInCodeHeuristic||(d=g(u,r,1500,a.offset)),p.debug(e,`stillInCode: ${d.stillInCodeHeuristic?"Found":"Not found"}! Completion '${r}' in file ${i.fsPath}. lexEditDistance fraction was ${d.relativeLexEditDistance}. Char edit distance was ${d.charEditDistance}. Inserted at ${n}, tracked at ${a.offset}, found at ${d.foundOffset}. choiceIndex: ${s.properties.choiceIndex}`);const h=s.extendedBy({},{timeout:o.seconds,insertionOffset:n,trackedOffset:a.offset}).extendedBy({},d);if((0,l.telemetry)(e,t+".stillInCode",h),o.captureCode){const{prompt:r,capturedCode:c,terminationOffset:u}=await f(e,i,a.offset);let d;d=r.isFimEnabled?{hypotheticalPromptPrefixJson:JSON.stringify(r.prefix),hypotheticalPromptSuffixJson:JSON.stringify(r.suffix)}:{hypotheticalPromptJson:JSON.stringify(r.prefix)};const g=s.extendedBy({...d,capturedCodeJson:JSON.stringify(c)},{timeout:o.seconds,insertionOffset:n,trackedOffset:a.offset,terminationOffsetInCapturedCode:u});p.debug(e,`${t}.capturedAfterAccepted choiceIndex: ${s.properties.choiceIndex}`,h),(0,l.telemetry)(e,t+".capturedAfterAccepted",g,!0)}}}(e,t,m,o,s,r,a,c)),1e3*r.seconds))),e.get(u.PostInsertionNotifier).emit("onPostInsertion",{ctx:e,insertionCategory:t,insertionOffset:o,fileURI:s,completionText:r,telemetryData:a})}},70216:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PostInsertionNotifier=void 0;const n=r(82361);class i extends n.EventEmitter{}t.PostInsertionNotifier=i},86635:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NoOpStatusReporter=t.StatusReporter=void 0;class r{}t.StatusReporter=r,t.NoOpStatusReporter=class extends r{setProgress(){}removeProgress(){}setWarning(){}setError(e){}forceNormal(){}}},29975:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NeighborSource=t.CursorHistoryStrategy=t.NeighborFileType=void 0;const n=r(16630),i=r(25225);var o,s;!function(e){e.Open="Open",e.Cursor="Cursor"}(o=t.NeighborFileType||(t.NeighborFileType={})),function(e){e.None="none",e.MostRecent="mostrecent",e.MostCount="mostcount",e.BeforeCurrentFile="beforecurrentfile"}(s=t.CursorHistoryStrategy||(t.CursorHistoryStrategy={}));class a{constructor(e,t){this.openFileStrategy=e,this.cursorHistoryStrategy=t}async tryGetTextDocument(e,t){try{return await e.getTextDocument(n.URI.parse(t))}catch(e){return}}async getCursorHistoryFiles(e,t,r,n){const o=[];if(n===s.None)return o;const c=[...i.cursorHistoryStack].reverse();if(n===s.MostRecent){let n=0;const i=new Set;for(const{uri:s,offset:a}of c){if(i.has(s))continue;const c=await this.tryGetTextDocument(e,s);if(void 0!==c&&!this.fileLengthExceeded(n,c)&&"file"===c.uri.scheme&&c.fileName!==t&&c.languageId===r&&(o.push({uri:s,relativePath:await e.getRelativePath(c),languageId:c.languageId,source:c.getText(),offset:a}),i.add(s),n+=c.getText().length,this.fileCountExceeded(o)))break}}else if(n===s.BeforeCurrentFile){let n=0,i=null;const s=new Set;for(const{uri:a,offset:l}of c){const c=await this.tryGetTextDocument(e,a);if(void 0!==c&&!this.fileLengthExceeded(n,c)&&"file"===c.uri.scheme&&c.languageId===r){if(c.fileName!==t&&i===t&&!s.has(a)&&(s.add(a),o.push({uri:a,relativePath:await e.getRelativePath(c),languageId:c.languageId,source:c.getText(),offset:l}),n+=c.getText().length,this.fileCountExceeded(o)))break;i=c.fileName}}}else if(n===s.MostCount){let n=null;const i=new Map;for(const{uri:o,offset:s,timestamp:l}of c){if(null!==n&&n-l>a.MAX_MOST_RECENT_TIME_RANGE)break;const c=await this.tryGetTextDocument(e,o);if(void 0!==c&&"file"===c.uri.scheme&&c.fileName!==t&&c.languageId===r){null===n&&(n=l);const e=i.get(o)??{uri:o,offset:s,timestamp:l,count:0,doc:c};e.count+=1,i.set(o,e)}}const s=[...i.entries()].sort(((e,t)=>t[1].count-e[1].count));let l=0;for(const[t,r]of s){const n=r.doc,i=r.offset;if(!this.fileLengthExceeded(l,n)&&(o.push({uri:t,relativePath:await e.getRelativePath(n),languageId:n.languageId,source:n.getText(),offset:i}),l+=n.getText().length,this.fileCountExceeded(o)))break}}return o}fileCountExceeded(e){return e.length>=a.MAX_NEIGHBOR_FILES}fileLengthExceeded(e,t){return e+t.getText().length>a.MAX_NEIGHBOR_AGGREGATE_LENGTH}async getOpenFiles(e,t,r){const n=[],o=(0,i.sortByAccessTimes)(e.textDocuments);let s=0;for(const i of o)if(!this.fileLengthExceeded(s,i)&&("file"==i.uri.scheme&&i.fileName!==t&&i.languageId===r&&(n.push({uri:i.uri.toString(),relativePath:await e.getRelativePath(i),languageId:i.languageId,source:i.getText()}),s+=i.getText().length),this.fileCountExceeded(n)))break;return n}async getNeighborFiles(e,t,r){const n=await this.getOpenFiles(e,t.fsPath,r);if(this.openFileStrategy)return{docs:n,neighborSource:new Map([[o.Open,n.map((e=>e.uri))]])};{const i=await this.getCursorHistoryFiles(e,t.fsPath,r,this.cursorHistoryStrategy);return{docs:i,neighborSource:new Map([[o.Open,n.map((e=>e.uri))],[o.Cursor,i.map((e=>e.uri))]])}}}}t.NeighborSource=a,a.MAX_NEIGHBOR_AGGREGATE_LENGTH=2e5,a.MAX_NEIGHBOR_FILES=20,a.MAX_MOST_RECENT_TIME_RANGE=18e5},47917:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.indentationBlockFinished=t.completionCutOrContinue=t.contextIndentationFromText=t.contextIndentation=t.getNodeStart=t.isBlockBodyFinished=t.isEmptyBlockStart=void 0;const n=r(52369),i=r(2273);t.isEmptyBlockStart=function(e,t){return i.isEmptyBlockStart(e.languageId,e.getText(),e.offsetAt(t))},t.isBlockBodyFinished=function(e,t,r,o){const s=e.get(n.LocationFactory),a=t.getText(s.range(s.position(0,0),r)),c=t.offsetAt(r);return i.isBlockBodyFinished(t.languageId,a,o,c)},t.getNodeStart=async function(e,t,r,o){const s=e.get(n.LocationFactory),a=t.getText(s.range(s.position(0,0),r))+o,c=await i.getNodeStart(t.languageId,a,t.offsetAt(r));if(c)return t.positionAt(c)};const o=["\\{","\\}","\\[","\\]","\\(","\\)"].concat(["then","else","elseif","elif","catch","finally","fi","done","end","loop","until","where","when"].map((e=>e+"\\b"))),s=new RegExp(`^(${o.join("|")})`);function a(e){return s.test(e.trimLeft().toLowerCase())}function c(e){const t=/^(\s*)([^]*)$/.exec(e);return t&&t[2]&&t[2].length>0?t[1].length:void 0}function l(e,t,r){const n=e.slice(0,t).split("\n"),i=e.slice(t).split("\n");function o(e,t,n){let i,o,s=t;for(;void 0===i&&s>=0&&s=0&&!e[s].trim().startsWith('"""');)s--;if(s>=0)for(i=void 0,s--;void 0===i&&s>=0;)i=c(e[s]),o=s,s--}}return[i,o]}const[s,a]=o(n,n.length-1,-1),l=(()=>{if(void 0!==s&&void 0!==a)for(let e=a-1;e>=0;e--){const t=c(n[e]);if(void 0!==t&&t{const n=u(r,e,t);return"continue"===n?void 0:n}}},24090:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extractPrompt=t.trimLastLine=t._contextTooShort=t.MIN_PROMPT_CHARS=void 0;const n=r(44617),i=r(39800),o=r(16905),s=r(70819),a=r(29975),c=r(2273),l=r(3591);function u(e){const t=e.split("\n"),r=t[t.length-1],n=r.length-r.trimRight().length,i=e.slice(0,e.length-n),o=e.substr(i.length);return[r.length==n?i:e,o]}async function d(e,r,d,p,h,f){const g=(0,l.extractRepoInfoInBackground)(e,h.fsPath),m=(0,l.tryGetGitHubNWO)(g)??"",y=await(0,l.getUserKind)(e),v=(0,l.getDogFood)(g),_=await(0,i.suffixPercent)(e,m,f,y,v),b=await(0,i.fimSuffixLengthThreshold)(e,m,f,y,v);if((_>0?r.length:d)0&&(w={...w,includeSiblingFunctions:n.SiblingOption.NoSiblings,suffixPercent:x,suffixMatchThreshold:k,fimSuffixLengthThreshold:I});const A=e.get(n.FileSystem);return{neighborSource:S,...await(0,c.getPrompt)(A,h,w,T)}}(e,r,d,p,h,f),[I,A]=u(C),P=Date.now();return{type:"prompt",prompt:{prefix:I,suffix:E,isFimEnabled:_>0&&E.length>b,promptElementRanges:x.ranges},trailingWs:A,promptChoices:T,computeTimeMs:P-w,promptBackground:S,neighborSource:k}}async function p(e,t,r){const n=await e.get(s.TextDocumentManager).getRelativePath(t);return d(e,t.getText(),t.offsetAt(r),n,t.uri,t.languageId)}t.MIN_PROMPT_CHARS=10,t._contextTooShort={type:"contextTooShort"},t.trimLastLine=u,t.extractPrompt=function(e,t,r){const n=e.get(s.TextDocumentManager).findNotebook(t);return void 0===n?p(e,t,r):async function(e,t,r,n){const i=r.getCells().find((e=>e.document.uri===t.uri));if(i){const o=r.getCells().filter((e=>e.index0?o.map((e=>e.document.getText())).join("\n\n")+"\n\n":"",c=a+t.getText(),l=a.length+t.offsetAt(n),u=await e.get(s.TextDocumentManager).getRelativePath(t);return d(e,c,l,u,t.uri,i.document.languageId)}return p(e,t,n)}(e,t,n,r)}},2273:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parsesWithoutError=t.getPrompt=t.getNodeStart=t.getFunctionPositions=t.getBlockCloseToken=t.isSupportedLanguageId=t.isBlockBodyFinished=t.isEmptyBlockStart=t.terminate=t.init=void 0;const n=r(44617);let i=null;const o=new Map;let s=0;t.init=function(t,u,d){if(!u){const t=r(13094);for(const r of[...a,...c])e.exports[r]=t[r];return}for(const r of a)e.exports[r]=l(t,d,r);e.exports.getPrompt=function(e,t){return function(r,...n){const a=s++;return new Promise(((r,s)=>{o.set(a,{resolve:r,reject:s}),t.debug(e,`Proxy getPrompt - ${a}`),i?.postMessage({id:a,fn:"getPrompt",args:n})}))}}(t,d),i=n.createWorker(),o.clear(),s=0;const p=t.get(n.FileSystem);function h(e){d.error(t,e);for(const t of o.values())t.reject(e);o.clear()}i.on("message",(({id:e,err:r,res:n})=>{const i=o.get(e);d.debug(t,`Response ${e} - ${n}, ${r}`),i&&(o.delete(e),r?i.reject(r):i.resolve(n))})),i.on("error",h),i.on("exit",(e=>{0!==e&&h(new Error(`Worker thread exited with code ${e}.`))})),i.on("readFileReq",(e=>{d.debug(t,`READ_FILE_REQ - ${e}`),p.readFile(e).then((e=>{i?.emit("readFileRes",e)})).catch(h)})),i.on("mtimeRes",(e=>{d.debug(t,`mTime_REQ - ${e}`),p.mtime(e).then((e=>{i?.emit("mtimeRes",e)})).catch(h)}))},t.terminate=function(){i&&(i.removeAllListeners(),i.terminate(),i=null,o.clear())};const a=["getFunctionPositions","isEmptyBlockStart","isBlockBodyFinished","getNodeStart","parsesWithoutError"],c=["isSupportedLanguageId","getBlockCloseToken","getPrompt"];function l(e,t,r){return function(...n){const a=s++;return new Promise(((s,c)=>{o.set(a,{resolve:s,reject:c}),t.debug(e,`Proxy ${r}`),i?.postMessage({id:a,fn:r,args:n})}))}}t.isEmptyBlockStart=n.isEmptyBlockStart,t.isBlockBodyFinished=n.isBlockBodyFinished,t.isSupportedLanguageId=n.isSupportedLanguageId,t.getBlockCloseToken=n.getBlockCloseToken,t.getFunctionPositions=n.getFunctionPositions,t.getNodeStart=n.getNodeStart,t.getPrompt=n.getPrompt,t.parsesWithoutError=n.parsesWithoutError},3591:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ComputationStatus=t.getRepoUrlFromConfigText=t.parseRepoUrl=t.extractRepoInfoForTesting=t.extractRepoInfoInBackground=t.tryGetGitHubNWO=t.getDogFood=t.getUserKind=t.isNotRepo=t.isRepoInfo=void 0;const n=r(44617),i=r(36314),o=r(71017),s=r(35765),a=r(70140);function c(e){if(void 0!==e&&e!==h.PENDING)return"github.com"===e.hostname?e.owner+"/"+e.repo:void 0}t.isRepoInfo=function(e){return void 0!==e&&e!==h.PENDING},t.isNotRepo=function(e){return void 0===e},t.getUserKind=async function(e){const t=(await e.get(s.CopilotTokenManager).getCopilotToken(e,!1)).organization_list??[];return["a5db0bcaae94032fe715fb34a5e4bce2","7184f66dfcee98cb5f08a1cb936d5225","4535c7beffc844b46bb1ed4aa04d759a"].find((e=>t.includes(e)))??""},t.getDogFood=function(e){if(void 0===e)return"";if(e===h.PENDING)return"";const t=c(e);if("github/github"===t)return t;const r=function(e){if(void 0!==e&&e!==h.PENDING)return e.hostname.endsWith("azure.com")||e.hostname.endsWith("visualstudio.com")?e.owner+"/"+e.repo:void 0}(e)?.toLowerCase();return void 0!==r?r:""},t.tryGetGitHubNWO=c,t.extractRepoInfoInBackground=function(e,t){if(!t)return;const r=(0,o.dirname)(t);return l(e,r)};const l=function(e,t){const r=new a.LRUCache(1e4),n=new Set;return(t,...i)=>{const o=JSON.stringify(i),s=r.get(o);if(s)return s.result;if(n.has(o))return h.PENDING;const a=e(t,...i);return n.add(o),a.then((e=>{r.put(o,new f(e)),n.delete(o)})),h.PENDING}}(u);async function u(e,t){const r=await async function(e,t){let r=t+"_add_to_make_longer";const i=e.get(n.FileSystem);for(;t.length>1&&t.length{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isRepetitive=t.RepetitionFilterMode=void 0;const r=[{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}];var n;function i(e){const t=function(e){const t=Array(e.length).fill(0);t[0]=-1;let r=-1;for(let n=1;n=0&&e[r+1]!==e[n];)r=t[r];e[r+1]===e[n]&&r++,t[n]=r}return t}(e);for(const n of r)if(!(e.lengthe.trim().length>0)))}},59558:(e,t)=>{"use strict";function r(e,t,r=((e,t)=>e===t?0:1)){if(0===t.length||0===e.length)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),s=new Array(e.length+1).fill(0),a=t[0];for(let t=0;t0?t-1:0;for(let c=1;c0&&(yield r),r=i,n=e)}r.length>0&&(yield r)}function s(e,t,r,n){const i=[];let o=0;for(const s of r(e))n(s)&&(t.has(s)||t.set(s,t.size),i.push([t.get(s),o])),o+=s.length;return[i,t]}function a(e){return" "!==e}Object.defineProperty(t,"__esModule",{value:!0}),t.lexEditDistance=t.lexicalAnalyzer=t.lexGeneratorWords=t.reverseLexDictionary=t.emptyLexDictionary=t.editDistance=void 0,t.editDistance=r,t.emptyLexDictionary=n,t.reverseLexDictionary=i,t.lexGeneratorWords=o,t.lexicalAnalyzer=s,t.lexEditDistance=function(e,t,c=o){const[l,u]=s(e,n(),c,a),[d,p]=s(t,u,c,a);if(0===d.length||0===l.length)return{lexDistance:d.length,startOffset:0,endOffset:0,haystackLexLength:l.length,needleLexLength:d.length};const h=i(p),f=d.length,g=h[d[0][0]],m=h[d[f-1][0]],y=r(l.map((e=>e[0])),d.map((e=>e[0])),(function(e,t,r,n){if(0===n||n===f-1){const e=h[l[r][0]];return 0==n&&e.endsWith(g)||n==f-1&&e.startsWith(m)?0:1}return e===t?0:1})),v=l[y.startOffset][1];let _=y.endOffset0&&" "===e[_-1]&&--_,{lexDistance:y.distance,startOffset:v,endOffset:_,haystackLexLength:l.length,needleLexLength:d.length}}},11523:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ghostTextDisplayQuantiles=t.ghostTextDisplayLanguageParameters=t.ghostTextDisplayMeanAlternativeLogProbParameter=t.ghostTextDisplayMeanLogProbParameter=t.ghostTextDisplayLog1pcompCharLenParameter=t.ghostTextDisplayInterceptParameter=void 0,t.ghostTextDisplayInterceptParameter=2.98410452738298,t.ghostTextDisplayLog1pcompCharLenParameter=-.838732736843507,t.ghostTextDisplayMeanLogProbParameter=1.50314646255716,t.ghostTextDisplayMeanAlternativeLogProbParameter=-.237798634012662,t.ghostTextDisplayLanguageParameters={python:.314368072478742},t.ghostTextDisplayQuantiles={.01:.225800751784931,.02:.290204307767402,.03:.333153496466045,.05:.404516749849559,.1:.513216040545626,.2:.626904979128674,.3:.694880719658273,.4:.743100684947291,.5:.782524520571946,.6:.816856186092243,.7:.84922977716585,.8:.883694877241999,.9:.921859050950077,.95:.944571268106974,.99:.969535563141733}},71153:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ghostTextScoreQuantile=t.ghostTextScoreConfidence=void 0;const n=r(5798),i=r(11523),o=(new n.Logger(n.LogLevel.INFO,"restraint"),{link:e=>Math.exp(e)/(1+Math.exp(e)),unlink:e=>Math.log(e/(1-e))});class s{constructor(e,t,r){this.name=e,this.coefficient=t,this.transformation=r||(e=>e)}contribution(e){return this.coefficient*this.transformation(e)}}const a=new class{constructor(e,t,r){if(this.link=o,this.intercept=e,this.coefficients=t,this.logitsToQuantiles=new Map,this.logitsToQuantiles.set(0,0),this.logitsToQuantiles.set(1,1),r)for(const e in r)this.logitsToQuantiles.set(r[e],Number(e))}predict(e,t){let r=this.intercept;for(const e of this.coefficients){const n=t[e.name];if(void 0===n)return NaN;r+=e.contribution(n)}return this.link.link(r)}quantile(e,t){return function(e,t){const r=Math.min(...Array.from(t.keys()).filter((t=>t>=e))),n=Math.max(...Array.from(t.keys()).filter((t=>tMath.log(1+e))),new s("meanLogProb",i.ghostTextDisplayMeanLogProbParameter),new s("meanAlternativeLogProb",i.ghostTextDisplayMeanAlternativeLogProbParameter)].concat(Object.entries(i.ghostTextDisplayLanguageParameters).map((e=>new s(e[0],e[1])))),i.ghostTextDisplayQuantiles);t.ghostTextScoreConfidence=function(e,t){const r={...t.measurements};return Object.keys(i.ghostTextDisplayLanguageParameters).forEach((e=>{r[e]=t.properties["customDimensions.languageId"]==e?1:0})),a.predict(e,r)},t.ghostTextScoreQuantile=function(e,t){const r={...t.measurements};return Object.keys(i.ghostTextDisplayLanguageParameters).forEach((e=>{r[e]=t.properties["customDimensions.languageId"]==e?1:0})),a.quantile(e,r)}},3883:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkSuffix=t.postProcessChoice=void 0;const n=r(16905),i=r(2273),o=r(65489),s=r(20913),a=r(54604);t.postProcessChoice=async function(e,t,r,c,l,u,d){if((0,a.isRepetitive)(l.tokens,await e.get(n.Features).repetitionFilterMode())){const t=o.TelemetryData.createAndMarkAsIssued();return t.extendWithRequestId(l.requestId),(0,o.telemetry)(e,"repetition.detected",t,!0),void d.info(e,"Filtered out repetitive solution")}const p={...l};if(function(e,t,r){let n="",i=t.line+1;for(;""===n&&i1);return n}(e,r,c,p.completionText,u),p.completionText?p:void 0},t.checkSuffix=function(e,t,r){const n=e.lineAt(t.line).text.substring(t.character);if(n.length>0){if(-1!==r.completionText.indexOf(n))return!0;{let e=0;for(const t of n){const n=r.completionText.indexOf(t,e+1);if(!(n>e)){e=-1;break}e=n}return-1!==e}}return!1}},65489:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.logEnginePrompt=t.logEngineCompletion=t.telemetryError=t.telemetryException=t.telemetryRaw=t.telemetryExpProblem=t.telemetry=t.TelemetryEndpointUrl=t.now=t.telemetrizePromptLength=t.TelemetryData=t.TelemetryUserConfig=t.TelemetryReporters=void 0;const n=r(86236),i=r(7057),o=r(40084),s=r(39800),a=r(16905),c=r(74914),l=r(20913),u=r(96712),d=r(59591);class p{getReporter(e){return this.reporter}getSecureReporter(e){return y(e)?this.reporterSecure:(0,l.shouldFailForDebugPurposes)(e)?new u.FailingTelemetryReporer:void 0}setReporter(e){this.reporter=e}setSecureReporter(e){this.reporterSecure=e}async deactivate(){let e=Promise.resolve();this.reporter&&(e=this.reporter.dispose(),this.reporter=void 0);let t=Promise.resolve();this.reporterSecure&&(t=this.reporterSecure.dispose(),this.reporterSecure=void 0),await Promise.all([e,t])}}t.TelemetryReporters=p;class h{constructor(e,t,r){this.trackingId=t,this.optedIn=r??!1,this.setupUpdateOnToken(e)}setupUpdateOnToken(e){e.get(o.CopilotTokenNotifier).on("onCopilotToken",(e=>{const t="1"===e.getTokenValue("rt"),r=e.getTokenValue("tid");void 0!==r&&(this.trackingId=r,this.optedIn=t)}))}}t.TelemetryUserConfig=h;class f{constructor(e,t,r){this.properties=e,this.measurements=t,this.issuedTime=r}static createAndMarkAsIssued(e,t){return e={...e,unique_id:i.v4()},new f(e||{},t||{},m())}extendedBy(e,t){const r={...this.properties,...e},n={...this.measurements,...t},i=new f(r,n,this.issuedTime);return i.displayedTime=this.displayedTime,i.filtersAndExp=this.filtersAndExp,i}markAsDisplayed(){void 0===this.displayedTime&&(this.displayedTime=m())}async extendWithExpTelemetry(e){this.filtersAndExp||await e.get(a.Features).addExpAndFilterToTelemetry(this),this.filtersAndExp.exp.addToTelemetry(this),this.filtersAndExp.filters.addToTelemetry(this)}extendWithEditorAgnosticFields(e){this.properties.editor_version=(0,s.formatNameAndVersion)(e.get(s.EditorAndPluginInfo).getEditorInfo(e)),this.properties.editor_plugin_version=(0,s.formatNameAndVersion)(e.get(s.EditorAndPluginInfo).getEditorPluginInfo(e));const t=e.get(s.VscInfo);this.properties.client_machineid=t.machineId,this.properties.client_sessionid=t.sessionId,this.properties.copilot_version=`copilot/${(0,s.getVersion)(e)}`,this.properties.common_extname=e.get(s.EditorAndPluginInfo).getEditorPluginInfo(e).name,this.properties.common_extversion=e.get(s.EditorAndPluginInfo).getEditorPluginInfo(e).version}extendWithConfigProperties(e){const t=(0,s.dumpConfig)(e);try{t["copilot.build"]=(0,s.getBuild)(e),t["copilot.buildType"]=(0,s.getBuildType)(e)}catch(e){}const r=e.get(h);r.trackingId&&(t["copilot.trackingId"]=r.trackingId),this.properties={...this.properties,...t}}extendWithRequestId(e){const t={completionId:e.completionId,created:e.created.toString(),headerRequestId:e.headerRequestId,serverExperiments:e.serverExperiments,deploymentId:e.deploymentId};this.properties={...this.properties,...t}}static maybeRemoveRepoInfoFromPropertiesHack(e,t){if(e)return t;const r={};for(const e in t)f.keysToRemoveFromStandardTelemetryHack.includes(e)||(r[e]=t[e]);return r}sanitizeKeys(){this.properties=f.sanitizeKeys(this.properties),this.measurements=f.sanitizeKeys(this.measurements)}static sanitizeKeys(e){e=e||{};const t={};for(const r in e)t[f.keysExemptedFromSanitization.includes(r)?r:r.replace(/\./g,"_")]=e[r];return t}updateTimeSinceIssuedAndDisplayed(){const e=m()-this.issuedTime;if(this.measurements.timeSinceIssuedMs=e,void 0!==this.displayedTime){const e=m()-this.displayedTime;this.measurements.timeSinceDisplayedMs=e}}validateData(e,t){let r;if(f.validateTelemetryProperties(this.properties)||(r={problem:"properties",error:JSON.stringify(f.validateTelemetryProperties.errors)}),!f.validateTelemetryMeasurements(this.measurements)){const e=JSON.stringify(f.validateTelemetryMeasurements.errors);void 0===r?r={problem:"measurements",error:e}:(r.problem="both",r.error+=`; ${e}`)}if(void 0===r)return!0;if((0,l.shouldFailForDebugPurposes)(e))throw new Error(`Invalid telemetry data: ${r.problem} ${r.error} properties=${JSON.stringify(this.properties)} measurements=${JSON.stringify(this.measurements)}`);return _(e,"invalidTelemetryData",f.createAndMarkAsIssued({properties:JSON.stringify(this.properties),measurements:JSON.stringify(this.measurements),problem:r.problem,validationError:r.error}),t),t&&_(e,"invalidTelemetryData_in_secure",f.createAndMarkAsIssued({problem:r.problem,requestId:this.properties.requestId??"unknown"}),!1),!1}async makeReadyForSending(e,t,r){this.extendWithConfigProperties(e),this.extendWithEditorAgnosticFields(e),this.sanitizeKeys(),"IncludeExp"===r&&await this.extendWithExpTelemetry(e),this.updateTimeSinceIssuedAndDisplayed(),this.validateData(e,t)||(this.properties.telemetry_failed_validation="true")}}function g(e,t,r,n){const i=t?e.get(p).getSecureReporter(e):e.get(p).getReporter(e);i&&i.sendTelemetryEvent(r,f.maybeRemoveRepoInfoFromPropertiesHack(t,n.properties),n.measurements)}function m(){return(new Date).getTime()}function y(e){return e.get(h).optedIn}async function v(e,t,r,n){if(n&&!y(e))return;const i=r||f.createAndMarkAsIssued({},{});await i.makeReadyForSending(e,n??!1,"IncludeExp"),g(e,n??!1,t,i)}async function _(e,t,r,n){if(n&&!y(e))return;const i=r||f.createAndMarkAsIssued({},{});await i.makeReadyForSending(e,n??!1,"IncludeExp"),function(e,t,r,n){const i=t?e.get(p).getSecureReporter(e):e.get(p).getReporter(e);i&&i.sendTelemetryErrorEvent(r,f.maybeRemoveRepoInfoFromPropertiesHack(t,n.properties),n.measurements)}(e,n??!1,t,i)}t.TelemetryData=f,f.ajv=new n.default({strictNumbers:!1}),f.validateTelemetryProperties=f.ajv.compile({type:"object",additionalProperties:{type:"string"},required:[]}),f.validateTelemetryMeasurements=f.ajv.compile({type:"object",properties:{meanLogProb:{type:"number",nullable:!0},meanAlternativeLogProb:{type:"number",nullable:!0}},additionalProperties:{type:"number"},required:[]}),f.keysExemptedFromSanitization=[c.ExpServiceTelemetryNames.assignmentContextTelemetryPropertyName,c.ExpServiceTelemetryNames.featuresTelemetryPropertyName],f.keysToRemoveFromStandardTelemetryHack=["gitRepoHost","gitRepoName","gitRepoOwner","gitRepoUrl","gitRepoPath","repo","request_option_nwo"],t.telemetrizePromptLength=function(e){return e.isFimEnabled?{promptPrefixCharLen:e.prefix.length,promptSuffixCharLen:e.suffix.length}:{promptCharLen:e.prefix.length}},t.now=m,t.TelemetryEndpointUrl=class{constructor(e="https://copilot-telemetry.githubusercontent.com/telemetry"){this.url=e}getUrl(){return this.url}setUrlForTesting(e){this.url=e}},t.telemetry=v,t.telemetryExpProblem=async function(e,t){const r=f.createAndMarkAsIssued(t,{});await r.makeReadyForSending(e,!1,"SkipExp"),g(e,!1,"expProblem",r)},t.telemetryRaw=async function(e,t,r,n){g(e,!1,t,{properties:r,measurements:n})},t.telemetryException=async function(e,t,r,n){const i=t instanceof Error?t:new Error("Non-error thrown: "+t),o=y(e),s=f.createAndMarkAsIssued({origin:(0,d.redactPaths)(r),reason:o?"Exception logged to restricted telemetry":"Exception, not logged due to opt-out",...n});if(await s.makeReadyForSending(e,!1,"IncludeExp"),g(e,!1,"exception",s),!o)return;const a=f.createAndMarkAsIssued({origin:r,...n});await a.makeReadyForSending(e,!0,"IncludeExp"),function(e,t,r,n){const i=e.get(p).getSecureReporter(e);i&&i.sendTelemetryException(r,f.maybeRemoveRepoInfoFromPropertiesHack(true,n.properties),n.measurements)}(e,0,i,a)},t.telemetryError=_,t.logEngineCompletion=async function(e,t,r,n,i){const o=f.createAndMarkAsIssued({completionTextJson:JSON.stringify(t),choiceIndex:i.toString()});if(r.logprobs)for(const[e,t]of Object.entries(r.logprobs))o.properties["logprobs_"+e]=JSON.stringify(t)??"unset";o.extendWithRequestId(n),await v(e,"engine.completion",o,!0)},t.logEnginePrompt=async function(e,t,r){let n;n=t.isFimEnabled?{promptPrefixJson:JSON.stringify(t.prefix),promptSuffixJson:JSON.stringify(t.suffix),promptElementRanges:JSON.stringify(t.promptElementRanges)}:{promptJson:JSON.stringify(t.prefix),promptElementRanges:JSON.stringify(t.promptElementRanges)};const i=r.extendedBy(n);await v(e,"engine.prompt",i,!0)}},89531:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.forceSendingTelemetry=t.hackOptOutListener=t.setupStandardReporters=t.APP_INSIGHTS_KEY_SECURE=t.APP_INSIGHTS_KEY=void 0;const n=r(29929),i=r(39800),o=r(65489);function s(e,t,r,i){const o=new n.default(t,r,i);return c(e,o),o}function a(e,t,r){if(r){const n=r;n.userOptIn=!0,n.createAppInsightsClient(t),c(e,r)}}function c(e,t){const r=t;if(r.appInsightsClient){const t=r.appInsightsClient.commonProperties,n=o.TelemetryData.sanitizeKeys(t);r.appInsightsClient.commonProperties=n,r.appInsightsClient.context.tags[r.appInsightsClient.context.keys.cloudRoleInstance]="REDACTED";const i=e.get(o.TelemetryEndpointUrl).getUrl();r.appInsightsClient.config.endpointUrl=i}}t.APP_INSIGHTS_KEY="7d7048df-6dd0-4048-bb23-b716c1461f8f",t.APP_INSIGHTS_KEY_SECURE="3fdd7f28-937a-48c8-9a21-ba337db23bd1",t.setupStandardReporters=function(e,r){const n=(0,i.getVersion)(e),a=s(e,r,n,t.APP_INSIGHTS_KEY),c=s(e,r,n,t.APP_INSIGHTS_KEY_SECURE),l=e.get(o.TelemetryReporters);l.setReporter(a),l.setSecureReporter(c)},t.hackOptOutListener=function(e){const t=e.get(o.TelemetryReporters);t.getReporter(e).optOutListener={dispose(){}},t.getSecureReporter(e).optOutListener={dispose(){}}},t.forceSendingTelemetry=function(e){const r=e.get(o.TelemetryReporters);try{a(e,t.APP_INSIGHTS_KEY,r.getReporter(e)),a(e,t.APP_INSIGHTS_KEY_SECURE,r.getSecureReporter(e))}catch(e){}}},72406:(e,t)=>{"use strict";function r(e){return e.replace(/\s/g,"")}Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeNewlines=t.asReadableCert=void 0,t.asReadableCert=function(e){const t=e.indexOf("-----BEGIN CERTIFICATE-----")+27,n=e.indexOf("-----END CERTIFICATE-----");return r(e.substring(t,t+30)+"..."+e.substring(n-30,n-1))},t.normalizeNewlines=r},4630:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LibTestsEditorInfo=t.createLibTestingContext=t.setupTestingContext=t.setupTestingContextNoTelemetry=t.setupTestingContextNoTelemetryNoLog=t.setupTestingContextNoTelemetryNoLogNoNotifications=void 0;const n=r(44617),i=r(57147),o=r(40084),s=r(32137),a=r(39800),c=r(75611),l=r(16905),u=r(66046),d=r(96817),p=r(54619),h=r(5798),f=r(15291),g=r(57158),m=r(20039),y=r(69035),v=r(65489),_=r(89531),b=r(52369),w=r(70819),C=r(84567),E=r(82161),T=r(20913),S=r(66584),x=r(35095),k=r(80751);function I(e){e.set(a.BuildInfo,new a.BuildInfo),e.set(T.RuntimeMode,T.RuntimeMode.fromEnvironment(!0)),e.set(f.RootCertificateReader,(0,E.createTestCertificateReader)([])),e.set(m.Fetcher,new g.HelixFetcher(e)),e.set(h.LogVerbose,new h.LogVerbose(!1)),e.set(s.Clock,new s.Clock),e.set(u.ExpConfigMaker,new u.ExpConfigNone),e.set(p.GhostTextDebounceManager,new p.GhostTextDebounceManager),e.set(d.ContextualFilterManager,new d.ContextualFilterManager),e.set(o.CopilotTokenNotifier,new o.CopilotTokenNotifier),e.set(v.TelemetryUserConfig,new v.TelemetryUserConfig(e,"tid=test",!0)),e.set(x.TestProductFeatures,new x.TestProductFeatures(e)),e.set(v.TelemetryReporters,new v.TelemetryReporters)}function A(e){I(e),e.set(y.NotificationSender,new S.TestNotificationSender),e.set(C.UrlOpener,new S.TestUrlOpener)}function P(e){A(e),e.set(h.LogTarget,new h.ConsoleLog(console))}function R(e){P(e),e.set(v.TelemetryEndpointUrl,new v.TelemetryEndpointUrl),(0,_.setupStandardReporters)(e,"copilot-test"),e.set(l.Features,new l.Features(e))}t.setupTestingContextNoTelemetryNoLogNoNotifications=I,t.setupTestingContextNoTelemetryNoLog=A,t.setupTestingContextNoTelemetry=P,t.setupTestingContext=R,t.createLibTestingContext=function(){const e=new c.Context;return e.set(a.ConfigProvider,new a.DefaultsOnlyConfigProvider),R(e),e.set(a.EditorAndPluginInfo,new N),e.set(n.FileSystem,O),e.set(w.TextDocumentManager,new k.TestTextDocumentManager),e.set(b.LocationFactory,new k.TestLocationFactory),e};class N extends a.EditorAndPluginInfo{getEditorInfo(e){return{name:"lib-tests-editor",version:"1"}}getEditorPluginInfo(e){return{name:"lib-tests-plugin",version:"2"}}}t.LibTestsEditorInfo=N;const O={readFile:function(e){return i.promises.readFile(e)},mtime:async function(e){return(await i.promises.stat(e)).mtimeMs},stat:async function(e){const t=await i.promises.stat(e);return{ctime:t.ctimeMs,mtime:t.mtimeMs,size:t.size}}}},45922:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.readTestingGitHubToken=t.getTestingCopilotTokenManager=void 0;const n=r(57147),i=r(35765),o=`${process.env.HOME}/.copilot-testing-gh-token`;let s;t.getTestingCopilotTokenManager=function(){return s||(s=a()),s};const a=()=>{const e=c();if(e)return new i.CopilotTokenManagerFromGitHubToken({token:e});if(process.env.GH_COPILOT_TOKEN)return new i.FixedCopilotTokenManager(process.env.GH_COPILOT_TOKEN);if(process.env.GITHUB_TOKEN)return new i.CopilotTokenManagerFromGitHubToken({token:process.env.GITHUB_TOKEN});throw new Error(`Tests: either GH_COPILOT_TOKEN, or GITHUB_TOKEN, must be set, or there must be a GitHub token from an app with access to Copilot in ${o}. Run "npm run get_token" to get one.`)};function c(){if(n.existsSync(o))return n.readFileSync(o).toString()}t.readTestingGitHubToken=c},82161:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createFakeStreamResponse=t.createFakeResponse=t.createTestCertificateReader=void 0;const n=r(12781),i=r(20039),o=r(15291);class s extends o.RootCertificateReader{constructor(e){super(),this.certificates=e}async getAllRootCAs(){return this.certificates}}t.createTestCertificateReader=e=>new s(e),t.createFakeResponse=function(e,t="body"){return new i.Response(e,"status text",new a,(()=>Promise.resolve("response-text")),(()=>Promise.resolve(t)),(async()=>null))},t.createFakeStreamResponse=function(e){return new i.Response(200,"Success",new a,(async()=>e),(async()=>null),(async()=>function(...e){const t=new n.Readable;t._read=()=>{};for(const r of e)t.push(r);return t.push(null),t}(e)))};class a{constructor(){this.headers=new Map}append(e,t){this.headers.set(e,t)}delete(e){this.headers.delete(e)}get(e){return this.headers.get(e)??null}has(e){return this.headers.has(e)}set(e,t){this.headers.set(e,t)}entries(){return this.headers.entries()}keys(){return this.headers.keys()}values(){return this.headers.values()}[Symbol.iterator](){return this.headers.entries()}}},20913:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isVerboseLoggingEnabled=t.isDebugEnabled=t.shouldFailForDebugPurposes=t.isRunningInTest=t.RuntimeMode=void 0;class r{constructor(e){this.flags=e}static fromEnvironment(e){return new r({debug:(t=process.argv,n=process.env,t.includes("--debug")||"true"===n.GITHUB_COPILOT_DEBUG?.toLowerCase()),verboseLogging:i(process.env),testMode:e,recordInput:o(process.argv,process.env)});var t,n}}function n(e){return e.get(r).flags.testMode}function i(e){if("COPILOT_AGENT_VERBOSE"in e){const t=e.COPILOT_AGENT_VERBOSE;return"1"===t||"true"===t}return!1}function o(e,t){return e.includes("--record")||"true"===t.GITHUB_COPILOT_RECORD?.toLowerCase()}t.RuntimeMode=r,t.isRunningInTest=n,t.shouldFailForDebugPurposes=function(e){return n(e)},t.isDebugEnabled=function(e){return e.get(r).flags.debug},t.isVerboseLoggingEnabled=function(e){return e.get(r).flags.verboseLogging}},96712:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FailingTelemetryReporer=t.assertHasProperty=t.withTelemetryCapture=t.allEvents=t.isException=t.isEvent=t.isRestrictedTelemetryMessage=t.isStandardTelemetryMessage=t.startFakeTelemetryServerIfNecessary=t.collectCapturedTelemetry=void 0;const n=r(39491),i=r(71017),o=r(71267),s=r(75611),a=r(20039),c=r(65489),l=r(89531);async function u(e){const t=e.get(c.TelemetryEndpointUrl).getUrl(),r=await e.get(a.Fetcher).fetch(t,{}),i=(await r.json()).messages??[];for(const e of i)n.strictEqual(e.tags["ai.cloud.roleInstance"],"REDACTED");return i}let d;async function p(){void 0===d&&(d=new o.Worker((0,i.resolve)(__dirname,"..","dist","telemetryFake.js")),await new Promise((e=>setTimeout(e,1e3))))}function h(e){return"EventData"===e.data.baseType}t.collectCapturedTelemetry=u,t.startFakeTelemetryServerIfNecessary=p,t.isStandardTelemetryMessage=function(e){return e.iKey===l.APP_INSIGHTS_KEY},t.isRestrictedTelemetryMessage=function(e){return e.iKey===l.APP_INSIGHTS_KEY_SECURE},t.isEvent=h,t.isException=function(e){return"ExceptionData"===e.data.baseType},t.allEvents=function(e){for(const t of e)if(!h(t))return!1;return!0},t.withTelemetryCapture=async function(e,t,r,n){await p();const i=new s.Context(e),o=Math.floor(1e5*Math.random()).toString();delete process.env.http_proxy,delete process.env.https_proxy;const a=i.get(c.TelemetryEndpointUrl).getUrl();i.get(c.TelemetryEndpointUrl).setUrlForTesting(`http://localhost:5786/${o}`),(0,l.setupStandardReporters)(i,t),r&&(0,l.forceSendingTelemetry)(i);try{(0,l.hackOptOutListener)(e);const t=await n(i);return await new Promise((e=>setTimeout(e,2e3))),await i.get(c.TelemetryReporters).deactivate(),await new Promise((e=>setTimeout(e,100))),[await u(i),t]}finally{i.get(c.TelemetryEndpointUrl).setUrlForTesting(a)}},t.assertHasProperty=function(e,t){n.ok(e.filter((e=>"ghostText.produced"!==e.data.baseData.name.split("/")[1])).every((e=>{const r=e.data.baseData.properties;return t.call(r,r)})))},t.FailingTelemetryReporer=class{sendTelemetryEvent(e,t,r){throw new Error("Telemetry disabled")}sendTelemetryErrorEvent(e,t,r,n){throw new Error("Telemetry disabled")}sendTelemetryException(e,t,r){throw new Error("Telemetry disabled")}dispose(){return Promise.resolve()}}},66584:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestNotificationSender=t.TestUrlOpener=t.rangeToString=t.positionToString=void 0;const n=r(69035);function i(e){return`${e.line}:${e.character}`}t.positionToString=i,t.rangeToString=function(e){return`[${i(e.start)}--${i(e.end)}]`},t.TestUrlOpener=class{constructor(){this.openedUrls=[]}open(e){this.openedUrls.push(e)}};class o extends n.NotificationSender{constructor(){super(),this.sentMessages=[],this.warningPromises=[]}showWarningMessage(e,...t){this.sentMessages.push(e);const r=t?Promise.resolve(t[0]):Promise.resolve(void 0);return this.warningPromises.push(r),r}async waitForWarningMessages(){await Promise.all(this.warningPromises)}}t.TestNotificationSender=o},35095:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestProductFeatures=t.ProductFeature=void 0;const n=r(35765),i=r(40084);(t.ProductFeature||(t.ProductFeature={})).selfSignedCerts="ssc",t.TestProductFeatures=class{constructor(e){this.ctx=e,this.token=new n.CopilotToken("token"),e.get(i.CopilotTokenNotifier).on("onCopilotToken",(e=>{this.token=e}))}enable(e){if("1"!==this.token.getTokenValue(e)){const t=`${this.token.token};${e}=1`;this.ctx.get(i.CopilotTokenNotifier).emit("onCopilotToken",new n.CopilotToken(t,this.token.organization_list))}return this}disable(e){if("1"===this.token.getTokenValue(e)){const t=this.token.token.replace(";"+e+"=1","").replace(e+"=1","");this.ctx.get(i.CopilotTokenNotifier).emit("onCopilotToken",new n.CopilotToken(t,this.token.organization_list))}return this}}},80751:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestLocationFactory=t.TestTextDocumentManager=t.InMemoryTextDocument=void 0;const n=r(54086);class i{constructor(e,t,r,i,o){this._uri=e,this._textDocument=n.TextDocument.create(e.toString(),t,r,i),this._relativePath=o}get uri(){return this._uri}get relativePath(){return this._relativePath}get fileName(){return this._uri.fsPath}get languageId(){return this._textDocument.languageId}get version(){return this._textDocument.version}get lineCount(){return this._textDocument.lineCount}getText(e){return this._textDocument.getText(e)}positionAt(e){return this._textDocument.positionAt(e)}offsetAt(e){return this._textDocument.offsetAt(e)}lineAt(e){const t="number"==typeof e?e:e.line,r=this.getText().split("\n")[t],n={start:{line:t,character:0},end:{line:t,character:r.length}},i=0===r.trim().length;return{text:r,range:n,isEmptyOrWhitespace:i}}getWordRangeAtPosition(e){}update(e,t){n.TextDocument.update(this._textDocument,e,t)}}t.InMemoryTextDocument=i,t.TestTextDocumentManager=class{constructor(){this._textDocuments=[],this.onDidFocusTextDocument=()=>({dispose:()=>{}}),this.onDidChangeTextDocument=()=>({dispose:()=>{}}),this.onDidChangeCursor=()=>({dispose:()=>{}})}get textDocuments(){return this._textDocuments}async getTextDocument(e){return this.textDocuments.find((t=>t.uri.toString()==e.toString()))}async getRelativePath(e){}setTextDocument(e,t,r){this._textDocuments.push(new i(e,t,0,r))}findNotebook(e){}},t.TestLocationFactory=class{position(e,t){return{line:e,character:t}}range(e,t,r,n){return"number"==typeof e?{start:{line:e,character:t},end:{line:r,character:n}}:{start:e,end:t}}}},52369:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LocationFactory=void 0,t.LocationFactory=class{}},70819:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextDocumentManager=t.getRelativePath=void 0;const n=r(71017);t.getRelativePath=function(e,t){for(const r of e){const e=r.fsPath;if(t.startsWith(e+n.sep))return n.relative(e,t)}},t.TextDocumentManager=class{}},84567:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RealUrlOpener=t.UrlOpener=void 0;const n=r(31814);t.UrlOpener=class{},t.RealUrlOpener=class{async open(e){await n(e)}}},59591:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.redactPaths=void 0,t.redactPaths=function(e){return e.replace(/([\s|(]|file:\/\/)(\/[^\s]+)/g,"$1[redacted]").replace(/([\s|(]|file:\/\/)([a-zA-Z]:[(\\|/){1,2}][^\s]+)/gi,"$1[redacted]").replace(/([\s|(]|file:\/\/)(\\[^\s]+)/gi,"$1[redacted]")}},65614:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultFileSystem=t.FileSystem=void 0;const n=r(57147);t.FileSystem=class{},t.defaultFileSystem={readFile:e=>n.promises.readFile(e),mtime:async e=>(await n.promises.stat(e)).mtimeMs,async stat(e){const t=await n.promises.stat(e);return{ctime:t.ctimeMs,mtime:t.mtimeMs,size:t.size}}}},34990:(e,t)=>{"use strict";function r(e){return"virtual"===e.type}function n(e){return"top"===e.type}Object.defineProperty(t,"__esModule",{value:!0}),t.duplicateTree=t.cutTreeAfterLine=t.isTop=t.isVirtual=t.isLine=t.isBlank=t.topNode=t.blankNode=t.lineNode=t.virtualNode=void 0,t.virtualNode=function(e,t,r){return{type:"virtual",indentation:e,subs:t,label:r}},t.lineNode=function(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}},t.blankNode=function(e){return{type:"blank",lineNumber:e,subs:[]}},t.topNode=function(e){return{type:"top",indentation:-1,subs:e??[]}},t.isBlank=function(e){return"blank"===e.type},t.isLine=function(e){return"line"===e.type},t.isVirtual=r,t.isTop=n,t.cutTreeAfterLine=function(e,t){!function e(i){if(!r(i)&&!n(i)&&i.lineNumber===t)return i.subs=[],!0;for(let t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.lastLineOf=t.firstLineOf=t.encodeTree=t.describeTree=t.deparseAndCutTree=t.deparseTree=t.deparseLine=void 0;const n=r(34990),i=r(72890);function o(e){return" ".repeat(e.indentation)+e.sourceLine+"\n"}function s(e){return(0,i.foldTree)(e,"",(function(e,t){let r="";return(0,n.isLine)(e)?r=o(e):(0,n.isBlank)(e)&&(r="\n"),t+r}),"topDown")}t.deparseLine=o,t.deparseTree=s,t.deparseAndCutTree=function(e,t){const r=new Set(t),i=[];let a="";return function e(t){void 0!==t.label&&r.has(t.label)?(""!==a&&i.push({label:void 0,source:a}),i.push({label:t.label,source:s(t)}),a=""):((0,n.isLine)(t)&&(a+=o(t)),t.subs.forEach(e))}(e),""!==a&&i.push({label:void 0,source:a}),i},t.describeTree=function e(t,r=0){const i=" ".repeat(r);if(void 0===t)return"UNDEFINED NODE";let o;o=void 0===t.subs?"UNDEFINED SUBS":t.subs.map((t=>e(t,r+2))).join(",\n"),o=""===o?"[]":`[\n${o}\n ${i}]`;const s=((0,n.isVirtual)(t)||(0,n.isTop)(t)?" ":String(t.lineNumber).padStart(3," "))+`: ${i}`,a=void 0===t.label?"":JSON.stringify(t.label);return(0,n.isVirtual)(t)||(0,n.isTop)(t)?`${s}vnode(${t.indentation}, ${a}, ${o})`:(0,n.isBlank)(t)?`${s}blank(${a??""})`:`${s}lnode(${t.indentation}, ${a}, ${JSON.stringify(t.sourceLine)}, ${o})`},t.encodeTree=function e(t,r=""){const i=void 0===t.label?"":`, ${JSON.stringify(t.label)}`,o=!(0,n.isBlank)(t)&&t.subs.length>0?`[\n${t.subs.map((t=>e(t,r+" "))).join(", \n")}\n${r}]`:"[]";switch(t.type){case"blank":return`${r}blankNode(${t.lineNumber}${i})`;case"top":return`topNode(${o}${i})`;case"virtual":return`${r}virtualNode(${t.indentation}, ${o}${i})`;case"line":return`${r}lineNode(${t.indentation}, ${t.lineNumber}, "${t.sourceLine}", ${o}${i})`}},t.firstLineOf=function e(t){if((0,n.isLine)(t)||(0,n.isBlank)(t))return t.lineNumber;for(const r of t.subs){const t=e(r);if(void 0!==t)return t}},t.lastLineOf=function e(t){let r,i=t.subs.length-1;for(;i>=0&&void 0===r;)r=e(t.subs[i]),i--;return void 0!==r||(0,n.isVirtual)(t)||(0,n.isTop)(t)?r:t.lineNumber}},16468:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0});const o=r(77651),s=r(53105),a=r(12563);(0,a.registerLanguageSpecificParser)("markdown",s.processMarkdown),(0,a.registerLanguageSpecificParser)("java",o.processJava),i(r(34990),t),i(r(40842),t),i(r(72890),t),i(r(12563),t),i(r(64505),t)},77651:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.processJava=void 0;const n=r(34990),i=r(72890),o=r(12563),s=(0,o.buildLabelRules)({package:/^package /,import:/^import /,class:/\bclass /,interface:/\binterface /,javadoc:/^\/\*\*/,comment_multi:/^\/\*[^*]/,comment_single:/^\/\//,annotation:/^@/,opener:/^[\[({]/,closer:/^[\])}]/});t.processJava=function(e){let t=e;return(0,o.labelLines)(t,s),t=(0,o.combineClosersAndOpeners)(t),t=(0,o.flattenVirtual)(t),(0,o.labelVirtualInherited)(t),(0,i.visitTree)(t,(e=>{if("class"===e.label||"interface"===e.label)for(const t of e.subs)(0,n.isBlank)(t)||void 0!==t.label&&"annotation"!==t.label||(t.label="member")}),"bottomUp"),t}},72890:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.rebuildTree=t.foldTree=t.visitTreeConditionally=t.visitTree=t.resetLineNumbers=t.mapLabels=t.clearLabelsIf=t.clearLabels=void 0;const n=r(34990);function i(e,t,r){!function e(n){"topDown"===r&&t(n),n.subs.forEach((t=>{e(t)})),"bottomUp"===r&&t(n)}(e)}t.clearLabels=function(e){return i(e,(e=>{e.label=void 0}),"bottomUp"),e},t.clearLabelsIf=function(e,t){return i(e,(e=>{e.label=e.label?t(e.label)?void 0:e.label:void 0}),"bottomUp"),e},t.mapLabels=function e(t,r){switch(t.type){case"line":case"virtual":const n=t.subs.map((t=>e(t,r)));return{...t,subs:n,label:t.label?r(t.label):void 0};case"blank":return{...t,label:t.label?r(t.label):void 0};case"top":return{...t,subs:t.subs.map((t=>e(t,r))),label:t.label?r(t.label):void 0}}},t.resetLineNumbers=function(e){let t=0;i(e,(function(e){(0,n.isVirtual)(e)||(0,n.isTop)(e)||(e.lineNumber=t,t++)}),"topDown")},t.visitTree=i,t.visitTreeConditionally=function(e,t,r){!function e(n){if("topDown"===r&&!t(n))return!1;let i=!0;return n.subs.forEach((t=>{i=i&&e(t)})),"bottomUp"===r&&(i=i&&t(n)),i}(e)},t.foldTree=function(e,t,r,n){let o=t;return i(e,(function(e){o=r(e,o)}),n),o},t.rebuildTree=function(e,t,r){const i=e=>{if(void 0!==r&&r(e))return e;{const r=e.subs.map(i).filter((e=>void 0!==e));return e.subs=r,t(e)}},o=i(e);return void 0!==o?o:(0,n.topNode)()}},53105:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.processMarkdown=void 0;const n=r(34990),i=r(12563),o=(0,i.buildLabelRules)({heading:/^# /,subheading:/^## /,subsubheading:/### /});t.processMarkdown=function(e){let t=e;if((0,i.labelLines)(t,o),(0,n.isBlank)(t))return t;function r(e){return"heading"===e.label?1:"subheading"===e.label?2:"subsubheading"===e.label?3:void 0}let s=[t],a=[...t.subs];t.subs=[];for(const e of a){const t=r(e);if(void 0===t||(0,n.isBlank)(e))s[s.length-1].subs.push(e);else{for(;s.lengtht+1;)s.pop()}}return t=(0,i.groupBlocks)(t),t=(0,i.flattenVirtual)(t),(0,i.labelVirtualInherited)(t),t}},12563:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseTree=t.registerLanguageSpecificParser=t.flattenVirtual=t.groupBlocks=t.combineClosersAndOpeners=t.buildLabelRules=t.labelVirtualInherited=t.labelLines=t.parseRaw=void 0;const n=r(34990),i=r(72890);function o(e){const t=e.split("\n"),r=t.map((e=>e.match(/^\s*/)[0].length)),i=t.map((e=>e.trimLeft()));function o(e){const[t,o]=s(e+1,r[e]);return[(0,n.lineNode)(r[e],e,i[e],t),o]}function s(e,t){let s;const a=[];let c,l=e;for(;lt);)if(""===i[l])void 0===c&&(c=l),l+=1;else{if(void 0!==c){for(let e=c;et.matches(e.sourceLine)));r&&(e.label=r.label)}}),"bottomUp")}function a(e){return Object.keys(e).map((t=>{let r;return r=e[t].test?r=>e[t].test(r):e[t],{matches:r,label:t}}))}function c(e){const t=(0,i.rebuildTree)(e,(function(e){if(0===e.subs.length||-1===e.subs.findIndex((e=>"closer"===e.label||"opener"===e.label)))return e;const t=[];let r;for(let i=0;is.subs.push(e))),o.subs=[];else if("closer"===o.label&&void 0!==r&&((0,n.isLine)(o)||(0,n.isVirtual)(o))&&o.indentation>=r.indentation){let e=t.length-1;for(;e>0&&(0,n.isBlank)(t[e]);)e-=1;if(r.subs.push(...t.splice(e+1)),o.subs.length>0){const e=r.subs.findIndex((e=>"newVirtual"!==e.label)),t=r.subs.slice(0,e),i=r.subs.slice(e),s=i.length>0?[(0,n.virtualNode)(o.indentation,i,"newVirtual")]:[];r.subs=[...t,...s,o]}else r.subs.push(o)}else t.push(o),(0,n.isBlank)(o)||(r=o)}return e.subs=t,e}));return(0,i.clearLabelsIf)(e,(e=>"newVirtual"===e)),t}t.parseRaw=o,t.labelLines=s,t.labelVirtualInherited=function(e){(0,i.visitTree)(e,(function(e){if((0,n.isVirtual)(e)&&void 0===e.label){const t=e.subs.filter((e=>!(0,n.isBlank)(e)));1===t.length&&(e.label=t[0].label)}}),"bottomUp")},t.buildLabelRules=a,t.combineClosersAndOpeners=c,t.groupBlocks=function(e,t=n.isBlank,r){return(0,i.rebuildTree)(e,(function(e){if(e.subs.length<=1)return e;const i=[];let o,s=[],a=!1;function c(e=!1){if(void 0!==o&&(i.length>0||!e)){const e=(0,n.virtualNode)(o,s,r);i.push(e)}else s.forEach((e=>i.push(e)))}for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getWindowsDelineations=void 0;const n=r(12563),i=r(72890);t.getWindowsDelineations=function(e,t,r,o){if(e.length{if("blank"===e.type)return void(e.label={totalLength:1,firstLineAfter:e.lineNumber+1});let t="line"===e.type?1:0,n="line"===e.type?e.lineNumber+1:NaN;function i(r){return-1==r?n-t:e.subs[r].label.firstLineAfter-e.subs[r].label.totalLength}function a(t,r){return 0==t?r+1:e.subs[t-1].label.firstLineAfter}let c="line"===e.type?-1:0,l="line"===e.type?1:0,u=0;for(let d=0;d=0&&co){const t=i(c),n=a(d,t),p=u==d?n:a(u,t);for(r<=n-t&&s.push([t,p]);l>o;)l-=-1==c?"line"==e.type?1:0:e.subs[c].label.totalLength,c++}}if(ce[0]-t[0]||e[1]-t[1])).filter(((e,t,r)=>0==t||e[0]!=r[t-1][0]||e[1]!=r[t-1][1]))}},23272:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPathMarker=t.getLanguageMarker=t.comment=t.hasLanguageMarker=t.languageCommentMarkers=void 0,t.languageCommentMarkers={abap:{start:'"',end:""},bat:{start:"REM",end:""},bibtex:{start:"%",end:""},blade:{start:"#",end:""},c:{start:"//",end:""},clojure:{start:";",end:""},coffeescript:{start:"//",end:""},cpp:{start:"//",end:""},csharp:{start:"//",end:""},css:{start:"/*",end:"*/"},dart:{start:"//",end:""},dockerfile:{start:"#",end:""},elixir:{start:"#",end:""},erb:{start:"<%#",end:"%>"},erlang:{start:"%",end:""},fsharp:{start:"//",end:""},go:{start:"//",end:""},groovy:{start:"//",end:""},haml:{start:"-#",end:""},handlebars:{start:"{{!",end:"}}"},haskell:{start:"--",end:""},html:{start:"\x3c!--",end:"--\x3e"},ini:{start:";",end:""},java:{start:"//",end:""},javascript:{start:"//",end:""},javascriptreact:{start:"//",end:""},jsonc:{start:"//",end:""},jsx:{start:"//",end:""},julia:{start:"#",end:""},kotlin:{start:"//",end:""},latex:{start:"%",end:""},less:{start:"//",end:""},lua:{start:"--",end:""},makefile:{start:"#",end:""},markdown:{start:"[]: #",end:""},"objective-c":{start:"//",end:""},"objective-cpp":{start:"//",end:""},perl:{start:"#",end:""},php:{start:"//",end:""},powershell:{start:"#",end:""},pug:{start:"//",end:""},python:{start:"#",end:""},ql:{start:"//",end:""},r:{start:"#",end:""},razor:{start:"\x3c!--",end:"--\x3e"},ruby:{start:"#",end:""},rust:{start:"//",end:""},sass:{start:"//",end:""},scala:{start:"//",end:""},scss:{start:"//",end:""},shellscript:{start:"#",end:""},slim:{start:"/",end:""},solidity:{start:"//",end:""},sql:{start:"--",end:""},stylus:{start:"//",end:""},svelte:{start:"\x3c!--",end:"--\x3e"},swift:{start:"//",end:""},terraform:{start:"#",end:""},tex:{start:"%",end:""},typescript:{start:"//",end:""},typescriptreact:{start:"//",end:""},vb:{start:"'",end:""},verilog:{start:"//",end:""},"vue-html":{start:"\x3c!--",end:"--\x3e"},vue:{start:"//",end:""},xml:{start:"\x3c!--",end:"--\x3e"},xsl:{start:"\x3c!--",end:"--\x3e"},yaml:{start:"#",end:""}};const r=["php","plaintext"],n={html:"",python:"#!/usr/bin/env python3",ruby:"#!/usr/bin/env ruby",shellscript:"#!/bin/sh",yaml:"# YAML data"};function i({source:e}){return e.startsWith("#!")||e.startsWith("{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extractLocalImportContext=t.getDocComment=void 0;const n=r(71017),i=r(42133);function o(e,t){let r=t.namedChild(1)?.text.slice(1,-1);if(!r||!r.startsWith("."))return null;if(""===(0,n.extname)(r))r+=".ts";else if(".ts"!==(0,n.extname)(r))return null;return(0,n.join)((0,n.dirname)(e),r)}function s(e){let t=[];if("import_clause"===e.namedChild(0)?.type){let r=e.namedChild(0);if("named_imports"===r?.namedChild(0)?.type){let e=r.namedChild(0);for(let r of e?.namedChildren??[])if("import_specifier"===r.type){const e=r.childForFieldName("name")?.text;if(e){const n=r.childForFieldName("alias")?.text;t.push({name:e,alias:n})}}}}return t}const a=new Map;function c(e,t){let r=t?.childForFieldName("name")?.text??"";switch(t?.type){case"ambient_declaration":return c(e,t.namedChild(0));case"interface_declaration":case"enum_declaration":case"type_alias_declaration":return{name:r,decl:t.text};case"function_declaration":case"function_signature":return{name:r,decl:l(e,t)};case"class_declaration":{let n=function(e,t){let r=t.childForFieldName("body");if(r)return r.namedChildren.map((t=>d(e,t))).filter((e=>e))}(e,t),i="";if(n){let r=t.childForFieldName("body");i=`declare ${e.substring(t.startIndex,r.startIndex+1)}`,i+=n.map((e=>"\n"+e)).join(""),i+="\n}"}return{name:r,decl:i}}}return{name:r,decl:""}}function l(e,t){const r=t.childForFieldName("return_type")?.endIndex??t.childForFieldName("parameters")?.endIndex;if(void 0!==r){let n=e.substring(t.startIndex,r)+";";return"function_declaration"===t.type||"function_signature"===t.type?"declare "+n:n}return""}function u(e,t){const r=(0,i.getFirstPrecedingComment)(t);return r?e.substring(r.startIndex,t.startIndex):""}function d(e,t){if("accessibility_modifier"===t?.firstChild?.type&&"private"===t.firstChild.text)return"";const r=function(e,t){let r=t.startIndex-1;for(;r>=0&&(" "===e[r]||"\t"===e[r]);)r--;if(r<0||"\n"===e[r])return e.substring(r+1,t.startIndex)}(e,(0,i.getFirstPrecedingComment)(t)??t)??" ",n=u(e,t);switch(t.type){case"ambient_declaration":const i=t.namedChild(0);return i?r+n+d(e,i):"";case"method_definition":case"method_signature":return r+n+l(e,t);case"public_field_definition":{let i=t.childForFieldName("type")?.endIndex??t.childForFieldName("name")?.endIndex;if(void 0!==i)return r+n+e.substring(t.startIndex,i)+";"}}return""}async function p(e,t,r){let n=new Map,o=-1;try{o=await r.mtime(e)}catch{return n}let s=a.get(e);if(s&&s.mtime===o)return s.exports;if("typescript"===t){let o=null;try{let s=(await r.readFile(e)).toString();o=await(0,i.parseTreeSitter)(t,s);for(let e of(0,i.queryExports)(t,o.rootNode))for(let t of e.captures){let e=t.node;if("export_statement"===e.type){let t=e.childForFieldName("declaration");if(t?.hasError())continue;let{name:r,decl:i}=c(s,t);if(r){i=u(s,e)+i;let t=n.get(r);t||(t=[],n.set(r,t)),t.push(i)}}}}catch{}finally{o&&o.delete()}}if(a.size>2e3)for(let e of a.keys())if(a.delete(e),n.size<=1e3)break;return a.set(e,{mtime:o,exports:n}),n}t.getDocComment=u;const h=/^\s*import\s*(type|)\s*\{[^}]*\}\s*from\s*['"]\./gm;t.extractLocalImportContext=async function(e,t){let{source:r,uri:n,languageId:a}=e;return t&&"typescript"===a?async function(e,t,r){let n="typescript",a=[];const c=function(e){let t,r=-1;h.lastIndex=-1;do{t=h.exec(e),t&&(r=h.lastIndex+t.length)}while(t);if(-1===r)return-1;const n=e.indexOf("\n",r);return-1!==n?n:e.length}(e);if(-1===c)return a;e=e.substring(0,c);let l=await(0,i.parseTreeSitter)(n,e);try{for(let e of function(e){let t=[];for(let r of e.namedChildren)"import_statement"===r.type&&t.push(r);return t}(l.rootNode)){let i=o(t,e);if(!i)continue;let c=s(e);if(0===c.length)continue;let l=await p(i,n,r);for(let e of c)l.has(e.name)&&a.push(...l.get(e.name))}}finally{l.delete()}return a}(r,n,t):[]}},42133:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFunctionPositions=t.getFirstPrecedingComment=t.isFunctionDefinition=t.isFunction=t.getAncestorWithSiblingFunctions=t.queryPythonIsDocstring=t.queryGlobalVars=t.queryExports=t.queryImports=t.queryFunctions=t.getBlockCloseToken=t.parsesWithoutError=t.parseTreeSitter=t.getLanguage=t.languageIdToWasmLanguage=t.isSupportedLanguageId=t.WASMLanguage=void 0;const n=r(71017),i=r(37201),o=r(37201);var s;!function(e){e.Python="python",e.JavaScript="javascript",e.TypeScript="typescript",e.Go="go",e.Ruby="ruby"}(s=t.WASMLanguage||(t.WASMLanguage={}));const a={python:s.Python,javascript:s.JavaScript,javascriptreact:s.JavaScript,jsx:s.JavaScript,typescript:s.TypeScript,typescriptreact:s.TypeScript,go:s.Go,ruby:s.Ruby};function c(e){if(!(e in a))throw new Error(`Unrecognized language: ${e}`);return a[e]}t.isSupportedLanguageId=function(e){return e in a},t.languageIdToWasmLanguage=c;const l={python:[["(function_definition body: (block\n (expression_statement (string))? @docstring) @body) @function"],['(ERROR ("def" (identifier) (parameters))) @function']],javascript:[["[\n (function body: (statement_block) @body)\n (function_declaration body: (statement_block) @body)\n (generator_function body: (statement_block) @body)\n (generator_function_declaration body: (statement_block) @body)\n (method_definition body: (statement_block) @body)\n ] @function"]],typescript:[["[\n (function body: (statement_block) @body)\n (function_declaration body: (statement_block) @body)\n (generator_function body: (statement_block) @body)\n (generator_function_declaration body: (statement_block) @body)\n (method_definition body: (statement_block) @body)\n ] @function"]],go:[["[\n (function_declaration body: (block) @body)\n (method_declaration body: (block) @body)\n ] @function"]],ruby:[['[\n (method name: (_) parameters: (method_parameters)? @params [(_)+ "end"] @body)\n (singleton_method name: (_) parameters: (method_parameters)? @params [(_)+ "end"] @body)\n ] @function']]},u='(variable_declarator value: (call_expression function: ((identifier) @req (#eq? @req "require"))))',d=`\n (lexical_declaration ${u}+)\n (variable_declaration ${u}+)\n`,p={python:[["(module (future_import_statement) @import)"],["(module (import_statement) @import)"],["(module (import_from_statement) @import)"]],javascript:[[`(program [ ${d} ] @import)`],["(program [ (import_statement) ] @import)"]],typescript:[[`(program [ ${d} ] @import)`],["(program [ (import_statement) (import_alias) ] @import)"]],go:[],ruby:[]},h={python:[],javascript:[["(program (export_statement) @export)"]],typescript:[["(program (export_statement) @export)"]],go:[],ruby:[]},f={python:[["(module (global_statement) @globalVar)"],["(module (expression_statement) @globalVar)"]],javascript:[],typescript:[],go:[],ruby:[]},g={python:new Set(["function_definition"]),javascript:new Set(["function","function_declaration","generator_function","generator_function_declaration","method_definition","arrow_function"]),typescript:new Set(["function","function_declaration","generator_function","generator_function_declaration","method_definition","arrow_function"]),go:new Set(["function_declaration","method_declaration"]),ruby:new Set(["method","singleton_method"])},m={python:e=>"module"===e.type||"block"===e.type&&"class_definition"===e.parent?.type,javascript:e=>"program"===e.type||"class_body"===e.type,typescript:e=>"program"===e.type||"class_body"===e.type,go:e=>"source_file"===e.type,ruby:e=>"program"===e.type||"class"===e.type},y=new Map;async function v(e){const t=c(e);if(!y.has(t)){const e=await async function(e){await i.init();const t=(0,n.resolve)(__dirname,"..","dist",`tree-sitter-${e}.wasm`);return o.Language.load(t)}(t);y.set(t,e)}return y.get(t)}async function _(e,t){let r=await v(e);const n=new i;n.setLanguage(r);const o=n.parse(t);return n.delete(),o}function b(e,t){const r=[];for(const n of e){if(!n[1]){const e=t.tree.getLanguage();n[1]=e.query(n[0])}r.push(...n[1].matches(t))}return r}function w(e,t){return b(l[c(e)],t)}t.getLanguage=v,t.parseTreeSitter=_,t.parsesWithoutError=async function(e,t){const r=await _(e,t),n=!r.rootNode.hasError();return r.delete(),n},t.getBlockCloseToken=function(e){switch(c(e)){case s.Python:return null;case s.JavaScript:case s.TypeScript:case s.Go:return"}";case s.Ruby:return"end"}},t.queryFunctions=w,t.queryImports=function(e,t){return b(p[c(e)],t)},t.queryExports=function(e,t){return b(h[c(e)],t)},t.queryGlobalVars=function(e,t){return b(f[c(e)],t)};const C=["[\n (class_definition (block (expression_statement (string))))\n (function_definition (block (expression_statement (string))))\n]"];function E(e,t){return g[c(e)].has(t.type)}t.queryPythonIsDocstring=function(e){return 1==b([C],e).length},t.getAncestorWithSiblingFunctions=function(e,t){const r=m[c(e)];for(;t.parent;){if(r(t.parent))return t;t=t.parent}return t.parent?t:null},t.isFunction=E,t.isFunctionDefinition=function(e,t){switch(c(e)){case s.Python:case s.Go:case s.Ruby:return E(e,t);case s.JavaScript:case s.TypeScript:if("function_declaration"===t.type||"generator_function_declaration"===t.type||"method_definition"===t.type)return!0;if("lexical_declaration"===t.type||"variable_declaration"===t.type){if(t.namedChildCount>1)return!1;let r=t.namedChild(0);if(null==r)return!1;let n=r.namedChild(1);return null!==n&&E(e,n)}if("expression_statement"===t.type){let r=t.namedChild(0);if("assignment_expression"===r?.type){let t=r.namedChild(1);return null!==t&&E(e,t)}}return!1}},t.getFirstPrecedingComment=function(e){let t=e;for(;"comment"===t.previousSibling?.type;){let e=t.previousSibling;if(e.endPosition.row{const t=e.captures.find((e=>"function"===e.name)).node;return{startIndex:t.startIndex,endIndex:t.endIndex}}));return r.delete(),n}},94343:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getNodeStart=t.isBlockBodyFinished=t.isEmptyBlockStart=t.getBlockParser=void 0;const n=r(42133);class i{constructor(e,t,r){this.languageId=e,this.nodeMatch=t,this.nodeTypesWithBlockOrStmtChild=r}async getNodeMatchAtPosition(e,t,r){const i=await(0,n.parseTreeSitter)(this.languageId,e);try{let e=i.rootNode.descendantForIndex(t);for(;e;){const t=this.nodeMatch[e.type];if(t){if(!this.nodeTypesWithBlockOrStmtChild.has(e.type))break;const r=this.nodeTypesWithBlockOrStmtChild.get(e.type);if((""==r?e.namedChildren[0]:e.childForFieldName(r))?.type==t)break}e=e.parent}if(!e)return;return r(e)}finally{i.delete()}}getNextBlockAtPosition(e,t,r){return this.getNodeMatchAtPosition(e,t,(e=>{let t=e.children.reverse().find((t=>t.type==this.nodeMatch[e.type]));if(t){if("python"==this.languageId&&t.parent){const e=":"==t.parent.type?t.parent.parent:t.parent;let r=e?.nextSibling;for(;r&&"comment"==r.type;){const n=r.startPosition.row==t.endPosition.row&&r.startPosition.column>=t.endPosition.column,i=r.startPosition.row>e.endPosition.row&&r.startPosition.column>e.startPosition.column;if(!n&&!i)break;t=r,r=r.nextSibling}}if(!(t.endIndex>=t.tree.rootNode.endIndex-1&&(t.hasError()||t.parent.hasError())))return r(t)}}))}async isBlockBodyFinished(e,t,r){const n=(e+t).trimEnd(),i=await this.getNextBlockAtPosition(n,r,(e=>e.endIndex));if(void 0!==i&&i0?t:void 0}}getNodeStart(e,t){const r=e.trimEnd();return this.getNodeMatchAtPosition(r,t,(e=>e.startIndex))}}class o extends i{constructor(e,t,r,n,i){super(e,n,i),this.blockEmptyMatch=t,this.lineMatch=r}isBlockStart(e){return this.lineMatch.test(e.trimStart())}async isBlockBodyEmpty(e,t){const r=await this.getNextBlockAtPosition(e,t,(r=>{r.startIndex0&&/\s/.test(e.charAt(r-1));)r--;return r}function a(e,t){const r=e.startIndex,n=e.startIndex-e.startPosition.column,i=t.substring(n,r);if(/^\s*$/.test(i))return i}function c(e,t,r){if(t.startPosition.row<=e.startPosition.row)return!1;const n=a(e,r),i=a(t,r);return void 0!==n&&void 0!==i&&n.startsWith(i)}class l extends i{constructor(e,t,r,n,i,o,s){super(e,t,r),this.startKeywords=n,this.blockNodeType=i,this.emptyStatementType=o,this.curlyBraceLanguage=s}isBlockEmpty(e,t){let r=e.text.trim();return this.curlyBraceLanguage&&(r.startsWith("{")&&(r=r.slice(1)),r.endsWith("}")&&(r=r.slice(0,-1)),r=r.trim()),0==r.length||!("python"!=this.languageId||"class_definition"!=e.parent?.type&&"function_definition"!=e.parent?.type||1!=e.children.length||!(0,n.queryPythonIsDocstring)(e.parent))}async isEmptyBlockStart(e,t){if(t>e.length)throw new RangeError("Invalid offset");for(let r=t;r";"==e.type))&&r.endIndex<=t}r=r.parent}}let i=null,o=null,s=null,a=n;for(;null!=a;){if(a.type==this.blockNodeType){o=a;break}if(this.nodeMatch[a.type]){s=a;break}if("ERROR"==a.type){i=a;break}a=a.parent}if(null!=o){if(!o.parent||!this.nodeMatch[o.parent.type])return!1;if("python"==this.languageId){const e=o.previousSibling;if(null!=e&&e.hasError()&&(e.text.startsWith('"""')||e.text.startsWith("'''")))return!0}return this.isBlockEmpty(o,t)}if(null!=i){if("module"==i.previousSibling?.type||"internal_module"==i.previousSibling?.type)return!0;const e=[...i.children].reverse(),r=e.find((e=>this.startKeywords.includes(e.type)));let o=e.find((e=>e.type==this.blockNodeType));if(r){switch(this.languageId){case"python":{"try"==r.type&&"identifier"==n.type&&n.text.length>4&&(o=e.find((e=>e.hasError()))?.children.find((e=>"block"==e.type)));const t=e.find((e=>":"==e.type));if(t&&r.endIndex<=t.startIndex&&t.nextSibling){if("def"==r.type){const e=t.nextSibling;if('"'==e.type||"'"==e.type)return!0;if("ERROR"==e.type&&('"""'==e.text||"'''"==e.text))return!0}return!1}break}case"javascript":{const t=e.find((e=>"formal_parameters"==e.type));if("class"==r.type&&t)return!0;const n=e.find((e=>"{"==e.type));if(n&&n.startIndex>r.endIndex&&null!=n.nextSibling)return!1;if(e.find((e=>"do"==e.type))&&"while"==r.type)return!1;if("=>"==r.type&&r.nextSibling&&"{"!=r.nextSibling.type)return!1;break}case"typescript":{const t=e.find((e=>"{"==e.type));if(t&&t.startIndex>r.endIndex&&null!=t.nextSibling)return!1;if(e.find((e=>"do"==e.type))&&"while"==r.type)return!1;if("=>"==r.type&&r.nextSibling&&"{"!=r.nextSibling.type)return!1;break}}return!(o&&o.startIndex>r.endIndex)||this.isBlockEmpty(o,t)}}if(null!=s){const e=this.nodeMatch[s.type],r=s.children.slice().reverse().find((t=>t.type==e));if(r)return this.isBlockEmpty(r,t);if(this.nodeTypesWithBlockOrStmtChild.has(s.type)){const e=this.nodeTypesWithBlockOrStmtChild.get(s.type),t=""==e?s.children[0]:s.childForFieldName(e);if(t&&t.type!=this.blockNodeType&&t.type!=this.emptyStatementType)return!1}return!0}return!1}finally{r.delete()}}}const u={python:new l("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 l("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 l("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),go:new o("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 o("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)};function d(e){return u[(0,n.languageIdToWasmLanguage)(e)]}t.getBlockParser=d,t.isEmptyBlockStart=async function(e,t,r){return!!(0,n.isSupportedLanguageId)(e)&&d(e).isEmptyBlockStart(t,r)},t.isBlockBodyFinished=async function(e,t,r,i){if((0,n.isSupportedLanguageId)(e))return d(e).isBlockBodyFinished(t,r,i)},t.getNodeStart=async function(e,t,r){if((0,n.isSupportedLanguageId)(e))return d(e).getNodeStart(t,r)}},28684:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPrompt=t.newLineEnded=t.normalizeLanguageId=t.PromptOptions=t.SuffixStartMode=t.SuffixMatchOption=t.SuffixOption=t.LineEndingOptions=t.LocalImportContextOption=t.SnippetSelectionOption=t.NeighboringSnippetType=t.NeighboringTabsPositionOption=t.NeighboringTabsOption=t.SiblingOption=t.PathMarkerOption=t.LanguageMarkerOption=t.TOKENS_RESERVED_FOR_SUFFIX_ENCODING=t.MAX_EDIT_DISTANCE_LENGTH=t.MAX_PROMPT_LENGTH=void 0;const n=r(23272),i=r(41986),o=r(27289),s=r(41729),a=r(83542),c=r(17503),l=r(6885);let u={text:"",tokens:[]};var d,p,h,f,g,m,y,v,_,b,w,C;t.MAX_PROMPT_LENGTH=1500,t.MAX_EDIT_DISTANCE_LENGTH=50,t.TOKENS_RESERVED_FOR_SUFFIX_ENCODING=5,function(e){e.NoMarker="nomarker",e.Top="top",e.Always="always"}(d=t.LanguageMarkerOption||(t.LanguageMarkerOption={})),function(e){e.NoMarker="nomarker",e.Top="top",e.Always="always"}(p=t.PathMarkerOption||(t.PathMarkerOption={})),function(e){e.NoSiblings="nosiblings",e.SiblingsOverContext="siblingabove",e.ContextOverSiblings="contextabove"}(h=t.SiblingOption||(t.SiblingOption={})),function(e){e.None="none",e.Conservative="conservative",e.Medium="medium",e.Eager="eager",e.EagerButLittle="eagerButLittle",e.EagerButMedium="eagerButMedium"}(f=t.NeighboringTabsOption||(t.NeighboringTabsOption={})),function(e){e.TopOfText="top",e.DirectlyAboveCursor="aboveCursor",e.AfterSiblings="afterSiblings"}(g=t.NeighboringTabsPositionOption||(t.NeighboringTabsPositionOption={})),function(e){e.NeighboringFunctions="neighboringFunction",e.NeighboringSnippets="neighboringSnippet"}(m=t.NeighboringSnippetType||(t.NeighboringSnippetType={})),function(e){e.BestMatch="bestMatch",e.TopK="topK"}(y=t.SnippetSelectionOption||(t.SnippetSelectionOption={})),function(e){e.NoContext="nocontext",e.Declarations="declarations"}(v=t.LocalImportContextOption||(t.LocalImportContextOption={})),function(e){e.ConvertToUnix="unix",e.KeepOriginal="keep"}(_=t.LineEndingOptions||(t.LineEndingOptions={})),(C=t.SuffixOption||(t.SuffixOption={})).None="none",C.FifteenPercent="fifteenPercent",function(e){e.Equal="equal",e.Levenshtein="levenshteineditdistance"}(b=t.SuffixMatchOption||(t.SuffixMatchOption={})),function(e){e.Cursor="cursor",e.CursorTrimStart="cursortrimstart",e.SiblingBlock="siblingblock",e.SiblingBlockTrimStart="siblingblocktrimstart"}(w=t.SuffixStartMode||(t.SuffixStartMode={}));class E{constructor(e,r){if(this.fs=e,this.maxPromptLength=t.MAX_PROMPT_LENGTH,this.languageMarker=d.Top,this.pathMarker=p.Top,this.includeSiblingFunctions=h.ContextOverSiblings,this.localImportContext=v.Declarations,this.neighboringTabs=f.Eager,this.neighboringTabsPosition=g.TopOfText,this.neighboringSnippetTypes=m.NeighboringSnippets,this.lineEnding=_.ConvertToUnix,this.suffixPercent=0,this.suffixStartMode=w.Cursor,this.tokenizerName=a.TokenizerName.cushman001,this.suffixMatchThreshold=0,this.suffixMatchCriteria=b.Levenshtein,this.fimSuffixLengthThreshold=0,r)for(const e in r)this[e]=r[e];if(this.suffixPercent<0||this.suffixPercent>100)throw new Error(`suffixPercent must be between 0 and 100, but was ${this.suffixPercent}`);if(this.suffixPercent>0&&this.includeSiblingFunctions!=h.NoSiblings)throw new Error(`Invalid option combination. Cannot set suffixPercent > 0 (${this.suffixPercent}) and includeSiblingFunctions ${this.includeSiblingFunctions}`);if(this.suffixMatchThreshold<0||this.suffixMatchThreshold>100)throw new Error(`suffixMatchThreshold must be at between 0 and 100, but was ${this.suffixMatchThreshold}`);if(this.fimSuffixLengthThreshold<-1)throw new Error(`fimSuffixLengthThreshold must be at least -1, but was ${this.fimSuffixLengthThreshold}`);if(null!=this.indentationMinLength&&null!=this.indentationMaxLength&&this.indentationMinLength>this.indentationMaxLength)throw new Error(`indentationMinLength must be less than or equal to indentationMaxLength, but was ${this.indentationMinLength} and ${this.indentationMaxLength}`);if(this.snippetSelection===y.TopK&&void 0===this.snippetSelectionK)throw new Error("snippetSelectionK must be defined.");if(this.snippetSelection===y.TopK&&this.snippetSelectionK&&this.snippetSelectionK<=0)throw new Error(`snippetSelectionK must be greater than 0, but was ${this.snippetSelectionK}`)}}t.PromptOptions=E;const T={javascriptreact:"javascript",jsx:"javascript",typescriptreact:"typescript",jade:"pug",cshtml:"razor"};function S(e){return e=e.toLowerCase(),T[e]??e}function x(e){return""==e||e.endsWith("\n")?e:e+"\n"}t.normalizeLanguageId=S,t.newLineEnded=x,t.getPrompt=async function(e,r,m={},y=[]){const _=new E(e,m),C=(0,a.getTokenizer)(_.tokenizerName);let T=!1;const{source:k,offset:I}=r;if(I<0||I>k.length)throw new Error(`Offset ${I} is out of range.`);r.languageId=S(r.languageId);const A=new c.Priorities,P=A.justBelow(c.Priorities.TOP),R=_.languageMarker==d.Always?A.justBelow(c.Priorities.TOP):A.justBelow(P),N=_.pathMarker==p.Always?A.justBelow(c.Priorities.TOP):A.justBelow(P),O=_.includeSiblingFunctions==h.ContextOverSiblings?A.justBelow(P):A.justAbove(P),D=A.justBelow(P,O),L=A.justBelow(D),M=new c.PromptWishlist(C,_.lineEnding);let B,F;if(_.languageMarker!=d.NoMarker){const e=x((0,n.getLanguageMarker)(r));B=M.append(e,c.PromptElementKind.LanguageMarker,R)}if(_.pathMarker!=p.NoMarker){const e=x((0,n.getPathMarker)(r));e.length>0&&(F=M.append(e,c.PromptElementKind.PathMarker,N))}if(_.localImportContext!=v.NoContext)for(const e of await(0,i.extractLocalImportContext)(r,_.fs))M.append(x(e),c.PromptElementKind.ImportedFile,D);const j=_.neighboringTabs==f.None||0==y.length?[]:await(0,o.getNeighborSnippets)(r,y,_.neighboringSnippetTypes,_.neighboringTabs,_.indentationMinLength,_.indentationMaxLength,_.snippetSelectionOption,_.snippetSelectionK);function U(){j.forEach((e=>M.append(e.snippet,c.PromptElementKind.SimilarFile,L,C.tokenLength(e.snippet),e.score)))}_.neighboringTabsPosition==g.TopOfText&&U();const $=[];let q;if(_.includeSiblingFunctions==h.NoSiblings)q=k.substring(0,I);else{const{siblings:e,beforeInsertion:t,afterInsertion:n}=await(0,s.getSiblingFunctions)(r);M.appendLineForLine(t,c.PromptElementKind.BeforeCursor,P).forEach((e=>$.push(e)));let i=O;e.forEach((e=>{M.append(e,c.PromptElementKind.AfterCursor,i),i=A.justBelow(i)})),_.neighboringTabsPosition==g.AfterSiblings&&U(),q=n}if(_.neighboringTabsPosition==g.DirectlyAboveCursor){const e=q.lastIndexOf("\n")+1,t=q.substring(0,e),r=q.substring(e);M.appendLineForLine(t,c.PromptElementKind.BeforeCursor,P).forEach((e=>$.push(e))),U(),r.length>0&&($.push(M.append(r,c.PromptElementKind.AfterCursor,P)),$.length>1&&M.require($[$.length-2],$[$.length-1]))}else M.appendLineForLine(q,c.PromptElementKind.BeforeCursor,P).forEach((e=>$.push(e)));d.Top==_.languageMarker&&$.length>0&&void 0!==B&&M.require(B,$[0]),p.Top==_.pathMarker&&$.length>0&&void 0!==F&&(B?M.require(F,B):M.require(F,$[0])),void 0!==B&&void 0!==F&&M.exclude(F,B);let H=k.slice(I);if(0==_.suffixPercent||H.length<=_.fimSuffixLengthThreshold)return M.fulfill(_.maxPromptLength);{let e=r.offset;_.suffixStartMode!==w.Cursor&&_.suffixStartMode!==w.CursorTrimStart&&(e=await(0,s.getSiblingFunctionStart)(r));const n=_.maxPromptLength-t.TOKENS_RESERVED_FOR_SUFFIX_ENCODING;let i=Math.floor(n*(100-_.suffixPercent)/100),o=M.fulfill(i);const a=n-o.prefixLength;let c=k.slice(e);_.suffixStartMode!=w.SiblingBlockTrimStart&&_.suffixStartMode!=w.CursorTrimStart||(c=c.trimStart());const d=C.takeFirstTokens(c,a);if(d.tokens.length<=a-3&&(i=n-d.tokens.length,o=M.fulfill(i)),_.suffixMatchCriteria==b.Equal)d.tokens.length===u.tokens.length&&d.tokens.every(((e,t)=>e===u.tokens[t]))&&(T=!0);else if(_.suffixMatchCriteria==b.Levenshtein&&d.tokens.length>0&&_.suffixMatchThreshold>0){const e=(0,l.findEditDistanceScore)(d.tokens.slice(0,t.MAX_EDIT_DISTANCE_LENGTH),u.tokens.slice(0,t.MAX_EDIT_DISTANCE_LENGTH))?.score;100*e<_.suffixMatchThreshold*Math.min(t.MAX_EDIT_DISTANCE_LENGTH,d.tokens.length)&&(T=!0)}return!0===T&&u.tokens.length<=a?(u.tokens.length<=a-3&&(i=n-u.tokens.length,o=M.fulfill(i)),o.suffix=u.text,o.suffixLength=u.tokens.length):(o.suffix=d.text,o.suffixLength=d.tokens.length,u=d),o}}},41729:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSiblingFunctionStart=t.getSiblingFunctions=void 0;const n=r(28684),i=r(42133);t.getSiblingFunctions=async function({source:e,offset:t,languageId:r}){const o=[];let s="",a=e.substring(0,t);if((0,i.isSupportedLanguageId)(r)){const c=await(0,i.parseTreeSitter)(r,e);try{let l=t;for(;l>=0&&/\s/.test(e[l]);)l--;const u=c.rootNode.descendantForIndex(l),d=(0,i.getAncestorWithSiblingFunctions)(r,u);if(d){const c=(0,i.getFirstPrecedingComment)(d)?.startIndex??d.startIndex;let l,u=0;for(;" "==(l=e[c-u-1])||"\t"==l;)u++;const p=e.substring(c-u,c);for(let s=d.nextSibling;s;s=s.nextSibling)if((0,i.isFunctionDefinition)(r,s)){const r=(0,i.getFirstPrecedingComment)(s)?.startIndex??s.startIndex;if(r=0&&/\s/.test(e[o]);)o--;const s=n.rootNode.descendantForIndex(o),a=(0,i.getAncestorWithSiblingFunctions)(r,s);if(a){for(let e=a.nextSibling;e;e=e.nextSibling)if((0,i.isFunctionDefinition)(r,e)){const r=(0,i.getFirstPrecedingComment)(e)?.startIndex??e.startIndex;if(r=t)return a.endIndex}}finally{n.delete()}}return t}},91186:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.computeScore=t.FunctionJaccardMatcher=t.IndentationBasedJaccardMatcher=t.FixedWindowSizeJaccardMatcher=void 0;const n=r(64505),i=r(11864);class o extends i.WindowedMatcher{constructor(e,t){super(e),this.windowLength=t}id(){return"fixed:"+this.windowLength}getWindowsDelineations(e){const t=[],r=e.length;for(let e=0;0==e||e({to:t=>new o(t,e)});class s extends i.WindowedMatcher{constructor(e,t,r){super(e),this.indentationMinLength=t,this.indentationMaxLength=r,this.languageId=e.languageId}id(){return`indent:${this.indentationMinLength}:${this.indentationMaxLength}:${this.languageId}`}getWindowsDelineations(e){return(0,n.getWindowsDelineations)(e,this.languageId,this.indentationMinLength,this.indentationMaxLength)}trimDocument(e){return e.source.slice(0,e.offset).split("\n").slice(-this.indentationMaxLength).join("\n")}similarityScore(e,t){return c(e,t)}}t.IndentationBasedJaccardMatcher=s,s.FACTORY=(e,t)=>({to:r=>new s(r,e,t)});class a extends i.FunctionalMatcher{id(){return"function"}getWindowsDelineations(e){return[]}constructor(e,t){super(e),this.windowLength=t}trimDocument(e){return e.source.slice(0,e.offset).split("\n").slice(-this.windowLength).join("\n")}similarityScore(e,t){return c(e,t)}}function c(e,t){const r=new Set;return e.forEach((e=>{t.has(e)&&r.add(e)})),r.size/(e.size+t.size-r.size)}t.FunctionJaccardMatcher=a,a.FACTORY=e=>({to:t=>new a(t,e)}),t.computeScore=c},27289:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getNeighborSnippets=t.neighborOptionToSelection=void 0;const n=r(23272),i=r(28684),o=r(91186);function s(e,t){const r=t==i.NeighboringSnippetType.NeighboringFunctions?"function":"snippet";return[e.relativePath?`Compare this ${r} from ${e.relativePath}:`:`Compare this ${r}:`].concat(e.snippet.split("\n"))}t.neighborOptionToSelection={none:{snippetLength:1,threshold:-1,numberOfSnippets:0},conservative:{snippetLength:10,threshold:.3,numberOfSnippets:1},medium:{snippetLength:20,threshold:.1,numberOfSnippets:2},eager:{snippetLength:60,threshold:0,numberOfSnippets:4},eagerButLittle:{snippetLength:10,threshold:0,numberOfSnippets:1},eagerButMedium:{snippetLength:20,threshold:0,numberOfSnippets:4}},t.getNeighborSnippets=async function(e,r,a,c,l,u,d,p){const h={...t.neighborOptionToSelection[c]},f=function(e,t,r,n,s){let a;return a=t===i.NeighboringSnippetType.NeighboringSnippets?void 0!==n&&void 0!==s?o.IndentationBasedJaccardMatcher.FACTORY(n,s):o.FixedWindowSizeJaccardMatcher.FACTORY(r.snippetLength):o.FunctionJaccardMatcher.FACTORY(r.snippetLength),a.to(e)}(e,a,h,l,u);return(await r.filter((e=>e.source.length<1e4&&e.source.length>0)).slice(0,20).reduce((async(e,t)=>(await e).concat((await f.findMatches(t,d,p)).map((e=>({relativePath:t.relativePath,...e}))))),Promise.resolve([]))).filter((e=>e.score&&e.snippet&&e.score>h.threshold)).sort(((e,t)=>e.score-t.score)).slice(-h.numberOfSnippets).map((t=>({score:t.score,snippet:s(t,a).map((t=>(0,n.comment)(t,e.languageId)+"\n")).join(""),startLine:t.startLine,endLine:t.endLine})))}},11864:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.splitIntoWords=t.FunctionalMatcher=t.WindowedMatcher=t.SortOptions=void 0;const n=r(28684),i=r(42133);var o;!function(e){e.Ascending="ascending",e.Descending="descending",e.None="none"}(o=t.SortOptions||(t.SortOptions={}));class s{constructor(e){this.stopsForLanguage=p.get(e.languageId)??d}tokenize(e){return new Set(l(e).filter((e=>!this.stopsForLanguage.has(e))))}}const a=new class{constructor(e){this.keys=[],this.cache={},this.size=e}put(e,t){if(this.cache[e]=t,this.keys.length>this.size){this.keys.push(e);const t=this.keys.shift()??"";delete this.cache[t]}}get(e){return this.cache[e]}}(20);class c{constructor(e){this.tokenizer=new s(e),this.referenceTokens=this.tokenizer.tokenize(this.trimDocument(e))}sortScoredSnippets(e,t=o.Descending){return t==o.Ascending?e.sort(((e,t)=>e.score>t.score?1:-1)):t==o.Descending?e.sort(((e,t)=>e.score>t.score?-1:1)):e}retrieveAllSnippets(e,t=o.Descending){const r=[];if(0===e.source.length||0===this.referenceTokens.size)return r;const n=e.source.split("\n"),i=this.id()+":"+e.source,s=a.get(i)??[],c=0==s.length,l=c?n.map(this.tokenizer.tokenize,this.tokenizer):[];for(const[e,[t,i]]of this.getWindowsDelineations(n).entries()){if(c){const e=new Set;l.slice(t,i).forEach((t=>t.forEach(e.add,e))),s.push(e)}const n=s[e],o=this.similarityScore(n,this.referenceTokens);r.push({score:o,startLine:t,endLine:i})}return c&&a.put(i,s),this.sortScoredSnippets(r,t)}async findMatches(e,t=n.SnippetSelectionOption.BestMatch,r){if(t==n.SnippetSelectionOption.BestMatch){const t=await this.findBestMatch(e);return t?[t]:[]}return t==n.SnippetSelectionOption.TopK&&await this.findTopKMatches(e,r)||[]}async findBestMatch(e){if(0===e.source.length||0===this.referenceTokens.size)return;const t=e.source.split("\n"),r=this.retrieveAllSnippets(e,o.Descending);return 0!==r.length&&0!==r[0].score?{snippet:t.slice(r[0].startLine,r[0].endLine).join("\n"),...r[0]}:void 0}async findTopKMatches(e,t=1){if(0===e.source.length||0===this.referenceTokens.size||t<1)return;const r=e.source.split("\n"),n=this.retrieveAllSnippets(e,o.Descending);if(0===n.length||0===n[0].score)return;const i=[n[0]];for(let e=1;en[e].startLinet.startLine))&&i.push(n[e]);return i.map((e=>({snippet:r.slice(e.startLine,e.endLine).join("\n"),...e})))}}function l(e){return e.split(/[^a-zA-Z0-9]/).filter((e=>e.length>0))}t.WindowedMatcher=c,t.FunctionalMatcher=class extends c{constructor(e){super(e)}getMatchingScore(e){const t=this.tokenizer.tokenize(e.source),r=this.similarityScore(t,this.referenceTokens);return{snippet:e.source,score:r,startLine:0,endLine:0}}async findBestMatch(e){const t=await this.findMatches(e);if(0!==t.length&&0!==t[0].score)return t[0]}async findMatches(e,t,r){if(0===e.source.length||0===this.referenceTokens.size)return[];const n=await async function(e){let t=[];const r=await(0,i.getFunctionPositions)(e.languageId,e.source);for(let n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findEditDistanceScore=void 0,t.findEditDistanceScore=function(e,t){if(0===e.length||0===t.length)return{score:e.length+t.length};const r=Array.from({length:e.length}).map((()=>Array.from({length:t.length}).map((()=>0))));for(let t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTokenizer=t.TokenizerName=void 0;const n=r(57147),i=r(71017),o=r(73837),s=(e,t)=>Array.from(Array(t).keys()).slice(e),a=e=>e.charCodeAt(0),c=new o.TextDecoder("utf-8"),l=e=>c.decode(new Uint8Array(e));function u(e){const t=new Set;let r=e[0];for(let n=1;nArray.from(this.textEncoder.encode(e));let t="",r="";if(e===p.cushman001)t="vocab_cushman001.bpe",r="tokenizer_cushman001.json";else{if(e!==p.cushman002)throw new Error(`Unknown tokenizer name: ${e}`);t="vocab_cushman002.bpe",r="tokenizer_cushman002.json"}const c=n.readFileSync(i.resolve(__dirname,"..","dist",r)),l=JSON.parse(c.toString());this.encoder=new Map(Object.entries(l));for(let[e,t]of this.encoder)this.decoder.set(t,e);const u=n.readFileSync(i.resolve(__dirname,"..","dist",t),"utf-8").split("\n").slice(1).filter((e=>e.trim().length>0));this.bpe_ranks=((e,t)=>{const r=new Map;return e.forEach(((n,i)=>{r.set(e[i],t[i])})),r})(u,s(0,u.length)),function(e){const t=s(a("!"),a("~")+1).concat(s(a("¡"),a("¬")+1),s(a("®"),a("ÿ")+1));let r=t.slice(),n=0;for(let e=0;e<256;e++)t.includes(e)||(t.push(e),r.push(256+n),n+=1);const i=r.map((e=>(e=>String.fromCharCode(e))(e)));for(let r=0;r{this.byte_decoder.set(e,t)}))}byteEncodeStr(e){return this.encodeStr(e).map((e=>this.byte_encoder.get(e)))}bpe(e){if(this.cache.has(e))return this.cache.get(e);let t=this.byteEncodeStr(e),r=u(t);if(!r)return t.map((e=>this.encoder.get(e)));for(;;){const e=new Map;r.forEach((t=>{const r=t.join(" "),n=this.bpe_ranks.get(r);e.set(void 0===n||isNaN(n)?1e11:n,t)}));const n=Array.from(e.keys()).map((e=>Number(e))),i=e.get(Math.min(...n));if(!i||!this.bpe_ranks.has(i.join(" ")))break;const o=i[0],s=i[1];let a=[],c=0;for(;cthis.encoder.get(e)));return this.cache.set(e,n),n}tokenize(e){let t=[];const r=Array.from(e.matchAll(d)).map((e=>e[0]));for(let e of r){const r=this.bpe(e);Array.prototype.push.apply(t,r)}return t}tokenLength(e){return this.tokenize(e).length}takeLastTokens(e,t){if(t<=0)return"";let r=Math.min(e.length,4*t),n=e.slice(-r),i=this.tokenize(n);for(;i.lengththis.decoder.get(e))).join("");return t=l(t.split("").map((e=>this.byte_decoder.get(e)))),t}tokenizeStrings(e){return this.tokenize(e).map((e=>l(this.decoder.get(e).split("").map((e=>this.byte_decoder.get(e))))))}}class g{constructor(){this.hash=e=>{let t=0;for(let r=0;re.toString())).join(" ")}tokenizeStrings(e){return e.split(/\b/)}tokenLength(e){return this.tokenizeStrings(e).length}takeLastTokens(e,t){return this.tokenizeStrings(e).slice(-t).join("")}takeFirstTokens(e,t){const r=this.tokenizeStrings(e).slice(0,t);return{text:r.join(""),tokens:r.map(this.hash)}}takeLastLinesTokens(e,t){const r=this.takeLastTokens(e,t);if(r.length===e.length||"\n"===e[e.length-r.length-1])return r;let n=r.indexOf("\n");return r.substring(n+1)}}},17503:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Priorities=t.PromptWishlist=t.PromptElementRanges=t.PromptChoices=t.PromptBackground=t.PromptElementKind=void 0;const n=r(28684);var i;!function(e){e.BeforeCursor="BeforeCursor",e.AfterCursor="AfterCursor",e.SimilarFile="SimilarFile",e.ImportedFile="ImportedFile",e.LanguageMarker="LanguageMarker",e.PathMarker="PathMarker"}(i=t.PromptElementKind||(t.PromptElementKind={}));class o{constructor(){this.used=new Map,this.unused=new Map}markUsed(e){this.IsNeighboringTab(e)&&this.used.set(e.id,this.convert(e))}undoMarkUsed(e){this.IsNeighboringTab(e)&&this.used.delete(e.id)}markUnused(e){this.IsNeighboringTab(e)&&this.unused.set(e.id,this.convert(e))}convert(e){return{score:e.score.toFixed(4),length:e.text.length}}IsNeighboringTab(e){return e.kind==i.SimilarFile}}t.PromptBackground=o;class s{constructor(){this.used=new Map,this.unused=new Map}markUsed(e){this.used.set(e.kind,(this.used.get(e.kind)||0)+e.tokens)}undoMarkUsed(e){this.used.set(e.kind,(this.used.get(e.kind)||0)-e.tokens)}markUnused(e){this.unused.set(e.kind,(this.used.get(e.kind)||0)+e.tokens)}}t.PromptChoices=s;class a{constructor(e){this.ranges=new Array;let t,r=0;for(const{element:n}of e)0!==n.text.length&&(t===i.BeforeCursor&&n.kind===i.BeforeCursor?this.ranges[this.ranges.length-1].end+=n.text.length:this.ranges.push({kind:n.kind,start:r,end:r+n.text.length}),t=n.kind,r+=n.text.length)}}t.PromptElementRanges=a,t.PromptWishlist=class{constructor(e,t){this.tokenizer=e,this.content=[],this.tokenizer=e,this.lineEndingOption=t}getContent(){return[...this.content]}convertLineEndings(e){return this.lineEndingOption===n.LineEndingOptions.ConvertToUnix&&(e=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n")),e}append(e,t,r,n=this.tokenizer.tokenLength(e),i=NaN){e=this.convertLineEndings(e);const o=this.content.length;return this.content.push({id:o,text:e,kind:t,priority:r,tokens:n,requires:[],excludes:[],score:i}),o}appendLineForLine(e,t,r){const n=(e=this.convertLineEndings(e)).split("\n");for(let e=0;e{"\n"===e&&i.length>0&&!i[i.length-1].endsWith("\n\n")?i[i.length-1]+="\n":i.push(e)}));const o=[];return i.forEach(((e,n)=>{""!==e&&(o.push(this.append(e,t,r)),n>0&&(this.content[this.content.length-2].requires=[this.content[this.content.length-1]]))})),o}require(e,t){const r=this.content.find((t=>t.id===e)),n=this.content.find((e=>e.id===t));r&&n&&r.requires.push(n)}exclude(e,t){const r=this.content.find((t=>t.id===e)),n=this.content.find((e=>e.id===t));r&&n&&r.excludes.push(n)}fulfill(e){const t=new s,r=new o,n=this.content.map(((e,t)=>({element:e,index:t})));n.sort(((e,t)=>e.element.priority===t.element.priority?t.index-e.index:t.element.priority-e.element.priority));const i=new Set,c=new Set;let l;const u=[];let d=e;n.forEach((e=>{const n=e.element,o=e.index;if(d>=0&&(d>0||void 0===l)&&n.requires.every((e=>i.has(e.id)))&&!c.has(n.id)){let s=n.tokens;const a=function(e,t){let r,n=1/0;for(const i of e)i.index>t&&i.index=s?(d-=s,i.add(n.id),n.excludes.forEach((e=>c.add(e.id))),t.markUsed(n),r.markUsed(n),u.push(e)):l=l??e}else t.markUnused(n),r.markUnused(n)})),u.sort(((e,t)=>e.index-t.index));let p=u.reduce(((e,t)=>e+t.element.text),""),h=this.tokenizer.tokenLength(p);for(;h>e;){u.sort(((e,t)=>t.element.priority===e.element.priority?t.index-e.index:t.element.priority-e.element.priority));const e=u.pop();e&&(t.undoMarkUsed(e.element),t.markUnused(e.element),r.undoMarkUsed(e.element),r.markUnused(e.element),l=void 0),u.sort(((e,t)=>e.index-t.index)),p=u.reduce(((e,t)=>e+t.element.text),""),h=this.tokenizer.tokenLength(p)}const f=[...u];if(void 0!==l){f.push(l),f.sort(((e,t)=>e.index-t.index));const n=f.reduce(((e,t)=>e+t.element.text),""),i=this.tokenizer.tokenLength(n);if(i<=e){t.markUsed(l.element),r.markUsed(l.element);const e=new a(f);return{prefix:n,suffix:"",prefixLength:i,suffixLength:0,promptChoices:t,promptBackground:r,promptElementRanges:e}}t.markUnused(l.element),r.markUnused(l.element)}const g=new a(u);return{prefix:p,suffix:"",prefixLength:h,suffixLength:0,promptChoices:t,promptBackground:r,promptElementRanges:g}}};class c{constructor(){this.registeredPriorities=[0,1]}register(e){if(e>c.TOP||ee>t)));return this.register((r+t)/2)}justBelow(...e){const t=Math.min(...e),r=Math.max(...this.registeredPriorities.filter((e=>er>e&&r{e.exports=r(1193)},1193:(e,t,r)=>{"use strict";r(41808);var n,i=r(24404),o=r(13685),s=r(95687),a=r(82361),c=(r(39491),r(73837));function l(e){var t=this;t.options=e||{},t.proxyOptions=t.options.proxy||{},t.maxSockets=t.options.maxSockets||o.Agent.defaultMaxSockets,t.requests=[],t.sockets=[],t.on("free",(function(e,r,n,i){for(var o=d(r,n,i),s=0,a=t.requests.length;s=this.maxSockets?i.requests.push(o):i.createSocket(o,(function(t){function r(){i.emit("free",t,o)}function n(e){i.removeSocket(t),t.removeListener("free",r),t.removeListener("close",n),t.removeListener("agentRemove",n)}t.on("free",r),t.on("close",n),t.on("agentRemove",n),e.onSocket(t)}))},l.prototype.createSocket=function(e,t){var r=this,i={};r.sockets.push(i);var o=p({},r.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(o.localAddress=e.localAddress),o.proxyAuth&&(o.headers=o.headers||{},o.headers["Proxy-Authorization"]="Basic "+new Buffer(o.proxyAuth).toString("base64")),n("making CONNECT request");var s=r.request(o);function a(o,a,c){var l;return s.removeAllListeners(),a.removeAllListeners(),200!==o.statusCode?(n("tunneling socket could not be established, statusCode=%d",o.statusCode),a.destroy(),(l=new Error("tunneling socket could not be established, statusCode="+o.statusCode)).code="ECONNRESET",e.request.emit("error",l),void r.removeSocket(i)):c.length>0?(n("got illegal response body from proxy"),a.destroy(),(l=new Error("got illegal response body from proxy")).code="ECONNRESET",e.request.emit("error",l),void r.removeSocket(i)):(n("tunneling connection has established"),r.sockets[r.sockets.indexOf(i)]=a,t(a))}s.useChunkedEncodingByDefault=!1,s.once("response",(function(e){e.upgrade=!0})),s.once("upgrade",(function(e,t,r){process.nextTick((function(){a(e,t,r)}))})),s.once("connect",a),s.once("error",(function(t){s.removeAllListeners(),n("tunneling socket could not be established, cause=%s\n",t.message,t.stack);var o=new Error("tunneling socket could not be established, cause="+t.message);o.code="ECONNRESET",e.request.emit("error",o),r.removeSocket(i)})),s.end()},l.prototype.removeSocket=function(e){var t=this.sockets.indexOf(e);if(-1!==t){this.sockets.splice(t,1);var r=this.requests.shift();r&&this.createSocket(r,(function(e){r.request.onSocket(e)}))}},n=process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments);"string"==typeof e[0]?e[0]="TUNNEL: "+e[0]:e.unshift("TUNNEL:"),console.error.apply(console,e)}:function(){},t.debug=n},22371:function(e,t){!function(e){"use strict";function t(){for(var e=arguments.length,t=Array(e),r=0;r1){t[0]=t[0].slice(0,-1);for(var n=t.length-1,i=1;i= 0x80 (not a basic code point)","invalid-input":"Invalid input"},g=Math.floor,m=String.fromCharCode;function y(e){throw new RangeError(f[e])}function v(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+function(e,t){for(var r=[],n=e.length;n--;)r[n]=t(e[n]);return r}((e=e.replace(h,".")).split("."),t).join(".")}function _(e){for(var t=[],r=0,n=e.length;r=55296&&i<=56319&&r>1,e+=g(e/t);e>455;n+=u)e=g(e/35);return g(n+36*e/(e+38))},C=function(e){var t,r=[],n=e.length,i=0,o=128,s=72,a=e.lastIndexOf("-");a<0&&(a=0);for(var c=0;c=128&&y("not-basic"),r.push(e.charCodeAt(c));for(var d=a>0?a+1:0;d=n&&y("invalid-input");var m=(t=e.charCodeAt(d++))-48<10?t-22:t-65<26?t-65:t-97<26?t-97:u;(m>=u||m>g((l-i)/h))&&y("overflow"),i+=m*h;var v=f<=s?1:f>=s+26?26:f-s;if(mg(l/_)&&y("overflow"),h*=_}var b=r.length+1;s=w(i-p,b,0==p),g(i/b)>l-o&&y("overflow"),o+=g(i/b),i%=b,r.splice(i++,0,o)}return String.fromCodePoint.apply(String,r)},E=function(e){var t=[],r=(e=_(e)).length,n=128,i=0,o=72,s=!0,a=!1,c=void 0;try{for(var d,p=e[Symbol.iterator]();!(s=(d=p.next()).done);s=!0){var h=d.value;h<128&&t.push(m(h))}}catch(e){a=!0,c=e}finally{try{!s&&p.return&&p.return()}finally{if(a)throw c}}var f=t.length,v=f;for(f&&t.push("-");v=n&&Ig((l-i)/A)&&y("overflow"),i+=(C-n)*A,n=C;var P=!0,R=!1,N=void 0;try{for(var O,D=e[Symbol.iterator]();!(P=(O=D.next()).done);P=!0){var L=O.value;if(Ll&&y("overflow"),L==n){for(var M=i,B=u;;B+=u){var F=B<=o?1:B>=o+26?26:B-o;if(M>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function I(e){for(var t="",r=0,n=e.length;r=194&&i<224){if(n-r>=6){var o=parseInt(e.substr(r+4,2),16);t+=String.fromCharCode((31&i)<<6|63&o)}else t+=e.substr(r,6);r+=6}else if(i>=224){if(n-r>=9){var s=parseInt(e.substr(r+4,2),16),a=parseInt(e.substr(r+7,2),16);t+=String.fromCharCode((15&i)<<12|(63&s)<<6|63&a)}else t+=e.substr(r,9);r+=9}else t+=e.substr(r,3),r+=3}return t}function A(e,t){function r(e){var r=I(e);return r.match(t.UNRESERVED)?r:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,r).replace(t.NOT_USERINFO,k).replace(t.PCT_ENCODED,i)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_HOST,k).replace(t.PCT_ENCODED,i)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,r).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,k).replace(t.PCT_ENCODED,i)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,r).replace(t.NOT_QUERY,k).replace(t.PCT_ENCODED,i)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,r).replace(t.NOT_FRAGMENT,k).replace(t.PCT_ENCODED,i)),e}function P(e){return e.replace(/^0*(.*)/,"$1")||"0"}function R(e,t){var r=e.match(t.IPV4ADDRESS)||[],n=c(r,2)[1];return n?n.split(".").map(P).join("."):e}function N(e,t){var r=e.match(t.IPV6ADDRESS)||[],n=c(r,3),i=n[1],o=n[2];if(i){for(var s=i.toLowerCase().split("::").reverse(),a=c(s,2),l=a[0],u=a[1],d=u?u.split(":").map(P):[],p=l.split(":").map(P),h=t.IPV4ADDRESS.test(p[p.length-1]),f=h?7:8,g=p.length-f,m=Array(f),y=0;y1){var b=m.slice(0,v.index),w=m.slice(v.index+v.length);_=b.join(":")+"::"+w.join(":")}else _=m.join(":");return o&&(_+="%"+o),_}return e}var O=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,D=void 0==="".match(/(){0}/)[1];function L(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={},n=!1!==t.iri?a:s;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var i=e.match(O);if(i){D?(r.scheme=i[1],r.userinfo=i[3],r.host=i[4],r.port=parseInt(i[5],10),r.path=i[6]||"",r.query=i[7],r.fragment=i[8],isNaN(r.port)&&(r.port=i[5])):(r.scheme=i[1]||void 0,r.userinfo=-1!==e.indexOf("@")?i[3]:void 0,r.host=-1!==e.indexOf("//")?i[4]:void 0,r.port=parseInt(i[5],10),r.path=i[6]||"",r.query=-1!==e.indexOf("?")?i[7]:void 0,r.fragment=-1!==e.indexOf("#")?i[8]:void 0,isNaN(r.port)&&(r.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?i[4]:void 0)),r.host&&(r.host=N(R(r.host,n),n)),void 0!==r.scheme||void 0!==r.userinfo||void 0!==r.host||void 0!==r.port||r.path||void 0!==r.query?void 0===r.scheme?r.reference="relative":void 0===r.fragment?r.reference="absolute":r.reference="uri":r.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==r.reference&&(r.error=r.error||"URI is not a "+t.reference+" reference.");var o=x[(t.scheme||r.scheme||"").toLowerCase()];if(t.unicodeSupport||o&&o.unicodeSupport)A(r,n);else{if(r.host&&(t.domainHost||o&&o.domainHost))try{r.host=T(r.host.replace(n.PCT_ENCODED,I).toLowerCase())}catch(e){r.error=r.error||"Host's domain name can not be converted to ASCII via punycode: "+e}A(r,s)}o&&o.parse&&o.parse(r,t)}else r.error=r.error||"URI can not be parsed.";return r}function M(e,t){var r=!1!==t.iri?a:s,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(N(R(String(e.host),r),r).replace(r.IPV6ADDRESS,(function(e,t,r){return"["+t+(r?"%25"+r:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}var B=/^\.\.?\//,F=/^\/\.(\/|$)/,j=/^\/\.\.(\/|$)/,U=/^\/?(?:.|\n)*?(?=\/|$)/;function $(e){for(var t=[];e.length;)if(e.match(B))e=e.replace(B,"");else if(e.match(F))e=e.replace(F,"/");else if(e.match(j))e=e.replace(j,"/"),t.pop();else if("."===e||".."===e)e="";else{var r=e.match(U);if(!r)throw new Error("Unexpected dot segment condition");var n=r[0];e=e.slice(n.length),t.push(n)}return t.join("")}function q(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.iri?a:s,n=[],i=x[(t.scheme||e.scheme||"").toLowerCase()];if(i&&i.serialize&&i.serialize(e,t),e.host)if(r.IPV6ADDRESS.test(e.host));else if(t.domainHost||i&&i.domainHost)try{e.host=t.iri?S(e.host):T(e.host.replace(r.PCT_ENCODED,I).toLowerCase())}catch(r){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+r}A(e,r),"suffix"!==t.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var o=M(e,t);if(void 0!==o&&("suffix"!==t.reference&&n.push("//"),n.push(o),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var c=e.path;t.absolutePath||i&&i.absolutePath||(c=$(c)),void 0===o&&(c=c.replace(/^\/\//,"/%2F")),n.push(c)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function H(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=L(q(e,r),r),t=L(q(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=$(t.path||""),n.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=$(t.path||""),n.query=t.query):(t.path?("/"===t.path.charAt(0)?n.path=$(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path:n.path="/"+t.path,n.path=$(n.path)),n.query=t.query):(n.path=e.path,void 0!==t.query?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function V(e,t){return e&&e.toString().replace(t&&t.iri?a.PCT_ENCODED:s.PCT_ENCODED,I)}var z={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){var r="https"===String(e.scheme).toLowerCase();return e.port!==(r?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},K={scheme:"https",domainHost:z.domainHost,parse:z.parse,serialize:z.serialize};function W(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var G={scheme:"ws",domainHost:!0,parse:function(e,t){var r=e;return r.secure=W(r),r.resourceName=(r.path||"/")+(r.query?"?"+r.query:""),r.path=void 0,r.query=void 0,r},serialize:function(e,t){if(e.port!==(W(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var r=e.resourceName.split("?"),n=c(r,2),i=n[0],o=n[1];e.path=i&&"/"!==i?i:void 0,e.query=o,e.resourceName=void 0}return e.fragment=void 0,e}},Q={scheme:"wss",domainHost:G.domainHost,parse:G.parse,serialize:G.serialize},Y={},J="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",X="[0-9A-Fa-f]",Z=r(r("%[EFef]"+X+"%"+X+X+"%"+X+X)+"|"+r("%[89A-Fa-f]"+X+"%"+X+X)+"|"+r("%"+X+X)),ee=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),te=new RegExp(J,"g"),re=new RegExp(Z,"g"),ne=new RegExp(t("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',ee),"g"),ie=new RegExp(t("[^]",J,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),oe=ie;function se(e){var t=I(e);return t.match(te)?t:e}var ae={scheme:"mailto",parse:function(e,t){var r=e,n=r.to=r.path?r.path.split(","):[];if(r.path=void 0,r.query){for(var i=!1,o={},s=r.query.split("&"),a=0,c=s.length;a{"use strict";r.r(t),r.d(t,{NIL:()=>C,parse:()=>y,stringify:()=>d,v1:()=>m,v3:()=>_,v4:()=>b,v5:()=>w,validate:()=>l,version:()=>E});var n=r(6113),i=r.n(n);const o=new Uint8Array(256);let s=o.length;function a(){return s>o.length-16&&(i().randomFillSync(o),s=0),o.slice(s,s+=16)}const c=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,l=function(e){return"string"==typeof e&&c.test(e)},u=[];for(let e=0;e<256;++e)u.push((e+256).toString(16).substr(1));const d=function(e,t=0){const r=(u[e[t+0]]+u[e[t+1]]+u[e[t+2]]+u[e[t+3]]+"-"+u[e[t+4]]+u[e[t+5]]+"-"+u[e[t+6]]+u[e[t+7]]+"-"+u[e[t+8]]+u[e[t+9]]+"-"+u[e[t+10]]+u[e[t+11]]+u[e[t+12]]+u[e[t+13]]+u[e[t+14]]+u[e[t+15]]).toLowerCase();if(!l(r))throw TypeError("Stringified UUID is invalid");return r};let p,h,f=0,g=0;const m=function(e,t,r){let n=t&&r||0;const i=t||new Array(16);let o=(e=e||{}).node||p,s=void 0!==e.clockseq?e.clockseq:h;if(null==o||null==s){const t=e.random||(e.rng||a)();null==o&&(o=p=[1|t[0],t[1],t[2],t[3],t[4],t[5]]),null==s&&(s=h=16383&(t[6]<<8|t[7]))}let c=void 0!==e.msecs?e.msecs:Date.now(),l=void 0!==e.nsecs?e.nsecs:g+1;const u=c-f+(l-g)/1e4;if(u<0&&void 0===e.clockseq&&(s=s+1&16383),(u<0||c>f)&&void 0===e.nsecs&&(l=0),l>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");f=c,g=l,h=s,c+=122192928e5;const m=(1e4*(268435455&c)+l)%4294967296;i[n++]=m>>>24&255,i[n++]=m>>>16&255,i[n++]=m>>>8&255,i[n++]=255&m;const y=c/4294967296*1e4&268435455;i[n++]=y>>>8&255,i[n++]=255&y,i[n++]=y>>>24&15|16,i[n++]=y>>>16&255,i[n++]=s>>>8|128,i[n++]=255&s;for(let e=0;e<6;++e)i[n+e]=o[e];return t||d(i)},y=function(e){if(!l(e))throw TypeError("Invalid UUID");let t;const r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=255&t,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=255&t,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=255&t,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=255&t,r};function v(e,t,r){function n(e,n,i,o){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=[];for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),process.env.APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL=!0;var n=r(57147),i=r(22037),o=r(71017),s=r(58212),a=r(58144),c=function(){function e(e,t,r,i){var a=this;this.extensionId=e,this.extensionVersion=t,this.firstParty=!1,this.userOptIn=!1,this.firstParty=!!i;var c=process.env.VSCODE_LOGS||"";c&&e&&"trace"===process.env.VSCODE_LOG_LEVEL&&(c=o.join(c,e+".txt"),this.logStream=n.createWriteStream(c,{flags:"a",encoding:"utf8",autoClose:!0})),this.updateUserOptIn(r),void 0!==s.env.onDidChangeTelemetryEnabled?this.optOutListener=s.env.onDidChangeTelemetryEnabled((function(){return a.updateUserOptIn(r)})):this.optOutListener=s.workspace.onDidChangeConfiguration((function(){return a.updateUserOptIn(r)}))}return e.prototype.updateUserOptIn=function(t){var r=s.workspace.getConfiguration(e.TELEMETRY_CONFIG_ID),n=void 0===s.env.isTelemetryEnabled?r.get(e.TELEMETRY_CONFIG_ENABLED_ID,!0):s.env.isTelemetryEnabled;this.userOptIn!==n&&(this.userOptIn=n,this.userOptIn?this.createAppInsightsClient(t):this.dispose())},e.prototype.createAppInsightsClient=function(e){a.defaultClient?(this.appInsightsClient=new a.TelemetryClient(e),this.appInsightsClient.channel.setUseDiskRetryCaching(!0)):(a.setup(e).setAutoCollectRequests(!1).setAutoCollectPerformance(!1).setAutoCollectExceptions(!1).setAutoCollectDependencies(!1).setAutoDependencyCorrelation(!1).setAutoCollectConsole(!1).setUseDiskRetryCaching(!0).start(),this.appInsightsClient=a.defaultClient),this.appInsightsClient.commonProperties=this.getCommonProperties(),s&&s.env&&(this.appInsightsClient.context.tags[this.appInsightsClient.context.keys.userId]=s.env.machineId,this.appInsightsClient.context.tags[this.appInsightsClient.context.keys.sessionId]=s.env.sessionId),e&&0===e.indexOf("AIF-")&&(this.appInsightsClient.config.endpointUrl="https://vortex.data.microsoft.com/collect/v1",this.firstParty=!0)},e.prototype.getCommonProperties=function(){var e=Object.create(null);if(e["common.os"]=i.platform(),e["common.platformversion"]=(i.release()||"").replace(/^(\d+)(\.\d+)?(\.\d+)?(.*)/,"$1$2$3"),e["common.extname"]=this.extensionId,e["common.extversion"]=this.extensionVersion,s&&s.env){switch(e["common.vscodemachineid"]=s.env.machineId,e["common.vscodesessionid"]=s.env.sessionId,e["common.vscodeversion"]=s.version,e["common.isnewappinstall"]=s.env.isNewAppInstall,s.env.uiKind){case s.UIKind.Web:e["common.uikind"]="web";break;case s.UIKind.Desktop:e["common.uikind"]="desktop";break;default:e["common.uikind"]="unknown"}e["common.remotename"]=this.cleanRemoteName(s.env.remoteName)}return e},e.prototype.cleanRemoteName=function(e){if(!e)return"none";var t="other";return["ssh-remote","dev-container","attached-container","wsl"].forEach((function(r){0===e.indexOf(r+"+")&&(t=r)})),t},e.prototype.shouldSendErrorTelemetry=function(){return!this.firstParty||"other"!==this.cleanRemoteName(s.env.remoteName)||void 0!==this.extension&&this.extension.extensionKind!==s.ExtensionKind.Workspace&&s.env.uiKind!==s.UIKind.Web},Object.defineProperty(e.prototype,"extension",{get:function(){return void 0===this._extension&&(this._extension=s.extensions.getExtension(this.extensionId)),this._extension},enumerable:!1,configurable:!0}),e.prototype.cloneAndChange=function(e,t){if(null===e||"object"!=typeof e)return e;if("function"!=typeof t)return e;var r={};for(var n in e)r[n]=t(n,e[n]);return r},e.prototype.anonymizeFilePaths=function(e,t){if(null==e)return"";var r=[new RegExp(s.env.appRoot.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gi")];this.extension&&r.push(new RegExp(this.extension.extensionPath.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gi"));var n=e;if(t){for(var i=[],o=0,a=r;o=n}))&&(n+=e.substring(p,t.index)+"",p=d.lastIndex)};"break"!==h(););p{"use strict";var n;r.r(t),r.d(t,{URI:()=>i,Utils:()=>o}),n=(()=>{var e={470:e=>{function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function r(e,t){for(var r,n="",i=0,o=-1,s=0,a=0;a<=e.length;++a){if(a2){var c=n.lastIndexOf("/");if(c!==n.length-1){-1===c?(n="",i=0):i=(n=n.slice(0,c)).length-1-n.lastIndexOf("/"),o=a,s=0;continue}}else if(2===n.length||1===n.length){n="",i=0,o=a,s=0;continue}t&&(n.length>0?n+="/..":n="..",i=2)}else n.length>0?n+="/"+e.slice(o+1,a):n=e.slice(o+1,a),i=a-o-1;o=a,s=0}else 46===r&&-1!==s?++s:s=-1}return n}var n={resolve:function(){for(var e,n="",i=!1,o=arguments.length-1;o>=-1&&!i;o--){var s;o>=0?s=arguments[o]:(void 0===e&&(e=process.cwd()),s=e),t(s),0!==s.length&&(n=s+"/"+n,i=47===s.charCodeAt(0))}return n=r(n,!i),i?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(e){if(t(e),0===e.length)return".";var n=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=r(e,!n)).length||n||(e="."),e.length>0&&i&&(e+="/"),n?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,r=0;r0&&(void 0===e?e=i:e+="/"+i)}return void 0===e?".":n.normalize(e)},relative:function(e,r){if(t(e),t(r),e===r)return"";if((e=n.resolve(e))===(r=n.resolve(r)))return"";for(var i=1;il){if(47===r.charCodeAt(a+d))return r.slice(a+d+1);if(0===d)return r.slice(a+d)}else s>l&&(47===e.charCodeAt(i+d)?u=d:0===d&&(u=0));break}var p=e.charCodeAt(i+d);if(p!==r.charCodeAt(a+d))break;47===p&&(u=d)}var h="";for(d=i+u+1;d<=o;++d)d!==o&&47!==e.charCodeAt(d)||(0===h.length?h+="..":h+="/..");return h.length>0?h+r.slice(a+u):(a+=u,47===r.charCodeAt(a)&&++a,r.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var r=e.charCodeAt(0),n=47===r,i=-1,o=!0,s=e.length-1;s>=1;--s)if(47===(r=e.charCodeAt(s))){if(!o){i=s;break}}else o=!1;return-1===i?n?"/":".":n&&1===i?"//":e.slice(0,i)},basename:function(e,r){if(void 0!==r&&"string"!=typeof r)throw new TypeError('"ext" argument must be a string');t(e);var n,i=0,o=-1,s=!0;if(void 0!==r&&r.length>0&&r.length<=e.length){if(r.length===e.length&&r===e)return"";var a=r.length-1,c=-1;for(n=e.length-1;n>=0;--n){var l=e.charCodeAt(n);if(47===l){if(!s){i=n+1;break}}else-1===c&&(s=!1,c=n+1),a>=0&&(l===r.charCodeAt(a)?-1==--a&&(o=n):(a=-1,o=c))}return i===o?o=c:-1===o&&(o=e.length),e.slice(i,o)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!s){i=n+1;break}}else-1===o&&(s=!1,o=n+1);return-1===o?"":e.slice(i,o)},extname:function(e){t(e);for(var r=-1,n=0,i=-1,o=!0,s=0,a=e.length-1;a>=0;--a){var c=e.charCodeAt(a);if(47!==c)-1===i&&(o=!1,i=a+1),46===c?-1===r?r=a:1!==s&&(s=1):-1!==r&&(s=-1);else if(!o){n=a+1;break}}return-1===r||-1===i||0===s||1===s&&r===i-1&&r===n+1?"":e.slice(r,i)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var r=t.dir||t.root,n=t.base||(t.name||"")+(t.ext||"");return r?r===t.root?r+n:r+"/"+n:n}(0,e)},parse:function(e){t(e);var r={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return r;var n,i=e.charCodeAt(0),o=47===i;o?(r.root="/",n=1):n=0;for(var s=-1,a=0,c=-1,l=!0,u=e.length-1,d=0;u>=n;--u)if(47!==(i=e.charCodeAt(u)))-1===c&&(l=!1,c=u+1),46===i?-1===s?s=u:1!==d&&(d=1):-1!==s&&(d=-1);else if(!l){a=u+1;break}return-1===s||-1===c||0===d||1===d&&s===c-1&&s===a+1?-1!==c&&(r.base=r.name=0===a&&o?e.slice(1,c):e.slice(a,c)):(0===a&&o?(r.name=e.slice(1,s),r.base=e.slice(1,c)):(r.name=e.slice(a,s),r.base=e.slice(a,c)),r.ext=e.slice(s,c)),a>0?r.dir=e.slice(0,a-1):o&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};n.posix=n,e.exports=n},447:(e,t,r)=>{var n;if(r.r(t),r.d(t,{URI:()=>f,Utils:()=>S}),"object"==typeof process)n="win32"===process.platform;else if("object"==typeof navigator){var i=navigator.userAgent;n=i.indexOf("Windows")>=0}var o,s,a=(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),c=/^\w[\w\d+.-]*$/,l=/^\//,u=/^\/\//,d="",p="/",h=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,f=function(){function e(e,t,r,n,i,o){void 0===o&&(o=!1),"object"==typeof e?(this.scheme=e.scheme||d,this.authority=e.authority||d,this.path=e.path||d,this.query=e.query||d,this.fragment=e.fragment||d):(this.scheme=function(e,t){return e||t?e:"file"}(e,o),this.authority=t||d,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==p&&(t=p+t):t=p}return t}(this.scheme,r||d),this.query=n||d,this.fragment=i||d,function(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&&!c.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!l.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(u.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 ("//")')}(this,o))}return e.isUri=function(t){return t instanceof e||!!t&&"string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme&&"function"==typeof t.fsPath&&"function"==typeof t.with&&"function"==typeof t.toString},Object.defineProperty(e.prototype,"fsPath",{get:function(){return b(this,!1)},enumerable:!1,configurable:!0}),e.prototype.with=function(e){if(!e)return this;var t=e.scheme,r=e.authority,n=e.path,i=e.query,o=e.fragment;return void 0===t?t=this.scheme:null===t&&(t=d),void 0===r?r=this.authority:null===r&&(r=d),void 0===n?n=this.path:null===n&&(n=d),void 0===i?i=this.query:null===i&&(i=d),void 0===o?o=this.fragment:null===o&&(o=d),t===this.scheme&&r===this.authority&&n===this.path&&i===this.query&&o===this.fragment?this:new m(t,r,n,i,o)},e.parse=function(e,t){void 0===t&&(t=!1);var r=h.exec(e);return r?new m(r[2]||d,T(r[4]||d),T(r[5]||d),T(r[7]||d),T(r[9]||d),t):new m(d,d,d,d,d)},e.file=function(e){var t=d;if(n&&(e=e.replace(/\\/g,p)),e[0]===p&&e[1]===p){var r=e.indexOf(p,2);-1===r?(t=e.substring(2),e=p):(t=e.substring(2,r),e=e.substring(r)||p)}return new m("file",t,e,d,d)},e.from=function(e){return new m(e.scheme,e.authority,e.path,e.query,e.fragment)},e.prototype.toString=function(e){return void 0===e&&(e=!1),w(this,e)},e.prototype.toJSON=function(){return this},e.revive=function(t){if(t){if(t instanceof e)return t;var r=new m(t);return r._formatted=t.external,r._fsPath=t._sep===g?t.fsPath:null,r}return t},e}(),g=n?1:void 0,m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._formatted=null,t._fsPath=null,t}return a(t,e),Object.defineProperty(t.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=b(this,!1)),this._fsPath},enumerable:!1,configurable:!0}),t.prototype.toString=function(e){return void 0===e&&(e=!1),e?w(this,!0):(this._formatted||(this._formatted=w(this,!1)),this._formatted)},t.prototype.toJSON=function(){var e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=g),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e},t}(f),y=((s={})[58]="%3A",s[47]="%2F",s[63]="%3F",s[35]="%23",s[91]="%5B",s[93]="%5D",s[64]="%40",s[33]="%21",s[36]="%24",s[38]="%26",s[39]="%27",s[40]="%28",s[41]="%29",s[42]="%2A",s[43]="%2B",s[44]="%2C",s[59]="%3B",s[61]="%3D",s[32]="%20",s);function v(e,t){for(var r=void 0,n=-1,i=0;i=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||45===o||46===o||95===o||126===o||t&&47===o)-1!==n&&(r+=encodeURIComponent(e.substring(n,i)),n=-1),void 0!==r&&(r+=e.charAt(i));else{void 0===r&&(r=e.substr(0,i));var s=y[o];void 0!==s?(-1!==n&&(r+=encodeURIComponent(e.substring(n,i)),n=-1),r+=s):-1===n&&(n=i)}}return-1!==n&&(r+=encodeURIComponent(e.substring(n))),void 0!==r?r:e}function _(e){for(var t=void 0,r=0;r1&&"file"===e.scheme?"//"+e.authority+e.path:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,n&&(r=r.replace(/\//g,"\\")),r}function w(e,t){var r=t?_:v,n="",i=e.scheme,o=e.authority,s=e.path,a=e.query,c=e.fragment;if(i&&(n+=i,n+=":"),(o||"file"===i)&&(n+=p,n+=p),o){var l=o.indexOf("@");if(-1!==l){var u=o.substr(0,l);o=o.substr(l+1),-1===(l=u.indexOf(":"))?n+=r(u,!1):(n+=r(u.substr(0,l),!1),n+=":",n+=r(u.substr(l+1),!1)),n+="@"}-1===(l=(o=o.toLowerCase()).indexOf(":"))?n+=r(o,!1):(n+=r(o.substr(0,l),!1),n+=o.substr(l))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2))(d=s.charCodeAt(1))>=65&&d<=90&&(s="/"+String.fromCharCode(d+32)+":"+s.substr(3));else if(s.length>=2&&58===s.charCodeAt(1)){var d;(d=s.charCodeAt(0))>=65&&d<=90&&(s=String.fromCharCode(d+32)+":"+s.substr(2))}n+=r(s,!0)}return a&&(n+="?",n+=r(a,!1)),c&&(n+="#",n+=t?c:v(c,!1)),n}function C(e){try{return decodeURIComponent(e)}catch(t){return e.length>3?e.substr(0,3)+C(e.substr(3)):e}}var E=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function T(e){return e.match(E)?e.replace(E,(function(e){return C(e)})):e}var S,x=r(470),k=function(){for(var e=0,t=0,r=arguments.length;t{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r(447)})();const{URI:i,Utils:o}=n},60809:(e,t,r)=>{e.exports=r(79321)},94974:(e,t,r)=>{e.exports=r(79321)},59424:(e,t,r)=>{var n,i,o,s,a,c,l;for(s in e.exports=u,n=r(98094),o=[],i={der:d,pem:p,txt:function(e){var t;return"Subject\t"+(t=h(e)).subject.value.map((function(e){return l(e.value[0].value[1].value,"binary").toString("utf8")})).join("/")+"\nValid\t"+t.valid.value.map((function(e){return e.value})).join(" - ")+"\n"+p(e)},asn1:h,x509:function(e){return n().pki.certificateFromAsn1(n().asn1.fromDer(e.toString("binary")))}})a=i[s],u[s]=o.length,o.push(a);function u(e,t){var r;return r=o[e]||o[0],null!=t?r(t):r}function d(e){return c(e)?e:l(e,"binary")}function p(e){var t,r,n,i;for(t=["-----BEGIN CERTIFICATE-----"],r=0,n=(e=d(e).toString("base64")).length;r{var n;e.exports=function(){var e,t,i,o;if(!n)for(t in e=(n=r(35758)).oids,i=r(45337))o=i[t],null==e[t]&&(e[t]=o),null==e[o]&&(e[o]=t);return n}},54586:(e,t,r)=>{var n,i,o,s,a,c;function l(e){var t;return t=n.createHash("sha1"),a(e).subject.value.forEach((function(e){var r,n;(r=(e=s.copy(e)).value[0].value[1]).value&&(r.type=s.Type.UTF8,n=(n=c(r.value,"binary").toString("utf8")).trim().replace(/[A-Z]+/g,(function(e){return e.toLowerCase()})).replace(/\s+/g," "),r.value=c(n,"utf8").toString("binary"),t.update(s.toDer(e).getBytes(),"binary"))})),d(t)}function u(e){var t,r;return t=n.createHash("md5"),r=a(e).subject,t.update(s.toDer(r).getBytes(),"binary"),d(t)}function d(e){return(e=e.digest().slice(0,4)).writeUInt32LE(e.readUInt32BE(0),0),e.toString("hex")}n=r(6113),i=r(98094),o=r(59424),s=i().asn1,a=o(o.asn1),e.exports=function(e,t){var r;return r=0===e?u:l,null!=t?r(t):r},c=Buffer.from||function(e,t){return new Buffer(e,t)}},79321:(e,t,r)=>{var n,i,o;function s(e){var t,s,c,l,u,d,p,h,f;if(null==e&&(e={}),t=n||e.disabled?r(97328):(null!=(s=e.fallback)?s:!i)?r(30141):r(36188),(c=e.store)?Array.isArray(c)||(c=[c]):c=[],t=t[(l=e.async)?"async":"sync"](c),u=l?function(e){Promise.resolve(e).then(g)}:g,!1!==e.unique&&(d=r(59091)()),p=o(e.format),Array.isArray(e.ondata)&&(e.ondata=e.ondata.push.bind(e.ondata)),(e.save||e.$ave)&&(h=r(28553)(e)),e.inject&&(f=r(70229)(e.inject)),e.generator)return(l?function(){var e,t;return(e={})[null!=(t=Symbol.asyncIterator)?t:"@"]=a,e.return=y,e.next=_,e}:function(){var e;return(e={})[Symbol.iterator]=a,e.return=y,e.next=v,e})();function g(t){h&&h(t),t?(f&&f(t),"function"==typeof e.ondata&&e.ondata(p(t))):"function"==typeof e.onend&&e.onend()}function m(e){return u(e),{done:!e,value:null!=e?p(e):e}}function y(e){return t.done(),{done:!0,value:e}}function v(){for(var e;(e=t.next())&&d&&!d(e););return m(e)}function _(){return function e(){return Promise.resolve().then(t.next).then((function(t){return t&&d&&!d(t)?e():m(t)}))}()}t.run((function(e){e&&d&&!d(e)||u(e)}))}function a(){return this}e.exports=s,s.disabled=n="win32"!==process.platform,s.nApi=i=!!process.versions.napi&&s===r(94974)&&!(s.electron=r(53571)()),s.der2=o=r(59424),s.hash=function(){return(s.hash=r(54586)).apply(this,arguments)},s.inject=function(){return(s.inject=r(70229).inject).apply(this,arguments)},s.exe=function(){return(s.exe=r(30141).exe).apply(this,arguments)},function(e,t){for(var r in t)e[r]=t[r]}(s,r(84244)),n||s!==r(60809)||s({inject:!0,$ave:!0,async:!0})},70229:(e,t,r)=>{var n,i,o,s,a,c,l,u;function d(e){return h(e,[]),p}function p(e){c.push(s(e))}function h(e,t){if(t&&(c.length=0,c.push.apply(c,t)),(e="+"===e?2:e?1:0)!==l){switch(l){case 1:a.ca===c&&delete a.ca;break;case 2:i.createSecureContext===f&&(i.createSecureContext=u,u=void 0)}switch(l=e){case 1:a.ca=c;break;case 2:u||(u=i.createSecureContext,i.createSecureContext=f)}}}function f(e){var t,r,n,i,o;if(t=u.apply(this,arguments),2===l&&(null==e||!e.ca))for(r=0,i=(n=c).length;r{e.exports={dc:"0.9.2342.19200300.100.1.25"}},28553:(e,t,r)=>{var n,i,o,s,a,c,l,u,d,p,h;function f(e){return function(){var t,r=this;return t=[].slice.call(arguments),new Promise((function(n,i){t.push((function(e,t){e?i(e):n(t)})),e.apply(r,t)}))}}function g(){}n=r(57147),i=r(22037),o=r(71017),s=r(46467),a=r(59424),c=r(54586),e.exports=function(e){var t,a,c,f,m;return f={},m=new Set,function(e){return Promise.resolve(e).then(y)};function y(p){var h,m;p?(a||(a=(h=e.save||e.$ave,"string"==typeof h?h=[h]:Array.isArray(h)||(h=[o.join(__dirname,"../pem"),o.join(i.homedir(),".local/win-ca/pem")]),m=0,function e(){return m{var n;n=r(6113),e.exports=function(){var e;return e=new Set,function(t){var r;if(r=n.createHash("sha256").update(t).digest("base64"),!e.has(r))return e.add(r),!0}}},84244:(e,t,r)=>{function n(){var e;i(arguments,e={unique:!0,ondata:function(t){"function"==typeof e.$cb&&e.$cb(t)}})}function i(e,t){var n,i;n=r(79321),i=e[0],null==t.unique&&(t.unique=!1),t.format=null!=i?i:n.der2.x509,t.$cb=e[1]||i,n(t)}t.all=function(){var e;return i(arguments,{ondata:e=[]}),e},t.each=n,n.async=function(){var e;i(arguments,e={async:!0,ondata:function(t){"function"==typeof e.$cb&&e.$cb(void 0,t)},onend:function(){"function"==typeof e.$cb&&e.$cb()}})}},51815:(e,t,r)=>{var n={"./crypt32-ia32.node":60660,"./crypt32-x64.node":91225};function i(e){var t=o(e);return r(t)}function o(e){if(!r.o(n,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return n[e]}i.keys=function(){return Object.keys(n)},i.resolve=o,e.exports=i,i.id=51815},46467:(e,t,r)=>{"use strict";const n=r(57147),i=r(71017),o=r(55575),s={mode:511&~process.umask(),fs:n},a=e=>{if("win32"===process.platform&&/[<>:"|?*]/.test(e.replace(i.parse(e).root,""))){const t=new Error(`Path contains invalid characters: ${e}`);throw t.code="EINVAL",t}};e.exports=(e,t)=>Promise.resolve().then((()=>{a(e),t=Object.assign({},s,t);const r=o(t.fs.mkdir),n=o(t.fs.stat),c=e=>r(e,t.mode).then((()=>e)).catch((t=>{if("ENOENT"===t.code){if(t.message.includes("null bytes")||i.dirname(e)===e)throw t;return c(i.dirname(e)).then((()=>c(e)))}return n(e).then((t=>t.isDirectory()?e:Promise.reject())).catch((()=>{throw t}))}));return c(i.resolve(e))})),e.exports.sync=(e,t)=>{a(e),t=Object.assign({},s,t);const r=e=>{try{t.fs.mkdirSync(e,t.mode)}catch(n){if("ENOENT"===n.code){if(n.message.includes("null bytes")||i.dirname(e)===e)throw n;return r(i.dirname(e)),r(e)}try{if(!t.fs.statSync(e).isDirectory())throw new Error("The path is not a directory")}catch(e){throw n}}return e};return r(i.resolve(e))}},44617:(e,t,r)=>{var n,i,o;n={271:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultFileSystem=t.FileSystem=void 0;const n=r(747);t.FileSystem=class{},t.defaultFileSystem={readFile:e=>n.promises.readFile(e),mtime:async e=>(await n.promises.stat(e)).mtimeMs,async stat(e){const t=await n.promises.stat(e);return{ctime:t.ctimeMs,mtime:t.mtimeMs,size:t.size}}}},876:(e,t)=>{"use strict";function r(e){return"virtual"===e.type}function n(e){return"top"===e.type}Object.defineProperty(t,"__esModule",{value:!0}),t.duplicateTree=t.cutTreeAfterLine=t.isTop=t.isVirtual=t.isLine=t.isBlank=t.topNode=t.blankNode=t.lineNode=t.virtualNode=void 0,t.virtualNode=function(e,t,r){return{type:"virtual",indentation:e,subs:t,label:r}},t.lineNode=function(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}},t.blankNode=function(e){return{type:"blank",lineNumber:e,subs:[]}},t.topNode=function(e){return{type:"top",indentation:-1,subs:e??[]}},t.isBlank=function(e){return"blank"===e.type},t.isLine=function(e){return"line"===e.type},t.isVirtual=r,t.isTop=n,t.cutTreeAfterLine=function(e,t){!function e(i){if(!r(i)&&!n(i)&&i.lineNumber===t)return i.subs=[],!0;for(let t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.lastLineOf=t.firstLineOf=t.encodeTree=t.describeTree=t.deparseAndCutTree=t.deparseTree=t.deparseLine=void 0;const n=r(876),i=r(617);function o(e){return" ".repeat(e.indentation)+e.sourceLine+"\n"}function s(e){return(0,i.foldTree)(e,"",(function(e,t){let r="";return(0,n.isLine)(e)?r=o(e):(0,n.isBlank)(e)&&(r="\n"),t+r}),"topDown")}t.deparseLine=o,t.deparseTree=s,t.deparseAndCutTree=function(e,t){const r=new Set(t),i=[];let a="";return function e(t){void 0!==t.label&&r.has(t.label)?(""!==a&&i.push({label:void 0,source:a}),i.push({label:t.label,source:s(t)}),a=""):((0,n.isLine)(t)&&(a+=o(t)),t.subs.forEach(e))}(e),""!==a&&i.push({label:void 0,source:a}),i},t.describeTree=function e(t,r=0){const i=" ".repeat(r);if(void 0===t)return"UNDEFINED NODE";let o;o=void 0===t.subs?"UNDEFINED SUBS":t.subs.map((t=>e(t,r+2))).join(",\n"),o=""===o?"[]":`[\n${o}\n ${i}]`;const s=((0,n.isVirtual)(t)||(0,n.isTop)(t)?" ":String(t.lineNumber).padStart(3," "))+`: ${i}`,a=void 0===t.label?"":JSON.stringify(t.label);return(0,n.isVirtual)(t)||(0,n.isTop)(t)?`${s}vnode(${t.indentation}, ${a}, ${o})`:(0,n.isBlank)(t)?`${s}blank(${a??""})`:`${s}lnode(${t.indentation}, ${a}, ${JSON.stringify(t.sourceLine)}, ${o})`},t.encodeTree=function e(t,r=""){const i=void 0===t.label?"":`, ${JSON.stringify(t.label)}`,o=!(0,n.isBlank)(t)&&t.subs.length>0?`[\n${t.subs.map((t=>e(t,r+" "))).join(", \n")}\n${r}]`:"[]";switch(t.type){case"blank":return`${r}blankNode(${t.lineNumber}${i})`;case"top":return`topNode(${o}${i})`;case"virtual":return`${r}virtualNode(${t.indentation}, ${o}${i})`;case"line":return`${r}lineNode(${t.indentation}, ${t.lineNumber}, "${t.sourceLine}", ${o}${i})`}},t.firstLineOf=function e(t){if((0,n.isLine)(t)||(0,n.isBlank)(t))return t.lineNumber;for(const r of t.subs){const t=e(r);if(void 0!==t)return t}},t.lastLineOf=function e(t){let r,i=t.subs.length-1;for(;i>=0&&void 0===r;)r=e(t.subs[i]),i--;return void 0!==r||(0,n.isVirtual)(t)||(0,n.isTop)(t)?r:t.lineNumber}},180:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0});const o=r(647),s=r(152),a=r(469);(0,a.registerLanguageSpecificParser)("markdown",s.processMarkdown),(0,a.registerLanguageSpecificParser)("java",o.processJava),i(r(876),t),i(r(59),t),i(r(617),t),i(r(469),t),i(r(312),t)},647:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.processJava=void 0;const n=r(876),i=r(617),o=r(469),s=(0,o.buildLabelRules)({package:/^package /,import:/^import /,class:/\bclass /,interface:/\binterface /,javadoc:/^\/\*\*/,comment_multi:/^\/\*[^*]/,comment_single:/^\/\//,annotation:/^@/,opener:/^[\[({]/,closer:/^[\])}]/});t.processJava=function(e){let t=e;return(0,o.labelLines)(t,s),t=(0,o.combineClosersAndOpeners)(t),t=(0,o.flattenVirtual)(t),(0,o.labelVirtualInherited)(t),(0,i.visitTree)(t,(e=>{if("class"===e.label||"interface"===e.label)for(const t of e.subs)(0,n.isBlank)(t)||void 0!==t.label&&"annotation"!==t.label||(t.label="member")}),"bottomUp"),t}},617:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.rebuildTree=t.foldTree=t.visitTreeConditionally=t.visitTree=t.resetLineNumbers=t.mapLabels=t.clearLabelsIf=t.clearLabels=void 0;const n=r(876);function i(e,t,r){!function e(n){"topDown"===r&&t(n),n.subs.forEach((t=>{e(t)})),"bottomUp"===r&&t(n)}(e)}t.clearLabels=function(e){return i(e,(e=>{e.label=void 0}),"bottomUp"),e},t.clearLabelsIf=function(e,t){return i(e,(e=>{e.label=e.label?t(e.label)?void 0:e.label:void 0}),"bottomUp"),e},t.mapLabels=function e(t,r){switch(t.type){case"line":case"virtual":const n=t.subs.map((t=>e(t,r)));return{...t,subs:n,label:t.label?r(t.label):void 0};case"blank":return{...t,label:t.label?r(t.label):void 0};case"top":return{...t,subs:t.subs.map((t=>e(t,r))),label:t.label?r(t.label):void 0}}},t.resetLineNumbers=function(e){let t=0;i(e,(function(e){(0,n.isVirtual)(e)||(0,n.isTop)(e)||(e.lineNumber=t,t++)}),"topDown")},t.visitTree=i,t.visitTreeConditionally=function(e,t,r){!function e(n){if("topDown"===r&&!t(n))return!1;let i=!0;return n.subs.forEach((t=>{i=i&&e(t)})),"bottomUp"===r&&(i=i&&t(n)),i}(e)},t.foldTree=function(e,t,r,n){let o=t;return i(e,(function(e){o=r(e,o)}),n),o},t.rebuildTree=function(e,t,r){const i=e=>{if(void 0!==r&&r(e))return e;{const r=e.subs.map(i).filter((e=>void 0!==e));return e.subs=r,t(e)}},o=i(e);return void 0!==o?o:(0,n.topNode)()}},152:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.processMarkdown=void 0;const n=r(876),i=r(469),o=(0,i.buildLabelRules)({heading:/^# /,subheading:/^## /,subsubheading:/### /});t.processMarkdown=function(e){let t=e;if((0,i.labelLines)(t,o),(0,n.isBlank)(t))return t;function r(e){return"heading"===e.label?1:"subheading"===e.label?2:"subsubheading"===e.label?3:void 0}let s=[t],a=[...t.subs];t.subs=[];for(const e of a){const t=r(e);if(void 0===t||(0,n.isBlank)(e))s[s.length-1].subs.push(e);else{for(;s.lengtht+1;)s.pop()}}return t=(0,i.groupBlocks)(t),t=(0,i.flattenVirtual)(t),(0,i.labelVirtualInherited)(t),t}},469:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseTree=t.registerLanguageSpecificParser=t.flattenVirtual=t.groupBlocks=t.combineClosersAndOpeners=t.buildLabelRules=t.labelVirtualInherited=t.labelLines=t.parseRaw=void 0;const n=r(876),i=r(617);function o(e){const t=e.split("\n"),r=t.map((e=>e.match(/^\s*/)[0].length)),i=t.map((e=>e.trimLeft()));function o(e){const[t,o]=s(e+1,r[e]);return[(0,n.lineNode)(r[e],e,i[e],t),o]}function s(e,t){let s;const a=[];let c,l=e;for(;lt);)if(""===i[l])void 0===c&&(c=l),l+=1;else{if(void 0!==c){for(let e=c;et.matches(e.sourceLine)));r&&(e.label=r.label)}}),"bottomUp")}function a(e){return Object.keys(e).map((t=>{let r;return r=e[t].test?r=>e[t].test(r):e[t],{matches:r,label:t}}))}function c(e){const t=(0,i.rebuildTree)(e,(function(e){if(0===e.subs.length||-1===e.subs.findIndex((e=>"closer"===e.label||"opener"===e.label)))return e;const t=[];let r;for(let i=0;is.subs.push(e))),o.subs=[];else if("closer"===o.label&&void 0!==r&&((0,n.isLine)(o)||(0,n.isVirtual)(o))&&o.indentation>=r.indentation){let e=t.length-1;for(;e>0&&(0,n.isBlank)(t[e]);)e-=1;if(r.subs.push(...t.splice(e+1)),o.subs.length>0){const e=r.subs.findIndex((e=>"newVirtual"!==e.label)),t=r.subs.slice(0,e),i=r.subs.slice(e),s=i.length>0?[(0,n.virtualNode)(o.indentation,i,"newVirtual")]:[];r.subs=[...t,...s,o]}else r.subs.push(o)}else t.push(o),(0,n.isBlank)(o)||(r=o)}return e.subs=t,e}));return(0,i.clearLabelsIf)(e,(e=>"newVirtual"===e)),t}t.parseRaw=o,t.labelLines=s,t.labelVirtualInherited=function(e){(0,i.visitTree)(e,(function(e){if((0,n.isVirtual)(e)&&void 0===e.label){const t=e.subs.filter((e=>!(0,n.isBlank)(e)));1===t.length&&(e.label=t[0].label)}}),"bottomUp")},t.buildLabelRules=a,t.combineClosersAndOpeners=c,t.groupBlocks=function(e,t=n.isBlank,r){return(0,i.rebuildTree)(e,(function(e){if(e.subs.length<=1)return e;const i=[];let o,s=[],a=!1;function c(e=!1){if(void 0!==o&&(i.length>0||!e)){const e=(0,n.virtualNode)(o,s,r);i.push(e)}else s.forEach((e=>i.push(e)))}for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getWindowsDelineations=void 0;const n=r(469),i=r(617);t.getWindowsDelineations=function(e,t,r,o){if(e.length{if("blank"===e.type)return void(e.label={totalLength:1,firstLineAfter:e.lineNumber+1});let t="line"===e.type?1:0,n="line"===e.type?e.lineNumber+1:NaN;function i(r){return-1==r?n-t:e.subs[r].label.firstLineAfter-e.subs[r].label.totalLength}function a(t,r){return 0==t?r+1:e.subs[t-1].label.firstLineAfter}let c="line"===e.type?-1:0,l="line"===e.type?1:0,u=0;for(let d=0;d=0&&co){const t=i(c),n=a(d,t),p=u==d?n:a(u,t);for(r<=n-t&&s.push([t,p]);l>o;)l-=-1==c?"line"==e.type?1:0:e.subs[c].label.totalLength,c++}}if(ce[0]-t[0]||e[1]-t[1])).filter(((e,t,r)=>0==t||e[0]!=r[t-1][0]||e[1]!=r[t-1][1]))}},417:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPathMarker=t.getLanguageMarker=t.comment=t.hasLanguageMarker=t.languageCommentMarkers=void 0,t.languageCommentMarkers={abap:{start:'"',end:""},bat:{start:"REM",end:""},bibtex:{start:"%",end:""},blade:{start:"#",end:""},c:{start:"//",end:""},clojure:{start:";",end:""},coffeescript:{start:"//",end:""},cpp:{start:"//",end:""},csharp:{start:"//",end:""},css:{start:"/*",end:"*/"},dart:{start:"//",end:""},dockerfile:{start:"#",end:""},elixir:{start:"#",end:""},erb:{start:"<%#",end:"%>"},erlang:{start:"%",end:""},fsharp:{start:"//",end:""},go:{start:"//",end:""},groovy:{start:"//",end:""},haml:{start:"-#",end:""},handlebars:{start:"{{!",end:"}}"},haskell:{start:"--",end:""},html:{start:"\x3c!--",end:"--\x3e"},ini:{start:";",end:""},java:{start:"//",end:""},javascript:{start:"//",end:""},javascriptreact:{start:"//",end:""},jsonc:{start:"//",end:""},jsx:{start:"//",end:""},julia:{start:"#",end:""},kotlin:{start:"//",end:""},latex:{start:"%",end:""},less:{start:"//",end:""},lua:{start:"--",end:""},makefile:{start:"#",end:""},markdown:{start:"[]: #",end:""},"objective-c":{start:"//",end:""},"objective-cpp":{start:"//",end:""},perl:{start:"#",end:""},php:{start:"//",end:""},powershell:{start:"#",end:""},pug:{start:"//",end:""},python:{start:"#",end:""},ql:{start:"//",end:""},r:{start:"#",end:""},razor:{start:"\x3c!--",end:"--\x3e"},ruby:{start:"#",end:""},rust:{start:"//",end:""},sass:{start:"//",end:""},scala:{start:"//",end:""},scss:{start:"//",end:""},shellscript:{start:"#",end:""},slim:{start:"/",end:""},solidity:{start:"//",end:""},sql:{start:"--",end:""},stylus:{start:"//",end:""},svelte:{start:"\x3c!--",end:"--\x3e"},swift:{start:"//",end:""},terraform:{start:"#",end:""},tex:{start:"%",end:""},typescript:{start:"//",end:""},typescriptreact:{start:"//",end:""},vb:{start:"'",end:""},verilog:{start:"//",end:""},"vue-html":{start:"\x3c!--",end:"--\x3e"},vue:{start:"//",end:""},xml:{start:"\x3c!--",end:"--\x3e"},xsl:{start:"\x3c!--",end:"--\x3e"},yaml:{start:"#",end:""}};const r=["php","plaintext"],n={html:"",python:"#!/usr/bin/env python3",ruby:"#!/usr/bin/env ruby",shellscript:"#!/bin/sh",yaml:"# YAML data"};function i({source:e}){return e.startsWith("#!")||e.startsWith("{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extractLocalImportContext=t.getDocComment=void 0;const n=r(622),i=r(306);function o(e,t){let r=t.namedChild(1)?.text.slice(1,-1);if(!r||!r.startsWith("."))return null;if(""===(0,n.extname)(r))r+=".ts";else if(".ts"!==(0,n.extname)(r))return null;return(0,n.join)((0,n.dirname)(e),r)}function s(e){let t=[];if("import_clause"===e.namedChild(0)?.type){let r=e.namedChild(0);if("named_imports"===r?.namedChild(0)?.type){let e=r.namedChild(0);for(let r of e?.namedChildren??[])if("import_specifier"===r.type){const e=r.childForFieldName("name")?.text;if(e){const n=r.childForFieldName("alias")?.text;t.push({name:e,alias:n})}}}}return t}const a=new Map;function c(e,t){let r=t?.childForFieldName("name")?.text??"";switch(t?.type){case"ambient_declaration":return c(e,t.namedChild(0));case"interface_declaration":case"enum_declaration":case"type_alias_declaration":return{name:r,decl:t.text};case"function_declaration":case"function_signature":return{name:r,decl:l(e,t)};case"class_declaration":{let n=function(e,t){let r=t.childForFieldName("body");if(r)return r.namedChildren.map((t=>d(e,t))).filter((e=>e))}(e,t),i="";if(n){let r=t.childForFieldName("body");i=`declare ${e.substring(t.startIndex,r.startIndex+1)}`,i+=n.map((e=>"\n"+e)).join(""),i+="\n}"}return{name:r,decl:i}}}return{name:r,decl:""}}function l(e,t){const r=t.childForFieldName("return_type")?.endIndex??t.childForFieldName("parameters")?.endIndex;if(void 0!==r){let n=e.substring(t.startIndex,r)+";";return"function_declaration"===t.type||"function_signature"===t.type?"declare "+n:n}return""}function u(e,t){const r=(0,i.getFirstPrecedingComment)(t);return r?e.substring(r.startIndex,t.startIndex):""}function d(e,t){if("accessibility_modifier"===t?.firstChild?.type&&"private"===t.firstChild.text)return"";const r=function(e,t){let r=t.startIndex-1;for(;r>=0&&(" "===e[r]||"\t"===e[r]);)r--;if(r<0||"\n"===e[r])return e.substring(r+1,t.startIndex)}(e,(0,i.getFirstPrecedingComment)(t)??t)??" ",n=u(e,t);switch(t.type){case"ambient_declaration":const i=t.namedChild(0);return i?r+n+d(e,i):"";case"method_definition":case"method_signature":return r+n+l(e,t);case"public_field_definition":{let i=t.childForFieldName("type")?.endIndex??t.childForFieldName("name")?.endIndex;if(void 0!==i)return r+n+e.substring(t.startIndex,i)+";"}}return""}async function p(e,t,r){let n=new Map,o=-1;try{o=await r.mtime(e)}catch{return n}let s=a.get(e);if(s&&s.mtime===o)return s.exports;if("typescript"===t){let o=null;try{let s=(await r.readFile(e)).toString();o=await(0,i.parseTreeSitter)(t,s);for(let e of(0,i.queryExports)(t,o.rootNode))for(let t of e.captures){let e=t.node;if("export_statement"===e.type){let t=e.childForFieldName("declaration");if(t?.hasError())continue;let{name:r,decl:i}=c(s,t);if(r){i=u(s,e)+i;let t=n.get(r);t||(t=[],n.set(r,t)),t.push(i)}}}}catch{}finally{o&&o.delete()}}if(a.size>2e3)for(let e of a.keys())if(a.delete(e),n.size<=1e3)break;return a.set(e,{mtime:o,exports:n}),n}t.getDocComment=u;const h=/^\s*import\s*(type|)\s*\{[^}]*\}\s*from\s*['"]\./gm;t.extractLocalImportContext=async function(e,t){let{source:r,uri:n,languageId:a}=e;return t&&"typescript"===a?async function(e,t,r){let n="typescript",a=[];const c=function(e){let t,r=-1;h.lastIndex=-1;do{t=h.exec(e),t&&(r=h.lastIndex+t.length)}while(t);if(-1===r)return-1;const n=e.indexOf("\n",r);return-1!==n?n:e.length}(e);if(-1===c)return a;e=e.substring(0,c);let l=await(0,i.parseTreeSitter)(n,e);try{for(let e of function(e){let t=[];for(let r of e.namedChildren)"import_statement"===r.type&&t.push(r);return t}(l.rootNode)){let i=o(t,e);if(!i)continue;let c=s(e);if(0===c.length)continue;let l=await p(i,n,r);for(let e of c)l.has(e.name)&&a.push(...l.get(e.name))}}finally{l.delete()}return a}(r,n,t):[]}},306:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFunctionPositions=t.getFirstPrecedingComment=t.isFunctionDefinition=t.isFunction=t.getAncestorWithSiblingFunctions=t.queryPythonIsDocstring=t.queryGlobalVars=t.queryExports=t.queryImports=t.queryFunctions=t.getBlockCloseToken=t.parsesWithoutError=t.parseTreeSitter=t.getLanguage=t.languageIdToWasmLanguage=t.isSupportedLanguageId=t.WASMLanguage=void 0;const n=r(622),i=r(201),o=r(201);var s;!function(e){e.Python="python",e.JavaScript="javascript",e.TypeScript="typescript",e.Go="go",e.Ruby="ruby"}(s=t.WASMLanguage||(t.WASMLanguage={}));const a={python:s.Python,javascript:s.JavaScript,javascriptreact:s.JavaScript,jsx:s.JavaScript,typescript:s.TypeScript,typescriptreact:s.TypeScript,go:s.Go,ruby:s.Ruby};function c(e){if(!(e in a))throw new Error(`Unrecognized language: ${e}`);return a[e]}t.isSupportedLanguageId=function(e){return e in a},t.languageIdToWasmLanguage=c;const l={python:[["(function_definition body: (block\n (expression_statement (string))? @docstring) @body) @function"],['(ERROR ("def" (identifier) (parameters))) @function']],javascript:[["[\n (function body: (statement_block) @body)\n (function_declaration body: (statement_block) @body)\n (generator_function body: (statement_block) @body)\n (generator_function_declaration body: (statement_block) @body)\n (method_definition body: (statement_block) @body)\n ] @function"]],typescript:[["[\n (function body: (statement_block) @body)\n (function_declaration body: (statement_block) @body)\n (generator_function body: (statement_block) @body)\n (generator_function_declaration body: (statement_block) @body)\n (method_definition body: (statement_block) @body)\n ] @function"]],go:[["[\n (function_declaration body: (block) @body)\n (method_declaration body: (block) @body)\n ] @function"]],ruby:[['[\n (method name: (_) parameters: (method_parameters)? @params [(_)+ "end"] @body)\n (singleton_method name: (_) parameters: (method_parameters)? @params [(_)+ "end"] @body)\n ] @function']]},u='(variable_declarator value: (call_expression function: ((identifier) @req (#eq? @req "require"))))',d=`\n (lexical_declaration ${u}+)\n (variable_declaration ${u}+)\n`,p={python:[["(module (future_import_statement) @import)"],["(module (import_statement) @import)"],["(module (import_from_statement) @import)"]],javascript:[[`(program [ ${d} ] @import)`],["(program [ (import_statement) ] @import)"]],typescript:[[`(program [ ${d} ] @import)`],["(program [ (import_statement) (import_alias) ] @import)"]],go:[],ruby:[]},h={python:[],javascript:[["(program (export_statement) @export)"]],typescript:[["(program (export_statement) @export)"]],go:[],ruby:[]},f={python:[["(module (global_statement) @globalVar)"],["(module (expression_statement) @globalVar)"]],javascript:[],typescript:[],go:[],ruby:[]},g={python:new Set(["function_definition"]),javascript:new Set(["function","function_declaration","generator_function","generator_function_declaration","method_definition","arrow_function"]),typescript:new Set(["function","function_declaration","generator_function","generator_function_declaration","method_definition","arrow_function"]),go:new Set(["function_declaration","method_declaration"]),ruby:new Set(["method","singleton_method"])},m={python:e=>"module"===e.type||"block"===e.type&&"class_definition"===e.parent?.type,javascript:e=>"program"===e.type||"class_body"===e.type,typescript:e=>"program"===e.type||"class_body"===e.type,go:e=>"source_file"===e.type,ruby:e=>"program"===e.type||"class"===e.type},y=new Map;async function v(e){const t=c(e);if(!y.has(t)){const e=await async function(e){await i.init();const t=(0,n.resolve)(__dirname,"..","dist",`tree-sitter-${e}.wasm`);return o.Language.load(t)}(t);y.set(t,e)}return y.get(t)}async function _(e,t){let r=await v(e);const n=new i;n.setLanguage(r);const o=n.parse(t);return n.delete(),o}function b(e,t){const r=[];for(const n of e){if(!n[1]){const e=t.tree.getLanguage();n[1]=e.query(n[0])}r.push(...n[1].matches(t))}return r}function w(e,t){return b(l[c(e)],t)}t.getLanguage=v,t.parseTreeSitter=_,t.parsesWithoutError=async function(e,t){const r=await _(e,t),n=!r.rootNode.hasError();return r.delete(),n},t.getBlockCloseToken=function(e){switch(c(e)){case s.Python:return null;case s.JavaScript:case s.TypeScript:case s.Go:return"}";case s.Ruby:return"end"}},t.queryFunctions=w,t.queryImports=function(e,t){return b(p[c(e)],t)},t.queryExports=function(e,t){return b(h[c(e)],t)},t.queryGlobalVars=function(e,t){return b(f[c(e)],t)};const C=["[\n (class_definition (block (expression_statement (string))))\n (function_definition (block (expression_statement (string))))\n]"];function E(e,t){return g[c(e)].has(t.type)}t.queryPythonIsDocstring=function(e){return 1==b([C],e).length},t.getAncestorWithSiblingFunctions=function(e,t){const r=m[c(e)];for(;t.parent;){if(r(t.parent))return t;t=t.parent}return t.parent?t:null},t.isFunction=E,t.isFunctionDefinition=function(e,t){switch(c(e)){case s.Python:case s.Go:case s.Ruby:return E(e,t);case s.JavaScript:case s.TypeScript:if("function_declaration"===t.type||"generator_function_declaration"===t.type||"method_definition"===t.type)return!0;if("lexical_declaration"===t.type||"variable_declaration"===t.type){if(t.namedChildCount>1)return!1;let r=t.namedChild(0);if(null==r)return!1;let n=r.namedChild(1);return null!==n&&E(e,n)}if("expression_statement"===t.type){let r=t.namedChild(0);if("assignment_expression"===r?.type){let t=r.namedChild(1);return null!==t&&E(e,t)}}return!1}},t.getFirstPrecedingComment=function(e){let t=e;for(;"comment"===t.previousSibling?.type;){let e=t.previousSibling;if(e.endPosition.row{const t=e.captures.find((e=>"function"===e.name)).node;return{startIndex:t.startIndex,endIndex:t.endIndex}}));return r.delete(),n}},610:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getNodeStart=t.isBlockBodyFinished=t.isEmptyBlockStart=t.getBlockParser=void 0;const n=r(306);class i{constructor(e,t,r){this.languageId=e,this.nodeMatch=t,this.nodeTypesWithBlockOrStmtChild=r}async getNodeMatchAtPosition(e,t,r){const i=await(0,n.parseTreeSitter)(this.languageId,e);try{let e=i.rootNode.descendantForIndex(t);for(;e;){const t=this.nodeMatch[e.type];if(t){if(!this.nodeTypesWithBlockOrStmtChild.has(e.type))break;const r=this.nodeTypesWithBlockOrStmtChild.get(e.type);if((""==r?e.namedChildren[0]:e.childForFieldName(r))?.type==t)break}e=e.parent}if(!e)return;return r(e)}finally{i.delete()}}getNextBlockAtPosition(e,t,r){return this.getNodeMatchAtPosition(e,t,(e=>{let t=e.children.reverse().find((t=>t.type==this.nodeMatch[e.type]));if(t){if("python"==this.languageId&&t.parent){const e=":"==t.parent.type?t.parent.parent:t.parent;let r=e?.nextSibling;for(;r&&"comment"==r.type;){const n=r.startPosition.row==t.endPosition.row&&r.startPosition.column>=t.endPosition.column,i=r.startPosition.row>e.endPosition.row&&r.startPosition.column>e.startPosition.column;if(!n&&!i)break;t=r,r=r.nextSibling}}if(!(t.endIndex>=t.tree.rootNode.endIndex-1&&(t.hasError()||t.parent.hasError())))return r(t)}}))}async isBlockBodyFinished(e,t,r){const n=(e+t).trimEnd(),i=await this.getNextBlockAtPosition(n,r,(e=>e.endIndex));if(void 0!==i&&i0?t:void 0}}getNodeStart(e,t){const r=e.trimEnd();return this.getNodeMatchAtPosition(r,t,(e=>e.startIndex))}}class o extends i{constructor(e,t,r,n,i){super(e,n,i),this.blockEmptyMatch=t,this.lineMatch=r}isBlockStart(e){return this.lineMatch.test(e.trimStart())}async isBlockBodyEmpty(e,t){const r=await this.getNextBlockAtPosition(e,t,(r=>{r.startIndex0&&/\s/.test(e.charAt(r-1));)r--;return r}function a(e,t){const r=e.startIndex,n=e.startIndex-e.startPosition.column,i=t.substring(n,r);if(/^\s*$/.test(i))return i}function c(e,t,r){if(t.startPosition.row<=e.startPosition.row)return!1;const n=a(e,r),i=a(t,r);return void 0!==n&&void 0!==i&&n.startsWith(i)}class l extends i{constructor(e,t,r,n,i,o,s){super(e,t,r),this.startKeywords=n,this.blockNodeType=i,this.emptyStatementType=o,this.curlyBraceLanguage=s}isBlockEmpty(e,t){let r=e.text.trim();return this.curlyBraceLanguage&&(r.startsWith("{")&&(r=r.slice(1)),r.endsWith("}")&&(r=r.slice(0,-1)),r=r.trim()),0==r.length||!("python"!=this.languageId||"class_definition"!=e.parent?.type&&"function_definition"!=e.parent?.type||1!=e.children.length||!(0,n.queryPythonIsDocstring)(e.parent))}async isEmptyBlockStart(e,t){if(t>e.length)throw new RangeError("Invalid offset");for(let r=t;r";"==e.type))&&r.endIndex<=t}r=r.parent}}let i=null,o=null,s=null,a=n;for(;null!=a;){if(a.type==this.blockNodeType){o=a;break}if(this.nodeMatch[a.type]){s=a;break}if("ERROR"==a.type){i=a;break}a=a.parent}if(null!=o){if(!o.parent||!this.nodeMatch[o.parent.type])return!1;if("python"==this.languageId){const e=o.previousSibling;if(null!=e&&e.hasError()&&(e.text.startsWith('"""')||e.text.startsWith("'''")))return!0}return this.isBlockEmpty(o,t)}if(null!=i){if("module"==i.previousSibling?.type||"internal_module"==i.previousSibling?.type)return!0;const e=[...i.children].reverse(),r=e.find((e=>this.startKeywords.includes(e.type)));let o=e.find((e=>e.type==this.blockNodeType));if(r){switch(this.languageId){case"python":{"try"==r.type&&"identifier"==n.type&&n.text.length>4&&(o=e.find((e=>e.hasError()))?.children.find((e=>"block"==e.type)));const t=e.find((e=>":"==e.type));if(t&&r.endIndex<=t.startIndex&&t.nextSibling){if("def"==r.type){const e=t.nextSibling;if('"'==e.type||"'"==e.type)return!0;if("ERROR"==e.type&&('"""'==e.text||"'''"==e.text))return!0}return!1}break}case"javascript":{const t=e.find((e=>"formal_parameters"==e.type));if("class"==r.type&&t)return!0;const n=e.find((e=>"{"==e.type));if(n&&n.startIndex>r.endIndex&&null!=n.nextSibling)return!1;if(e.find((e=>"do"==e.type))&&"while"==r.type)return!1;if("=>"==r.type&&r.nextSibling&&"{"!=r.nextSibling.type)return!1;break}case"typescript":{const t=e.find((e=>"{"==e.type));if(t&&t.startIndex>r.endIndex&&null!=t.nextSibling)return!1;if(e.find((e=>"do"==e.type))&&"while"==r.type)return!1;if("=>"==r.type&&r.nextSibling&&"{"!=r.nextSibling.type)return!1;break}}return!(o&&o.startIndex>r.endIndex)||this.isBlockEmpty(o,t)}}if(null!=s){const e=this.nodeMatch[s.type],r=s.children.slice().reverse().find((t=>t.type==e));if(r)return this.isBlockEmpty(r,t);if(this.nodeTypesWithBlockOrStmtChild.has(s.type)){const e=this.nodeTypesWithBlockOrStmtChild.get(s.type),t=""==e?s.children[0]:s.childForFieldName(e);if(t&&t.type!=this.blockNodeType&&t.type!=this.emptyStatementType)return!1}return!0}return!1}finally{r.delete()}}}const u={python:new l("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 l("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 l("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),go:new o("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 o("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)};function d(e){return u[(0,n.languageIdToWasmLanguage)(e)]}t.getBlockParser=d,t.isEmptyBlockStart=async function(e,t,r){return!!(0,n.isSupportedLanguageId)(e)&&d(e).isEmptyBlockStart(t,r)},t.isBlockBodyFinished=async function(e,t,r,i){if((0,n.isSupportedLanguageId)(e))return d(e).isBlockBodyFinished(t,r,i)},t.getNodeStart=async function(e,t,r){if((0,n.isSupportedLanguageId)(e))return d(e).getNodeStart(t,r)}},360:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPrompt=t.newLineEnded=t.normalizeLanguageId=t.PromptOptions=t.SuffixStartMode=t.SuffixMatchOption=t.SuffixOption=t.LineEndingOptions=t.LocalImportContextOption=t.SnippetSelectionOption=t.NeighboringSnippetType=t.NeighboringTabsPositionOption=t.NeighboringTabsOption=t.SiblingOption=t.PathMarkerOption=t.LanguageMarkerOption=t.TOKENS_RESERVED_FOR_SUFFIX_ENCODING=t.MAX_EDIT_DISTANCE_LENGTH=t.MAX_PROMPT_LENGTH=void 0;const n=r(417),i=r(179),o=r(125),s=r(670),a=r(411),c=r(456),l=r(395);let u={text:"",tokens:[]};var d,p,h,f,g,m,y,v,_,b,w,C;t.MAX_PROMPT_LENGTH=1500,t.MAX_EDIT_DISTANCE_LENGTH=50,t.TOKENS_RESERVED_FOR_SUFFIX_ENCODING=5,function(e){e.NoMarker="nomarker",e.Top="top",e.Always="always"}(d=t.LanguageMarkerOption||(t.LanguageMarkerOption={})),function(e){e.NoMarker="nomarker",e.Top="top",e.Always="always"}(p=t.PathMarkerOption||(t.PathMarkerOption={})),function(e){e.NoSiblings="nosiblings",e.SiblingsOverContext="siblingabove",e.ContextOverSiblings="contextabove"}(h=t.SiblingOption||(t.SiblingOption={})),function(e){e.None="none",e.Conservative="conservative",e.Medium="medium",e.Eager="eager",e.EagerButLittle="eagerButLittle",e.EagerButMedium="eagerButMedium"}(f=t.NeighboringTabsOption||(t.NeighboringTabsOption={})),function(e){e.TopOfText="top",e.DirectlyAboveCursor="aboveCursor",e.AfterSiblings="afterSiblings"}(g=t.NeighboringTabsPositionOption||(t.NeighboringTabsPositionOption={})),function(e){e.NeighboringFunctions="neighboringFunction",e.NeighboringSnippets="neighboringSnippet"}(m=t.NeighboringSnippetType||(t.NeighboringSnippetType={})),function(e){e.BestMatch="bestMatch",e.TopK="topK"}(y=t.SnippetSelectionOption||(t.SnippetSelectionOption={})),function(e){e.NoContext="nocontext",e.Declarations="declarations"}(v=t.LocalImportContextOption||(t.LocalImportContextOption={})),function(e){e.ConvertToUnix="unix",e.KeepOriginal="keep"}(_=t.LineEndingOptions||(t.LineEndingOptions={})),(C=t.SuffixOption||(t.SuffixOption={})).None="none",C.FifteenPercent="fifteenPercent",function(e){e.Equal="equal",e.Levenshtein="levenshteineditdistance"}(b=t.SuffixMatchOption||(t.SuffixMatchOption={})),function(e){e.Cursor="cursor",e.CursorTrimStart="cursortrimstart",e.SiblingBlock="siblingblock",e.SiblingBlockTrimStart="siblingblocktrimstart"}(w=t.SuffixStartMode||(t.SuffixStartMode={}));class E{constructor(e,r){if(this.fs=e,this.maxPromptLength=t.MAX_PROMPT_LENGTH,this.languageMarker=d.Top,this.pathMarker=p.Top,this.includeSiblingFunctions=h.ContextOverSiblings,this.localImportContext=v.Declarations,this.neighboringTabs=f.Eager,this.neighboringTabsPosition=g.TopOfText,this.neighboringSnippetTypes=m.NeighboringSnippets,this.lineEnding=_.ConvertToUnix,this.suffixPercent=0,this.suffixStartMode=w.Cursor,this.tokenizerName=a.TokenizerName.cushman001,this.suffixMatchThreshold=0,this.suffixMatchCriteria=b.Levenshtein,this.fimSuffixLengthThreshold=0,r)for(const e in r)this[e]=r[e];if(this.suffixPercent<0||this.suffixPercent>100)throw new Error(`suffixPercent must be between 0 and 100, but was ${this.suffixPercent}`);if(this.suffixPercent>0&&this.includeSiblingFunctions!=h.NoSiblings)throw new Error(`Invalid option combination. Cannot set suffixPercent > 0 (${this.suffixPercent}) and includeSiblingFunctions ${this.includeSiblingFunctions}`);if(this.suffixMatchThreshold<0||this.suffixMatchThreshold>100)throw new Error(`suffixMatchThreshold must be at between 0 and 100, but was ${this.suffixMatchThreshold}`);if(this.fimSuffixLengthThreshold<-1)throw new Error(`fimSuffixLengthThreshold must be at least -1, but was ${this.fimSuffixLengthThreshold}`);if(null!=this.indentationMinLength&&null!=this.indentationMaxLength&&this.indentationMinLength>this.indentationMaxLength)throw new Error(`indentationMinLength must be less than or equal to indentationMaxLength, but was ${this.indentationMinLength} and ${this.indentationMaxLength}`);if(this.snippetSelection===y.TopK&&void 0===this.snippetSelectionK)throw new Error("snippetSelectionK must be defined.");if(this.snippetSelection===y.TopK&&this.snippetSelectionK&&this.snippetSelectionK<=0)throw new Error(`snippetSelectionK must be greater than 0, but was ${this.snippetSelectionK}`)}}t.PromptOptions=E;const T={javascriptreact:"javascript",jsx:"javascript",typescriptreact:"typescript",jade:"pug",cshtml:"razor"};function S(e){return e=e.toLowerCase(),T[e]??e}function x(e){return""==e||e.endsWith("\n")?e:e+"\n"}t.normalizeLanguageId=S,t.newLineEnded=x,t.getPrompt=async function(e,r,m={},y=[]){const _=new E(e,m),C=(0,a.getTokenizer)(_.tokenizerName);let T=!1;const{source:k,offset:I}=r;if(I<0||I>k.length)throw new Error(`Offset ${I} is out of range.`);r.languageId=S(r.languageId);const A=new c.Priorities,P=A.justBelow(c.Priorities.TOP),R=_.languageMarker==d.Always?A.justBelow(c.Priorities.TOP):A.justBelow(P),N=_.pathMarker==p.Always?A.justBelow(c.Priorities.TOP):A.justBelow(P),O=_.includeSiblingFunctions==h.ContextOverSiblings?A.justBelow(P):A.justAbove(P),D=A.justBelow(P,O),L=A.justBelow(D),M=new c.PromptWishlist(C,_.lineEnding);let B,F;if(_.languageMarker!=d.NoMarker){const e=x((0,n.getLanguageMarker)(r));B=M.append(e,c.PromptElementKind.LanguageMarker,R)}if(_.pathMarker!=p.NoMarker){const e=x((0,n.getPathMarker)(r));e.length>0&&(F=M.append(e,c.PromptElementKind.PathMarker,N))}if(_.localImportContext!=v.NoContext)for(const e of await(0,i.extractLocalImportContext)(r,_.fs))M.append(x(e),c.PromptElementKind.ImportedFile,D);const j=_.neighboringTabs==f.None||0==y.length?[]:await(0,o.getNeighborSnippets)(r,y,_.neighboringSnippetTypes,_.neighboringTabs,_.indentationMinLength,_.indentationMaxLength,_.snippetSelectionOption,_.snippetSelectionK);function U(){j.forEach((e=>M.append(e.snippet,c.PromptElementKind.SimilarFile,L,C.tokenLength(e.snippet),e.score)))}_.neighboringTabsPosition==g.TopOfText&&U();const $=[];let q;if(_.includeSiblingFunctions==h.NoSiblings)q=k.substring(0,I);else{const{siblings:e,beforeInsertion:t,afterInsertion:n}=await(0,s.getSiblingFunctions)(r);M.appendLineForLine(t,c.PromptElementKind.BeforeCursor,P).forEach((e=>$.push(e)));let i=O;e.forEach((e=>{M.append(e,c.PromptElementKind.AfterCursor,i),i=A.justBelow(i)})),_.neighboringTabsPosition==g.AfterSiblings&&U(),q=n}if(_.neighboringTabsPosition==g.DirectlyAboveCursor){const e=q.lastIndexOf("\n")+1,t=q.substring(0,e),r=q.substring(e);M.appendLineForLine(t,c.PromptElementKind.BeforeCursor,P).forEach((e=>$.push(e))),U(),r.length>0&&($.push(M.append(r,c.PromptElementKind.AfterCursor,P)),$.length>1&&M.require($[$.length-2],$[$.length-1]))}else M.appendLineForLine(q,c.PromptElementKind.BeforeCursor,P).forEach((e=>$.push(e)));d.Top==_.languageMarker&&$.length>0&&void 0!==B&&M.require(B,$[0]),p.Top==_.pathMarker&&$.length>0&&void 0!==F&&(B?M.require(F,B):M.require(F,$[0])),void 0!==B&&void 0!==F&&M.exclude(F,B);let H=k.slice(I);if(0==_.suffixPercent||H.length<=_.fimSuffixLengthThreshold)return M.fulfill(_.maxPromptLength);{let e=r.offset;_.suffixStartMode!==w.Cursor&&_.suffixStartMode!==w.CursorTrimStart&&(e=await(0,s.getSiblingFunctionStart)(r));const n=_.maxPromptLength-t.TOKENS_RESERVED_FOR_SUFFIX_ENCODING;let i=Math.floor(n*(100-_.suffixPercent)/100),o=M.fulfill(i);const a=n-o.prefixLength;let c=k.slice(e);_.suffixStartMode!=w.SiblingBlockTrimStart&&_.suffixStartMode!=w.CursorTrimStart||(c=c.trimStart());const d=C.takeFirstTokens(c,a);if(d.tokens.length<=a-3&&(i=n-d.tokens.length,o=M.fulfill(i)),_.suffixMatchCriteria==b.Equal)d.tokens.length===u.tokens.length&&d.tokens.every(((e,t)=>e===u.tokens[t]))&&(T=!0);else if(_.suffixMatchCriteria==b.Levenshtein&&d.tokens.length>0&&_.suffixMatchThreshold>0){const e=(0,l.findEditDistanceScore)(d.tokens.slice(0,t.MAX_EDIT_DISTANCE_LENGTH),u.tokens.slice(0,t.MAX_EDIT_DISTANCE_LENGTH))?.score;100*e<_.suffixMatchThreshold*Math.min(t.MAX_EDIT_DISTANCE_LENGTH,d.tokens.length)&&(T=!0)}return!0===T&&u.tokens.length<=a?(u.tokens.length<=a-3&&(i=n-u.tokens.length,o=M.fulfill(i)),o.suffix=u.text,o.suffixLength=u.tokens.length):(o.suffix=d.text,o.suffixLength=d.tokens.length,u=d),o}}},670:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSiblingFunctionStart=t.getSiblingFunctions=void 0;const n=r(360),i=r(306);t.getSiblingFunctions=async function({source:e,offset:t,languageId:r}){const o=[];let s="",a=e.substring(0,t);if((0,i.isSupportedLanguageId)(r)){const c=await(0,i.parseTreeSitter)(r,e);try{let l=t;for(;l>=0&&/\s/.test(e[l]);)l--;const u=c.rootNode.descendantForIndex(l),d=(0,i.getAncestorWithSiblingFunctions)(r,u);if(d){const c=(0,i.getFirstPrecedingComment)(d)?.startIndex??d.startIndex;let l,u=0;for(;" "==(l=e[c-u-1])||"\t"==l;)u++;const p=e.substring(c-u,c);for(let s=d.nextSibling;s;s=s.nextSibling)if((0,i.isFunctionDefinition)(r,s)){const r=(0,i.getFirstPrecedingComment)(s)?.startIndex??s.startIndex;if(r=0&&/\s/.test(e[o]);)o--;const s=n.rootNode.descendantForIndex(o),a=(0,i.getAncestorWithSiblingFunctions)(r,s);if(a){for(let e=a.nextSibling;e;e=e.nextSibling)if((0,i.isFunctionDefinition)(r,e)){const r=(0,i.getFirstPrecedingComment)(e)?.startIndex??e.startIndex;if(r=t)return a.endIndex}}finally{n.delete()}}return t}},404:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.computeScore=t.FunctionJaccardMatcher=t.IndentationBasedJaccardMatcher=t.FixedWindowSizeJaccardMatcher=void 0;const n=r(312),i=r(467);class o extends i.WindowedMatcher{constructor(e,t){super(e),this.windowLength=t}id(){return"fixed:"+this.windowLength}getWindowsDelineations(e){const t=[],r=e.length;for(let e=0;0==e||e({to:t=>new o(t,e)});class s extends i.WindowedMatcher{constructor(e,t,r){super(e),this.indentationMinLength=t,this.indentationMaxLength=r,this.languageId=e.languageId}id(){return`indent:${this.indentationMinLength}:${this.indentationMaxLength}:${this.languageId}`}getWindowsDelineations(e){return(0,n.getWindowsDelineations)(e,this.languageId,this.indentationMinLength,this.indentationMaxLength)}trimDocument(e){return e.source.slice(0,e.offset).split("\n").slice(-this.indentationMaxLength).join("\n")}similarityScore(e,t){return c(e,t)}}t.IndentationBasedJaccardMatcher=s,s.FACTORY=(e,t)=>({to:r=>new s(r,e,t)});class a extends i.FunctionalMatcher{id(){return"function"}getWindowsDelineations(e){return[]}constructor(e,t){super(e),this.windowLength=t}trimDocument(e){return e.source.slice(0,e.offset).split("\n").slice(-this.windowLength).join("\n")}similarityScore(e,t){return c(e,t)}}function c(e,t){const r=new Set;return e.forEach((e=>{t.has(e)&&r.add(e)})),r.size/(e.size+t.size-r.size)}t.FunctionJaccardMatcher=a,a.FACTORY=e=>({to:t=>new a(t,e)}),t.computeScore=c},125:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getNeighborSnippets=t.neighborOptionToSelection=void 0;const n=r(417),i=r(360),o=r(404);function s(e,t){const r=t==i.NeighboringSnippetType.NeighboringFunctions?"function":"snippet";return[e.relativePath?`Compare this ${r} from ${e.relativePath}:`:`Compare this ${r}:`].concat(e.snippet.split("\n"))}t.neighborOptionToSelection={none:{snippetLength:1,threshold:-1,numberOfSnippets:0},conservative:{snippetLength:10,threshold:.3,numberOfSnippets:1},medium:{snippetLength:20,threshold:.1,numberOfSnippets:2},eager:{snippetLength:60,threshold:0,numberOfSnippets:4},eagerButLittle:{snippetLength:10,threshold:0,numberOfSnippets:1},eagerButMedium:{snippetLength:20,threshold:0,numberOfSnippets:4}},t.getNeighborSnippets=async function(e,r,a,c,l,u,d,p){const h={...t.neighborOptionToSelection[c]},f=function(e,t,r,n,s){let a;return a=t===i.NeighboringSnippetType.NeighboringSnippets?void 0!==n&&void 0!==s?o.IndentationBasedJaccardMatcher.FACTORY(n,s):o.FixedWindowSizeJaccardMatcher.FACTORY(r.snippetLength):o.FunctionJaccardMatcher.FACTORY(r.snippetLength),a.to(e)}(e,a,h,l,u);return(await r.filter((e=>e.source.length<1e4&&e.source.length>0)).slice(0,20).reduce((async(e,t)=>(await e).concat((await f.findMatches(t,d,p)).map((e=>({relativePath:t.relativePath,...e}))))),Promise.resolve([]))).filter((e=>e.score&&e.snippet&&e.score>h.threshold)).sort(((e,t)=>e.score-t.score)).slice(-h.numberOfSnippets).map((t=>({score:t.score,snippet:s(t,a).map((t=>(0,n.comment)(t,e.languageId)+"\n")).join(""),startLine:t.startLine,endLine:t.endLine})))}},467:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.splitIntoWords=t.FunctionalMatcher=t.WindowedMatcher=t.SortOptions=void 0;const n=r(360),i=r(306);var o;!function(e){e.Ascending="ascending",e.Descending="descending",e.None="none"}(o=t.SortOptions||(t.SortOptions={}));class s{constructor(e){this.stopsForLanguage=p.get(e.languageId)??d}tokenize(e){return new Set(l(e).filter((e=>!this.stopsForLanguage.has(e))))}}const a=new class{constructor(e){this.keys=[],this.cache={},this.size=e}put(e,t){if(this.cache[e]=t,this.keys.length>this.size){this.keys.push(e);const t=this.keys.shift()??"";delete this.cache[t]}}get(e){return this.cache[e]}}(20);class c{constructor(e){this.tokenizer=new s(e),this.referenceTokens=this.tokenizer.tokenize(this.trimDocument(e))}sortScoredSnippets(e,t=o.Descending){return t==o.Ascending?e.sort(((e,t)=>e.score>t.score?1:-1)):t==o.Descending?e.sort(((e,t)=>e.score>t.score?-1:1)):e}retrieveAllSnippets(e,t=o.Descending){const r=[];if(0===e.source.length||0===this.referenceTokens.size)return r;const n=e.source.split("\n"),i=this.id()+":"+e.source,s=a.get(i)??[],c=0==s.length,l=c?n.map(this.tokenizer.tokenize,this.tokenizer):[];for(const[e,[t,i]]of this.getWindowsDelineations(n).entries()){if(c){const e=new Set;l.slice(t,i).forEach((t=>t.forEach(e.add,e))),s.push(e)}const n=s[e],o=this.similarityScore(n,this.referenceTokens);r.push({score:o,startLine:t,endLine:i})}return c&&a.put(i,s),this.sortScoredSnippets(r,t)}async findMatches(e,t=n.SnippetSelectionOption.BestMatch,r){if(t==n.SnippetSelectionOption.BestMatch){const t=await this.findBestMatch(e);return t?[t]:[]}return t==n.SnippetSelectionOption.TopK&&await this.findTopKMatches(e,r)||[]}async findBestMatch(e){if(0===e.source.length||0===this.referenceTokens.size)return;const t=e.source.split("\n"),r=this.retrieveAllSnippets(e,o.Descending);return 0!==r.length&&0!==r[0].score?{snippet:t.slice(r[0].startLine,r[0].endLine).join("\n"),...r[0]}:void 0}async findTopKMatches(e,t=1){if(0===e.source.length||0===this.referenceTokens.size||t<1)return;const r=e.source.split("\n"),n=this.retrieveAllSnippets(e,o.Descending);if(0===n.length||0===n[0].score)return;const i=[n[0]];for(let e=1;en[e].startLinet.startLine))&&i.push(n[e]);return i.map((e=>({snippet:r.slice(e.startLine,e.endLine).join("\n"),...e})))}}function l(e){return e.split(/[^a-zA-Z0-9]/).filter((e=>e.length>0))}t.WindowedMatcher=c,t.FunctionalMatcher=class extends c{constructor(e){super(e)}getMatchingScore(e){const t=this.tokenizer.tokenize(e.source),r=this.similarityScore(t,this.referenceTokens);return{snippet:e.source,score:r,startLine:0,endLine:0}}async findBestMatch(e){const t=await this.findMatches(e);if(0!==t.length&&0!==t[0].score)return t[0]}async findMatches(e,t,r){if(0===e.source.length||0===this.referenceTokens.size)return[];const n=await async function(e){let t=[];const r=await(0,i.getFunctionPositions)(e.languageId,e.source);for(let n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findEditDistanceScore=void 0,t.findEditDistanceScore=function(e,t){if(0===e.length||0===t.length)return{score:e.length+t.length};const r=Array.from({length:e.length}).map((()=>Array.from({length:t.length}).map((()=>0))));for(let t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTokenizer=t.TokenizerName=void 0;const n=r(747),i=r(622),o=r(669),s=(e,t)=>Array.from(Array(t).keys()).slice(e),a=e=>e.charCodeAt(0),c=new o.TextDecoder("utf-8"),l=e=>c.decode(new Uint8Array(e));function u(e){const t=new Set;let r=e[0];for(let n=1;nArray.from(this.textEncoder.encode(e));let t="",r="";if(e===p.cushman001)t="vocab_cushman001.bpe",r="tokenizer_cushman001.json";else{if(e!==p.cushman002)throw new Error(`Unknown tokenizer name: ${e}`);t="vocab_cushman002.bpe",r="tokenizer_cushman002.json"}const c=n.readFileSync(i.resolve(__dirname,"..","dist",r)),l=JSON.parse(c.toString());this.encoder=new Map(Object.entries(l));for(let[e,t]of this.encoder)this.decoder.set(t,e);const u=n.readFileSync(i.resolve(__dirname,"..","dist",t),"utf-8").split("\n").slice(1).filter((e=>e.trim().length>0));this.bpe_ranks=((e,t)=>{const r=new Map;return e.forEach(((n,i)=>{r.set(e[i],t[i])})),r})(u,s(0,u.length)),function(e){const t=s(a("!"),a("~")+1).concat(s(a("¡"),a("¬")+1),s(a("®"),a("ÿ")+1));let r=t.slice(),n=0;for(let e=0;e<256;e++)t.includes(e)||(t.push(e),r.push(256+n),n+=1);const i=r.map((e=>(e=>String.fromCharCode(e))(e)));for(let r=0;r{this.byte_decoder.set(e,t)}))}byteEncodeStr(e){return this.encodeStr(e).map((e=>this.byte_encoder.get(e)))}bpe(e){if(this.cache.has(e))return this.cache.get(e);let t=this.byteEncodeStr(e),r=u(t);if(!r)return t.map((e=>this.encoder.get(e)));for(;;){const e=new Map;r.forEach((t=>{const r=t.join(" "),n=this.bpe_ranks.get(r);e.set(void 0===n||isNaN(n)?1e11:n,t)}));const n=Array.from(e.keys()).map((e=>Number(e))),i=e.get(Math.min(...n));if(!i||!this.bpe_ranks.has(i.join(" ")))break;const o=i[0],s=i[1];let a=[],c=0;for(;cthis.encoder.get(e)));return this.cache.set(e,n),n}tokenize(e){let t=[];const r=Array.from(e.matchAll(d)).map((e=>e[0]));for(let e of r){const r=this.bpe(e);Array.prototype.push.apply(t,r)}return t}tokenLength(e){return this.tokenize(e).length}takeLastTokens(e,t){if(t<=0)return"";let r=Math.min(e.length,4*t),n=e.slice(-r),i=this.tokenize(n);for(;i.lengththis.decoder.get(e))).join("");return t=l(t.split("").map((e=>this.byte_decoder.get(e)))),t}tokenizeStrings(e){return this.tokenize(e).map((e=>l(this.decoder.get(e).split("").map((e=>this.byte_decoder.get(e))))))}}class g{constructor(){this.hash=e=>{let t=0;for(let r=0;re.toString())).join(" ")}tokenizeStrings(e){return e.split(/\b/)}tokenLength(e){return this.tokenizeStrings(e).length}takeLastTokens(e,t){return this.tokenizeStrings(e).slice(-t).join("")}takeFirstTokens(e,t){const r=this.tokenizeStrings(e).slice(0,t);return{text:r.join(""),tokens:r.map(this.hash)}}takeLastLinesTokens(e,t){const r=this.takeLastTokens(e,t);if(r.length===e.length||"\n"===e[e.length-r.length-1])return r;let n=r.indexOf("\n");return r.substring(n+1)}}},456:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Priorities=t.PromptWishlist=t.PromptElementRanges=t.PromptChoices=t.PromptBackground=t.PromptElementKind=void 0;const n=r(360);var i;!function(e){e.BeforeCursor="BeforeCursor",e.AfterCursor="AfterCursor",e.SimilarFile="SimilarFile",e.ImportedFile="ImportedFile",e.LanguageMarker="LanguageMarker",e.PathMarker="PathMarker"}(i=t.PromptElementKind||(t.PromptElementKind={}));class o{constructor(){this.used=new Map,this.unused=new Map}markUsed(e){this.IsNeighboringTab(e)&&this.used.set(e.id,this.convert(e))}undoMarkUsed(e){this.IsNeighboringTab(e)&&this.used.delete(e.id)}markUnused(e){this.IsNeighboringTab(e)&&this.unused.set(e.id,this.convert(e))}convert(e){return{score:e.score.toFixed(4),length:e.text.length}}IsNeighboringTab(e){return e.kind==i.SimilarFile}}t.PromptBackground=o;class s{constructor(){this.used=new Map,this.unused=new Map}markUsed(e){this.used.set(e.kind,(this.used.get(e.kind)||0)+e.tokens)}undoMarkUsed(e){this.used.set(e.kind,(this.used.get(e.kind)||0)-e.tokens)}markUnused(e){this.unused.set(e.kind,(this.used.get(e.kind)||0)+e.tokens)}}t.PromptChoices=s;class a{constructor(e){this.ranges=new Array;let t,r=0;for(const{element:n}of e)0!==n.text.length&&(t===i.BeforeCursor&&n.kind===i.BeforeCursor?this.ranges[this.ranges.length-1].end+=n.text.length:this.ranges.push({kind:n.kind,start:r,end:r+n.text.length}),t=n.kind,r+=n.text.length)}}t.PromptElementRanges=a,t.PromptWishlist=class{constructor(e,t){this.tokenizer=e,this.content=[],this.tokenizer=e,this.lineEndingOption=t}getContent(){return[...this.content]}convertLineEndings(e){return this.lineEndingOption===n.LineEndingOptions.ConvertToUnix&&(e=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n")),e}append(e,t,r,n=this.tokenizer.tokenLength(e),i=NaN){e=this.convertLineEndings(e);const o=this.content.length;return this.content.push({id:o,text:e,kind:t,priority:r,tokens:n,requires:[],excludes:[],score:i}),o}appendLineForLine(e,t,r){const n=(e=this.convertLineEndings(e)).split("\n");for(let e=0;e{"\n"===e&&i.length>0&&!i[i.length-1].endsWith("\n\n")?i[i.length-1]+="\n":i.push(e)}));const o=[];return i.forEach(((e,n)=>{""!==e&&(o.push(this.append(e,t,r)),n>0&&(this.content[this.content.length-2].requires=[this.content[this.content.length-1]]))})),o}require(e,t){const r=this.content.find((t=>t.id===e)),n=this.content.find((e=>e.id===t));r&&n&&r.requires.push(n)}exclude(e,t){const r=this.content.find((t=>t.id===e)),n=this.content.find((e=>e.id===t));r&&n&&r.excludes.push(n)}fulfill(e){const t=new s,r=new o,n=this.content.map(((e,t)=>({element:e,index:t})));n.sort(((e,t)=>e.element.priority===t.element.priority?t.index-e.index:t.element.priority-e.element.priority));const i=new Set,c=new Set;let l;const u=[];let d=e;n.forEach((e=>{const n=e.element,o=e.index;if(d>=0&&(d>0||void 0===l)&&n.requires.every((e=>i.has(e.id)))&&!c.has(n.id)){let s=n.tokens;const a=function(e,t){let r,n=1/0;for(const i of e)i.index>t&&i.index=s?(d-=s,i.add(n.id),n.excludes.forEach((e=>c.add(e.id))),t.markUsed(n),r.markUsed(n),u.push(e)):l=l??e}else t.markUnused(n),r.markUnused(n)})),u.sort(((e,t)=>e.index-t.index));let p=u.reduce(((e,t)=>e+t.element.text),""),h=this.tokenizer.tokenLength(p);for(;h>e;){u.sort(((e,t)=>t.element.priority===e.element.priority?t.index-e.index:t.element.priority-e.element.priority));const e=u.pop();e&&(t.undoMarkUsed(e.element),t.markUnused(e.element),r.undoMarkUsed(e.element),r.markUnused(e.element),l=void 0),u.sort(((e,t)=>e.index-t.index)),p=u.reduce(((e,t)=>e+t.element.text),""),h=this.tokenizer.tokenLength(p)}const f=[...u];if(void 0!==l){f.push(l),f.sort(((e,t)=>e.index-t.index));const n=f.reduce(((e,t)=>e+t.element.text),""),i=this.tokenizer.tokenLength(n);if(i<=e){t.markUsed(l.element),r.markUsed(l.element);const e=new a(f);return{prefix:n,suffix:"",prefixLength:i,suffixLength:0,promptChoices:t,promptBackground:r,promptElementRanges:e}}t.markUnused(l.element),r.markUnused(l.element)}const g=new a(u);return{prefix:p,suffix:"",prefixLength:h,suffixLength:0,promptChoices:t,promptBackground:r,promptElementRanges:g}}};class c{constructor(){this.registeredPriorities=[0,1]}register(e){if(e>c.TOP||ee>t)));return this.register((r+t)/2)}justBelow(...e){const t=Math.min(...e),r=Math.max(...this.registeredPriorities.filter((e=>er>e&&r{var n=void 0!==n?n:{},i=function(){var t,i="object"==typeof window?{currentScript:window.document.currentScript}:null;class o{constructor(){this.initialize()}initialize(){throw new Error("cannot construct a Parser before calling `init()`")}static init(s){return t||(n=Object.assign({},n,s),t=new Promise((t=>{var s=Object.assign({},n),a=[],c="./this.program",l=(e,t)=>{throw t},u="object"==typeof window,d="function"==typeof importScripts,p="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,h=!u&&!p&&!d;if(n.ENVIRONMENT)throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -sENVIRONMENT=web or -sENVIRONMENT=node)");var f,g,m,y="";function v(e){if(e instanceof Se)return;let t=e;e&&"object"==typeof e&&e.stack&&(t=[e,e.stack]),E("exiting due to exception: "+t)}if(p){if("undefined"==typeof process||!process.release||"node"!==process.release.name)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");var _,b;y=d?r(622).dirname(y)+"/":__dirname+"/",_=r(747),b=r(622),f=(e,t)=>(e=b.normalize(e),_.readFileSync(e,t?void 0:"utf8")),m=e=>{var t=f(e,!0);return t.buffer||(t=new Uint8Array(t)),B(t.buffer),t},g=(e,t,r)=>{e=b.normalize(e),_.readFile(e,(function(e,n){e?r(e):t(n.buffer)}))},process.argv.length>1&&(c=process.argv[1].replace(/\\/g,"/")),a=process.argv.slice(2),e.exports=n,l=(e,t)=>{if(ce())throw process.exitCode=e,t;v(t),process.exit(e)},n.inspect=function(){return"[Emscripten Module object]"}}else if(h){if("object"==typeof process||"object"==typeof window||"function"==typeof importScripts)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");"undefined"!=typeof read&&(f=function(e){return read(e)}),m=function(e){let t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(t=read(e,"binary"),B("object"==typeof t),t)},g=function(e,t,r){setTimeout((()=>t(m(e))),0)},"undefined"!=typeof scriptArgs?a=scriptArgs:void 0!==arguments&&(a=arguments),"function"==typeof quit&&(l=(e,t)=>{v(t),quit(e)}),"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)}else{if(!u&&!d)throw new Error("environment detection error");if(d?y=self.location.href:void 0!==i&&i.currentScript&&(y=i.currentScript.src),y=0!==y.indexOf("blob:")?y.substr(0,y.replace(/[?#].*/,"").lastIndexOf("/")+1):"","object"!=typeof window&&"function"!=typeof importScripts)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");f=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},d&&(m=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),g=(e,t,r)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?t(n.response):r()},n.onerror=r,n.send(null)}}var w,C=n.print||console.log.bind(console),E=n.printErr||console.warn.bind(console);function T(e,t){Object.getOwnPropertyDescriptor(n,e)||Object.defineProperty(n,e,{configurable:!0,get:function(){ge("Module."+e+" has been replaced with plain "+t+" (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}})}function S(e){return"FS_createPath"===e||"FS_createDataFile"===e||"FS_createPreloadedFile"===e||"FS_unlink"===e||"addRunDependency"===e||"FS_createLazyFile"===e||"FS_createDevice"===e||"removeRunDependency"===e}Object.assign(n,s),s=null,w="fetchSettings",Object.getOwnPropertyDescriptor(n,w)&&ge("`Module."+w+"` was supplied but `"+w+"` not included in INCOMING_MODULE_JS_API"),n.arguments&&(a=n.arguments),T("arguments","arguments_"),n.thisProgram&&(c=n.thisProgram),T("thisProgram","thisProgram"),n.quit&&(l=n.quit),T("quit","quit_"),B(void 0===n.memoryInitializerPrefixURL,"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),B(void 0===n.pthreadMainPrefixURL,"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),B(void 0===n.cdInitializerPrefixURL,"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),B(void 0===n.filePackagePrefixURL,"Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),B(void 0===n.read,"Module.read option was removed (modify read_ in JS)"),B(void 0===n.readAsync,"Module.readAsync option was removed (modify readAsync in JS)"),B(void 0===n.readBinary,"Module.readBinary option was removed (modify readBinary in JS)"),B(void 0===n.setWindowTitle,"Module.setWindowTitle option was removed (modify setWindowTitle in JS)"),B(void 0===n.TOTAL_MEMORY,"Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY"),T("read","read_"),T("readAsync","readAsync"),T("readBinary","readBinary"),T("setWindowTitle","setWindowTitle"),B(!h,"shell environment detected but not enabled at build time. Add 'shell' to `-sENVIRONMENT` to enable.");var x,k=n.dynamicLibraries||[];n.wasmBinary&&(x=n.wasmBinary),T("wasmBinary","wasmBinary");var I,A=n.noExitRuntime||!0;function P(e,t){switch(e){case 1:return"i8";case 2:return"i16";case 4:return t?"float":"i32";case 8:return t?"double":"i64";default:B(0)}}function R(e,t,r,n){if(e<=0&&ge("segmentation fault storing "+r+" bytes to address "+e),e%r!=0&&ge("alignment error storing to address "+e+", which was expected to be aligned to a multiple of "+r),ae){var i=Ct()>>>0;e+r>i&&ge("segmentation fault, exceeded the top of the available dynamic heap when storing "+r+" bytes to address "+e+". DYNAMICTOP="+i),B(i>=St()),B(i<=j.length)}return function(e,t,r){switch(r){case"i1":case"i8":j[e>>0]=t;break;case"i16":$[e>>1]=t;break;case"i32":q[e>>2]=t;break;case"i64":_e=[t>>>0,(ve=t,+Math.abs(ve)>=1?ve>0?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)],q[e>>2]=_e[0],q[e+4>>2]=_e[1];break;case"float":H[e>>2]=t;break;case"double":V[e>>3]=t;break;default:ge("invalid type for setValue: "+r)}}(e,t,P(r,n)),t}function N(e,t,r){return R(e,t,r,!0)}function O(e,t,r,n){if(e<=0&&ge("segmentation fault loading "+t+" bytes from address "+e),e%t!=0&&ge("alignment error loading from address "+e+", which was expected to be aligned to a multiple of "+t),ae){var i=Ct()>>>0;e+t>i&&ge("segmentation fault, exceeded the top of the available dynamic heap when loading "+t+" bytes from address "+e+". DYNAMICTOP="+i),B(i>=St()),B(i<=j.length)}var o,s,a=P(t,n),c=function(e,t){switch(t){case"i1":case"i8":return j[e>>0];case"i16":return $[e>>1];case"i32":case"i64":return q[e>>2];case"float":return H[e>>2];case"double":return V[e>>3];default:ge("invalid type for getValue: "+t)}}(e,a);return r&&(o=c,s=parseInt(a.substr(1),10),c=o>=0?o:s<=32?2*Math.abs(1<=n);)++i;if(i-t>16&&e.buffer&&z)return z.decode(e.subarray(t,i));for(var o="";t>10,56320|1023&l)}}else o+=String.fromCharCode((31&s)<<6|a)}else o+=String.fromCharCode(s)}return o}function W(e,t){return e?K(U,e,t):""}function G(e,t,r,n){if(!(n>0))return 0;for(var i=r,o=r+n-1,s=0;s=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++s)),a<=127){if(r>=o)break;t[r++]=a}else if(a<=2047){if(r+1>=o)break;t[r++]=192|a>>6,t[r++]=128|63&a}else if(a<=65535){if(r+2>=o)break;t[r++]=224|a>>12,t[r++]=128|a>>6&63,t[r++]=128|63&a}else{if(r+3>=o)break;a>1114111&&Xe("Invalid Unicode code point 0x"+a.toString(16)+" encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF)."),t[r++]=240|a>>18,t[r++]=128|a>>12&63,t[r++]=128|a>>6&63,t[r++]=128|63&a}}return t[r]=0,r-i}function Q(e,t,r){return B("number"==typeof r,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),G(e,U,t,r)}function Y(e){for(var t=0,r=0;r=55296&&n<=57343?(t+=4,++r):t+=3}return t}function J(e){F=e,n.HEAP8=j=new Int8Array(e),n.HEAP16=$=new Int16Array(e),n.HEAP32=q=new Int32Array(e),n.HEAPU8=U=new Uint8Array(e),n.HEAPU16=new Uint16Array(e),n.HEAPU32=new Uint32Array(e),n.HEAPF32=H=new Float32Array(e),n.HEAPF64=V=new Float64Array(e)}var X=5242880;n.STACK_SIZE&&B(X===n.STACK_SIZE,"the stack size can no longer be determined at runtime");var Z=n.INITIAL_MEMORY||33554432;T("INITIAL_MEMORY","INITIAL_MEMORY"),B(Z>=X,"INITIAL_MEMORY should be larger than STACK_SIZE, was "+Z+"! (STACK_SIZE="+X+")"),B("undefined"!=typeof Int32Array&&"undefined"!=typeof Float64Array&&null!=Int32Array.prototype.subarray&&null!=Int32Array.prototype.set,"JS engine does not provide full typed array support"),(I=n.wasmMemory?n.wasmMemory:new WebAssembly.Memory({initial:Z/65536,maximum:32768}))&&(F=I.buffer),B((Z=F.byteLength)%65536==0),J(F);var ee=new WebAssembly.Table({initial:25,element:"anyfunc"});function te(){if(!M){var e=xt(),t=O(4*(e>>2),4,1),r=O(4*(e+4>>2),4,1);34821223==t&&2310721022==r||ge("Stack overflow! Stack cookie has been overwritten at 0x"+e.toString(16)+", expected hex dwords 0x89BACDFE and 0x2135467, but received 0x"+r.toString(16)+" 0x"+t.toString(16))}}!function(){var e=new Int16Array(1),t=new Int8Array(e.buffer);if(e[0]=25459,115!==t[0]||99!==t[1])throw"Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)"}();var re=[],ne=[],ie=[],oe=[],se=[],ae=!1;function ce(){return A}B(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),B(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),B(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),B(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var le=0,ue=null,de=null,pe={};function he(e){le++,n.monitorRunDependencies&&n.monitorRunDependencies(le),e?(B(!pe[e]),pe[e]=1,null===ue&&"undefined"!=typeof setInterval&&(ue=setInterval((function(){if(M)return clearInterval(ue),void(ue=null);var e=!1;for(var t in pe)e||(e=!0,E("still waiting on run dependencies:")),E("dependency: "+t);e&&E("(end of list)")}),1e4))):E("warning: run dependency added without ID")}function fe(e){if(le--,n.monitorRunDependencies&&n.monitorRunDependencies(le),e?(B(pe[e]),delete pe[e]):E("warning: run dependency removed without ID"),0==le&&(null!==ue&&(clearInterval(ue),ue=null),de)){var t=de;de=null,t()}}function ge(e){throw n.onAbort&&n.onAbort(e),E(e="Aborted("+e+")"),M=!0,L=1,new WebAssembly.RuntimeError(e)}var me,ye,ve,_e,be={error:function(){ge("Filesystem support (FS) was not included. The problem is that you are using files from JS, but files were not used from C/C++, so filesystem support was not auto-included. You can force-include filesystem support with -sFORCE_FILESYSTEM")},init:function(){be.error()},createDataFile:function(){be.error()},createPreloadedFile:function(){be.error()},createLazyFile:function(){be.error()},open:function(){be.error()},mkdev:function(){be.error()},registerDevice:function(){be.error()},analyzePath:function(){be.error()},loadFilesFromDB:function(){be.error()},ErrnoError:function(){be.error()}};function we(e){return e.startsWith("data:application/octet-stream;base64,")}function Ce(e){return e.startsWith("file://")}function Ee(e,t){return function(){var r=e,i=t;return t||(i=n.asm),B(ae,"native function `"+r+"` called before runtime initialization"),i[e]||B(i[e],"exported native function `"+r+"` not found"),i[e].apply(null,arguments)}}function Te(e){try{if(e==me&&x)return new Uint8Array(x);if(m)return m(e);throw"both async and sync fetching of the wasm failed"}catch(e){ge(e)}}function Se(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}n.FS_createDataFile=be.createDataFile,n.FS_createPreloadedFile=be.createPreloadedFile,we(me="tree-sitter.wasm")||(ye=me,me=n.locateFile?n.locateFile(ye,y):y+ye);var xe={},ke=new Set([]),Ie={get:function(e,t){var r=xe[t];return r||(r=xe[t]=new WebAssembly.Global({value:"i32",mutable:!0})),ke.has(t)||(r.required=!0),r}};function Ae(e){for(;e.length>0;)e.shift()(n)}function Pe(e){var t=0,r=0;function n(){for(var r=0,n=1;;){var i=e[t++];if(r+=(127&i)*n,n*=128,!(128&i))break}return r}function i(){var r=n();return K(e,(t+=r)-r,r)}function o(e,t){if(e)throw new Error(t)}var s="dylink.0";if(e instanceof WebAssembly.Module){var a=WebAssembly.Module.customSections(e,s);0===a.length&&(s="dylink",a=WebAssembly.Module.customSections(e,s)),o(0===a.length,"need dylink section"),r=(e=new Uint8Array(a[0])).length}else{o(!(1836278016==new Uint32Array(new Uint8Array(e.subarray(0,24)).buffer)[0]),"need to see wasm magic number"),o(0!==e[8],"need the dylink section to be first"),t=9;var c=n();r=t+c,s=i()}var l={neededDynlibs:[],tlsExports:new Set,weakImports:new Set};if("dylink"==s){l.memorySize=n(),l.memoryAlign=n(),l.tableSize=n(),l.tableAlign=n();for(var u=n(),d=0;d>0,1,0);case"i16":return O(2*(e>>1),2,0);case"i32":case"i64":return O(4*(e>>2),4,0);case"float":return D(4*(e>>2),4,0);case"double":return D(8*(e>>3),8,0);case"*":return O(4*(e>>2),4,1);default:ge("invalid type for getValue: "+t)}return null}function Ne(e){return 0==e.indexOf("dynCall_")||["stackAlloc","stackSave","stackRestore","getTempRet0","setTempRet0"].includes(e)?e:"_"+e}function Oe(e,t){for(var r in e)if(e.hasOwnProperty(r)){_t.hasOwnProperty(r)||(_t[r]=e[r]);var i=Ne(r);n.hasOwnProperty(i)||(n[i]=e[r]),"__main_argc_argv"==r&&(n._main=e[r])}}var De={loadedLibsByName:{},loadedLibsByHandle:{}},Le=[];function Me(e){var t=Le[e];return t||(e>=Le.length&&(Le.length=e+1),Le[e]=t=ee.get(e)),B(ee.get(e)==t,"JavaScript-side Wasm function table mirror is out of date!"),t}function Be(e,t,r){return e.includes("j")?function(e,t,r){B("dynCall_"+e in n,"bad function pointer type - dynCall function not found for sig '"+e+"'"),r&&r.length?B(r.length===e.substring(1).replace(/j/g,"--").length):B(1==e.length);var i=n["dynCall_"+e];return r&&r.length?i.apply(null,[t].concat(r)):i.call(null,t)}(e,t,r):(B(Me(t),"missing table entry in dynCall: "+t),Me(t).apply(null,r))}var Fe=5255488;function je(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"].includes(e)}function Ue(e,t){B(e<16384),e<128?t.push(e):t.push(e%128|128,e>>7)}function $e(e,t){if(qe)for(var r=e;r>0,1,0))c=O(4*(r+28>>2),4,1),l=O(4*(r+36>>2),4,1);else{var a=Math.pow(2,n.memoryAlign);a=Math.max(a,16);var c=n.memorySize?(o=function(e){if(ae)return function(e,t){return U.fill(0,e,e+t),e}(bt(e),e);var t=Fe,r=t+e+15&-16;return B(r<=j.length,"failure to getMemory - memory growth etc. is not supported there, call malloc/sbrk directly or increase INITIAL_MEMORY"),Fe=r,xe.__heap_base.value=r,t}(n.memorySize+a),B(s=a,"alignment argument is required"),Math.ceil(o/s)*s):0,l=n.tableSize?ee.length:0;r&&(R(r+24>>0,1,1),R(4*(r+28>>2),c,4),R(4*(r+32>>2),n.memorySize,4),R(4*(r+36>>2),l,4),R(4*(r+40>>2),n.tableSize,4))}var u,d=l+n.tableSize-ee.length;function p(e){var t=We(e,!1);return t||(t=u[e]),B(t,"undefined symbol `"+e+"`. perhaps a side module was not linked in? if this global was expected to arrive from a system library, try to build the MAIN_MODULE with EMCC_FORCE_STDLIBS=1 in the environment"),t}d>0&&ee.grow(d);var h={get:function(e,t){switch(t){case"__memory_base":return c;case"__table_base":return l}return t in _t?_t[t]:(t in e||(e[t]=function(){return r||(r=p(t)),r.apply(null,arguments)}),e[t]);var r}},f=new Proxy({},h),g={"GOT.mem":new Proxy({},Ie),"GOT.func":new Proxy({},Ie),env:f,wasi_snapshot_preview1:f};function m(e){B(ee===i),$e(l,n.tableSize),u=Ke(e.exports,c),t.allowUndefined||Ye();var r=u.__wasm_apply_data_relocs;r&&(ae?r():se.push(r));var o=u.__wasm_call_ctors;return o&&(ae?o():ne.push(o)),u}if(t.loadAsync){if(e instanceof WebAssembly.Module){var y=new WebAssembly.Instance(e,g);return Promise.resolve(m(y))}return WebAssembly.instantiate(e,g).then((function(e){return m(e.instance)}))}var v=e instanceof WebAssembly.Module?e:new WebAssembly.Module(e);return m(y=new WebAssembly.Instance(v,g))}return t.loadAsync?n.neededDynlibs.reduce((function(e,r){return e.then((function(){return Qe(r,t)}))}),Promise.resolve()).then((function(){return o()})):(n.neededDynlibs.forEach((function(e){Qe(e,t)})),o())}function Qe(e,t,r){t=t||{global:!0,nodelete:!0};var n=De.loadedLibsByName[e];if(n)return t.global&&!n.global&&(n.global=!0,"loading"!==n.module&&Oe(n.module)),t.nodelete&&n.refcount!==1/0&&(n.refcount=1/0),n.refcount++,r&&(De.loadedLibsByHandle[r]=n),!t.loadAsync||Promise.resolve(!0);function i(e){if(t.fs&&t.fs.findObject(e)){var r=t.fs.readFile(e,{encoding:"binary"});return r instanceof Uint8Array||(r=new Uint8Array(r)),t.loadAsync?Promise.resolve(r):r}if(t.loadAsync)return new Promise((function(t,r){g(e,(e=>t(new Uint8Array(e))),r)}));if(!m)throw new Error(e+": file not found, and synchronous loading of external files is not available");return m(e)}function o(){if("undefined"!=typeof preloadedWasm&&preloadedWasm[e]){var n=preloadedWasm[e];return t.loadAsync?Promise.resolve(n):n}return t.loadAsync?i(e).then((function(e){return Ge(e,t,r)})):Ge(i(e),t,r)}function s(e){n.global&&Oe(e),n.module=e}return n={refcount:t.nodelete?1/0:1,name:e,module:"loading",global:t.global},De.loadedLibsByName[e]=n,r&&(De.loadedLibsByHandle[r]=n),t.loadAsync?o().then((function(e){return s(e),!0})):(s(o()),!0)}function Ye(){for(var e in xe)if(0==xe[e].value){var t=We(e,!0);if(!t&&!xe[e].required)continue;if(B(t,"undefined symbol `"+e+"`. perhaps a side module was not linked in? if this global was expected to arrive from a system library, try to build the MAIN_MODULE with EMCC_FORCE_STDLIBS=1 in the environment"),"function"==typeof t)xe[e].value=ze(t,t.sig);else{if("number"!=typeof t)throw new Error("bad export type for `"+e+"`: "+typeof t);xe[e].value=t}}}function Je(e,t,r="i8"){switch(r.endsWith("*")&&(r="*"),r){case"i1":case"i8":R(e>>0,t,1);break;case"i16":R(2*(e>>1),t,2);break;case"i32":case"*":R(4*(e>>2),t,4);break;case"i64":R(4*(e>>2),(_e=[t>>>0,(ve=t,+Math.abs(ve)>=1?ve>0?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)])[0],4),R(4*(e+4>>2),_e[1],4);break;case"float":N(4*(e>>2),t,4);break;case"double":N(8*(e>>3),t,8);break;default:ge("invalid type for setValue: "+r)}}function Xe(e){Xe.shown||(Xe.shown={}),Xe.shown[e]||(Xe.shown[e]=1,p&&(e="warning: "+e),E(e))}var Ze,et=new WebAssembly.Global({value:"i32",mutable:!1},1024),tt=new WebAssembly.Global({value:"i32",mutable:!0},5255488),rt=new WebAssembly.Global({value:"i32",mutable:!1},1);function nt(){return!0}function it(){ge("native code called abort()")}function ot(){return Date.now()}function st(e,t,r){U.copyWithin(e,t,t+r)}function at(e){try{return I.grow(e-F.byteLength+65535>>>16),J(I.buffer),1}catch(t){E("emscripten_realloc_buffer: Attempted to grow heap from "+F.byteLength+" bytes to "+e+" bytes, but got error: "+t)}}function ct(e){var t=U.length;B((e>>>=0)>t);var r,n=2147483648;if(e>n)return E("Cannot enlarge memory, asked to go up to "+e+" bytes, but the limit is "+n+" bytes!"),!1;for(var i=1;i<=4;i*=2){var o=t*(1+.2/i);o=Math.min(o,e+100663296);var s=Math.min(n,(r=Math.max(e,o))+(65536-r%65536)%65536);if(at(s))return!0}return E("Failed to grow the heap from "+t+" bytes to "+s+" bytes, not enough memory!"),!1}nt.sig="i",n._abort=it,it.sig="v",ot.sig="d",(Ze=p?()=>{var e=process.hrtime();return 1e3*e[0]+e[1]/1e6}:()=>performance.now()).sig="d",st.sig="vppp",ct.sig="ip";var lt={DEFAULT_POLLMASK:5,calculateAt:function(e,t,r){if(PATH.isAbs(t))return t;var n;if(n=-100===e?be.cwd():lt.getStreamFromFD(e).path,0==t.length){if(!r)throw new be.ErrnoError(44);return n}return PATH.join2(n,t)},doStat:function(e,t,r){try{var n=e(t)}catch(e){if(e&&e.node&&PATH.normalize(t)!==PATH.normalize(be.getPath(e.node)))return-54;throw e}return R(4*(r>>2),n.dev,4),R(4*(r+8>>2),n.ino,4),R(4*(r+12>>2),n.mode,4),R(4*(r+16>>2),n.nlink,4),R(4*(r+20>>2),n.uid,4),R(4*(r+24>>2),n.gid,4),R(4*(r+28>>2),n.rdev,4),R(4*(r+40>>2),(_e=[n.size>>>0,(ve=n.size,+Math.abs(ve)>=1?ve>0?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)])[0],4),R(4*(r+44>>2),_e[1],4),R(4*(r+48>>2),4096,4),R(4*(r+52>>2),n.blocks,4),R(4*(r+56>>2),(_e=[Math.floor(n.atime.getTime()/1e3)>>>0,(ve=Math.floor(n.atime.getTime()/1e3),+Math.abs(ve)>=1?ve>0?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)])[0],4),R(4*(r+60>>2),_e[1],4),R(4*(r+64>>2),0,4),R(4*(r+72>>2),(_e=[Math.floor(n.mtime.getTime()/1e3)>>>0,(ve=Math.floor(n.mtime.getTime()/1e3),+Math.abs(ve)>=1?ve>0?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)])[0],4),R(4*(r+76>>2),_e[1],4),R(4*(r+80>>2),0,4),R(4*(r+88>>2),(_e=[Math.floor(n.ctime.getTime()/1e3)>>>0,(ve=Math.floor(n.ctime.getTime()/1e3),+Math.abs(ve)>=1?ve>0?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)])[0],4),R(4*(r+92>>2),_e[1],4),R(4*(r+96>>2),0,4),R(4*(r+104>>2),(_e=[n.ino>>>0,(ve=n.ino,+Math.abs(ve)>=1?ve>0?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)])[0],4),R(4*(r+108>>2),_e[1],4),0},doMsync:function(e,t,r,n,i){if(!be.isFile(t.node.mode))throw new be.ErrnoError(43);if(2&n)return 0;var o=U.slice(e,e+r);be.msync(t,o,i,r,n)},varargs:void 0,get:function(){return B(null!=lt.varargs),lt.varargs+=4,O(4*(lt.varargs-4>>2),4,0)},getStr:function(e){return W(e)},getStreamFromFD:function(e){var t=be.getStream(e);if(!t)throw new be.ErrnoError(8);return t}};function ut(e){L=e,ce()||(n.onExit&&n.onExit(e),M=!0),l(e,new Se(e))}function dt(e,t){L=e,function(){var e=C,t=E,r=!1;C=E=e=>{r=!0};try{wt(0)}catch(e){}C=e,E=t,r&&(Xe("stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the FAQ), or make sure to emit a newline when you printf etc."),Xe("(this may also be due to not including full filesystem support - try building with -sFORCE_FILESYSTEM)"))}(),ce()&&!t&&E("program exited (with status: "+e+"), but EXIT_RUNTIME is not set, so halting execution but not exiting the runtime or preventing further async execution (build with EXIT_RUNTIME=1, if you want a true shutdown)"),ut(e)}ut.sig="vi";var pt=dt;function ht(e){try{var t=lt.getStreamFromFD(e);return be.close(t),0}catch(e){if(void 0===be||!(e instanceof be.ErrnoError))throw e;return e.errno}}function ft(e,t,r,n,i){try{var o=(c=r,B((a=t)==a>>>0||a==(0|a)),B(c===(0|c)),c+2097152>>>0<4194305-!!a?(a>>>0)+4294967296*c:NaN);if(isNaN(o))return 61;var s=lt.getStreamFromFD(e);return be.llseek(s,o,n),R(4*(i>>2),(_e=[s.position>>>0,(ve=s.position,+Math.abs(ve)>=1?ve>0?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)])[0],4),R(4*(i+4>>2),_e[1],4),s.getdents&&0===o&&0===n&&(s.getdents=null),0}catch(e){if(void 0===be||!(e instanceof be.ErrnoError))throw e;return e.errno}var a,c}function gt(e,t,r,n){try{var i=function(e,t,r,n){for(var i=0,o=0;o>2),4,1),a=O(4*(t+4>>2),4,1);t+=8;var c=be.write(e,j,s,a,void 0);if(c<0)return-1;i+=c}return i}(lt.getStreamFromFD(e),t,r);return R(4*(n>>2),i,4),0}catch(e){if(void 0===be||!(e instanceof be.ErrnoError))throw e;return e.errno}}function mt(e,t,r){if(B(t%2==0,"Pointer passed to stringToUTF16 must be aligned to two bytes!"),B("number"==typeof r,"stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),void 0===r&&(r=2147483647),r<2)return 0;for(var n=t,i=(r-=2)<2*e.length?r/2:e.length,o=0;o>1),e.charCodeAt(o),2),t+=2;return R(2*(t>>1),0,2),t-n}function yt(e){for(var t="";;){var r=O(e++>>0,1,1);if(!r)return t;t+=String.fromCharCode(r)}}pt.sig="vi",ht.sig="ii",ft.sig="iijip",gt.sig="iippp";var vt,_t={__heap_base:Fe,__indirect_function_table:ee,__memory_base:et,__stack_high:5255488,__stack_low:12608,__stack_pointer:tt,__table_base:rt,_emscripten_get_now_is_monotonic:nt,abort:it,alignfault:function(){ge("alignment fault")},emscripten_date_now:ot,emscripten_get_now:Ze,emscripten_memcpy_big:st,emscripten_resize_heap:ct,exit:pt,fd_close:ht,fd_seek:ft,fd_write:gt,memory:I,segfault:function(){ge("segmentation fault")},tree_sitter_log_callback:function(e,t){if(Ht){const r=W(t);Ht(r,0!==e)}},tree_sitter_parse_callback:function(e,t,r,n,i){var o=qt(t,{row:r,column:n});"string"==typeof o?(Je(i,o.length,"i32"),mt(o,e,10240)):Je(i,0,"i32")}},bt=(function(){var e={env:_t,wasi_snapshot_preview1:_t,"GOT.mem":new Proxy(_t,Ie),"GOT.func":new Proxy(_t,Ie)};function t(e,t){var r=e.exports;r=Ke(r,1024);var i,o=Pe(t);o.neededDynlibs&&(k=o.neededDynlibs.concat(k)),Oe(r),n.asm=r,i=n.asm.__wasm_call_ctors,ne.unshift(i),se.push(n.asm.__wasm_apply_data_relocs),fe("wasm-instantiate")}he("wasm-instantiate");var r=n;function i(e){B(n===r,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),r=null,t(e.instance,e.module)}function o(t){return function(){if(!x&&(u||d)){if("function"==typeof fetch&&!Ce(me))return fetch(me,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+me+"'";return e.arrayBuffer()})).catch((function(){return Te(me)}));if(g)return new Promise((function(e,t){g(me,(function(t){e(new Uint8Array(t))}),t)}))}return Promise.resolve().then((function(){return Te(me)}))}().then((function(t){return WebAssembly.instantiate(t,e)})).then((function(e){return e})).then(t,(function(e){E("failed to asynchronously prepare wasm: "+e),Ce(me)&&E("warning: Loading from a file URI ("+me+") is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing"),ge(e)}))}if(n.instantiateWasm)try{return n.instantiateWasm(e,t)}catch(e){return E("Module.instantiateWasm callback failed with error: "+e),!1}x||"function"!=typeof WebAssembly.instantiateStreaming||we(me)||Ce(me)||p||"function"!=typeof fetch?o(i):fetch(me,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(i,(function(e){return E("wasm streaming compile failed: "+e),E("falling back to ArrayBuffer instantiation"),o(i)}))}))}(),n.___wasm_call_ctors=Ee("__wasm_call_ctors"),n.___wasm_apply_data_relocs=Ee("__wasm_apply_data_relocs"),n._malloc=Ee("malloc")),wt=(n._calloc=Ee("calloc"),n._realloc=Ee("realloc"),n._free=Ee("free"),n._ts_language_symbol_count=Ee("ts_language_symbol_count"),n._ts_language_version=Ee("ts_language_version"),n._ts_language_field_count=Ee("ts_language_field_count"),n._ts_language_symbol_name=Ee("ts_language_symbol_name"),n._ts_language_symbol_for_name=Ee("ts_language_symbol_for_name"),n._ts_language_symbol_type=Ee("ts_language_symbol_type"),n._ts_language_field_name_for_id=Ee("ts_language_field_name_for_id"),n._memset=Ee("memset"),n._memcpy=Ee("memcpy"),n._ts_parser_delete=Ee("ts_parser_delete"),n._ts_parser_set_language=Ee("ts_parser_set_language"),n._ts_parser_reset=Ee("ts_parser_reset"),n._ts_parser_timeout_micros=Ee("ts_parser_timeout_micros"),n._ts_parser_set_timeout_micros=Ee("ts_parser_set_timeout_micros"),n._ts_query_new=Ee("ts_query_new"),n._ts_query_delete=Ee("ts_query_delete"),n._iswspace=Ee("iswspace"),n._ts_query_pattern_count=Ee("ts_query_pattern_count"),n._ts_query_capture_count=Ee("ts_query_capture_count"),n._ts_query_string_count=Ee("ts_query_string_count"),n._ts_query_capture_name_for_id=Ee("ts_query_capture_name_for_id"),n._ts_query_string_value_for_id=Ee("ts_query_string_value_for_id"),n._ts_query_predicates_for_pattern=Ee("ts_query_predicates_for_pattern"),n._memmove=Ee("memmove"),n._memcmp=Ee("memcmp"),n._ts_tree_copy=Ee("ts_tree_copy"),n._ts_tree_delete=Ee("ts_tree_delete"),n._iswalnum=Ee("iswalnum"),n._ts_init=Ee("ts_init"),n._ts_parser_new_wasm=Ee("ts_parser_new_wasm"),n._ts_parser_enable_logger_wasm=Ee("ts_parser_enable_logger_wasm"),n._ts_parser_parse_wasm=Ee("ts_parser_parse_wasm"),n._ts_language_type_is_named_wasm=Ee("ts_language_type_is_named_wasm"),n._ts_language_type_is_visible_wasm=Ee("ts_language_type_is_visible_wasm"),n._ts_tree_root_node_wasm=Ee("ts_tree_root_node_wasm"),n._ts_tree_edit_wasm=Ee("ts_tree_edit_wasm"),n._ts_tree_get_changed_ranges_wasm=Ee("ts_tree_get_changed_ranges_wasm"),n._ts_tree_cursor_new_wasm=Ee("ts_tree_cursor_new_wasm"),n._ts_tree_cursor_delete_wasm=Ee("ts_tree_cursor_delete_wasm"),n._ts_tree_cursor_reset_wasm=Ee("ts_tree_cursor_reset_wasm"),n._ts_tree_cursor_goto_first_child_wasm=Ee("ts_tree_cursor_goto_first_child_wasm"),n._ts_tree_cursor_goto_next_sibling_wasm=Ee("ts_tree_cursor_goto_next_sibling_wasm"),n._ts_tree_cursor_goto_parent_wasm=Ee("ts_tree_cursor_goto_parent_wasm"),n._ts_tree_cursor_current_node_type_id_wasm=Ee("ts_tree_cursor_current_node_type_id_wasm"),n._ts_tree_cursor_current_node_is_named_wasm=Ee("ts_tree_cursor_current_node_is_named_wasm"),n._ts_tree_cursor_current_node_is_missing_wasm=Ee("ts_tree_cursor_current_node_is_missing_wasm"),n._ts_tree_cursor_current_node_id_wasm=Ee("ts_tree_cursor_current_node_id_wasm"),n._ts_tree_cursor_start_position_wasm=Ee("ts_tree_cursor_start_position_wasm"),n._ts_tree_cursor_end_position_wasm=Ee("ts_tree_cursor_end_position_wasm"),n._ts_tree_cursor_start_index_wasm=Ee("ts_tree_cursor_start_index_wasm"),n._ts_tree_cursor_end_index_wasm=Ee("ts_tree_cursor_end_index_wasm"),n._ts_tree_cursor_current_field_id_wasm=Ee("ts_tree_cursor_current_field_id_wasm"),n._ts_tree_cursor_current_node_wasm=Ee("ts_tree_cursor_current_node_wasm"),n._ts_node_symbol_wasm=Ee("ts_node_symbol_wasm"),n._ts_node_child_count_wasm=Ee("ts_node_child_count_wasm"),n._ts_node_named_child_count_wasm=Ee("ts_node_named_child_count_wasm"),n._ts_node_child_wasm=Ee("ts_node_child_wasm"),n._ts_node_named_child_wasm=Ee("ts_node_named_child_wasm"),n._ts_node_child_by_field_id_wasm=Ee("ts_node_child_by_field_id_wasm"),n._ts_node_next_sibling_wasm=Ee("ts_node_next_sibling_wasm"),n._ts_node_prev_sibling_wasm=Ee("ts_node_prev_sibling_wasm"),n._ts_node_next_named_sibling_wasm=Ee("ts_node_next_named_sibling_wasm"),n._ts_node_prev_named_sibling_wasm=Ee("ts_node_prev_named_sibling_wasm"),n._ts_node_parent_wasm=Ee("ts_node_parent_wasm"),n._ts_node_descendant_for_index_wasm=Ee("ts_node_descendant_for_index_wasm"),n._ts_node_named_descendant_for_index_wasm=Ee("ts_node_named_descendant_for_index_wasm"),n._ts_node_descendant_for_position_wasm=Ee("ts_node_descendant_for_position_wasm"),n._ts_node_named_descendant_for_position_wasm=Ee("ts_node_named_descendant_for_position_wasm"),n._ts_node_start_point_wasm=Ee("ts_node_start_point_wasm"),n._ts_node_end_point_wasm=Ee("ts_node_end_point_wasm"),n._ts_node_start_index_wasm=Ee("ts_node_start_index_wasm"),n._ts_node_end_index_wasm=Ee("ts_node_end_index_wasm"),n._ts_node_to_string_wasm=Ee("ts_node_to_string_wasm"),n._ts_node_children_wasm=Ee("ts_node_children_wasm"),n._ts_node_named_children_wasm=Ee("ts_node_named_children_wasm"),n._ts_node_descendants_of_type_wasm=Ee("ts_node_descendants_of_type_wasm"),n._ts_node_is_named_wasm=Ee("ts_node_is_named_wasm"),n._ts_node_has_changes_wasm=Ee("ts_node_has_changes_wasm"),n._ts_node_has_error_wasm=Ee("ts_node_has_error_wasm"),n._ts_node_is_missing_wasm=Ee("ts_node_is_missing_wasm"),n._ts_query_matches_wasm=Ee("ts_query_matches_wasm"),n._ts_query_captures_wasm=Ee("ts_query_captures_wasm"),n.___cxa_atexit=Ee("__cxa_atexit"),n.___errno_location=Ee("__errno_location"),n._fflush=Ee("fflush")),Ct=(n._strlen=Ee("strlen"),n._iswdigit=Ee("iswdigit"),n._iswalpha=Ee("iswalpha"),n._iswlower=Ee("iswlower"),n._memchr=Ee("memchr"),n._towupper=Ee("towupper"),n._sbrk=Ee("sbrk")),Et=(n._emscripten_get_sbrk_ptr=Ee("emscripten_get_sbrk_ptr"),n._setThrew=Ee("setThrew")),Tt=n._emscripten_stack_set_limits=function(){return(Tt=n._emscripten_stack_set_limits=n.asm.emscripten_stack_set_limits).apply(null,arguments)},St=(n._emscripten_stack_get_free=function(){return(n._emscripten_stack_get_free=n.asm.emscripten_stack_get_free).apply(null,arguments)},n._emscripten_stack_get_base=function(){return(St=n._emscripten_stack_get_base=n.asm.emscripten_stack_get_base).apply(null,arguments)}),xt=n._emscripten_stack_get_end=function(){return(xt=n._emscripten_stack_get_end=n.asm.emscripten_stack_get_end).apply(null,arguments)},kt=n.stackSave=Ee("stackSave"),It=n.stackRestore=Ee("stackRestore"),At=n.stackAlloc=Ee("stackAlloc");n.__Znwm=Ee("_Znwm"),n.__ZdlPv=Ee("_ZdlPv"),n.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev=Ee("_ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev"),n.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm=Ee("_ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm"),n.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm=Ee("_ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm"),n.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm=Ee("_ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm"),n.__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm=Ee("_ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm"),n.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc=Ee("_ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc"),n.__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev=Ee("_ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev"),n.__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw=Ee("_ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw"),n.dynCall_jiji=Ee("dynCall_jiji"),n._orig$ts_parser_timeout_micros=Ee("orig$ts_parser_timeout_micros"),n._orig$ts_parser_set_timeout_micros=Ee("orig$ts_parser_set_timeout_micros"),n.AsciiToString=yt,n.stringToUTF16=mt,["run","UTF8ArrayToString","UTF8ToString","stringToUTF8Array","stringToUTF8","lengthBytesUTF8","addOnPreRun","addOnInit","addOnPreMain","addOnExit","addOnPostRun","addRunDependency","removeRunDependency","FS_createFolder","FS_createPath","FS_createDataFile","FS_createPreloadedFile","FS_createLazyFile","FS_createLink","FS_createDevice","FS_unlink","getLEB","getFunctionTables","alignFunctionTables","registerFunctions","prettyPrint","getCompilerSetting","out","err","callMain","abort","keepRuntimeAlive","wasmMemory","stackAlloc","stackSave","stackRestore","getTempRet0","setTempRet0","writeStackCookie","checkStackCookie","ptrToString","zeroMemory","stringToNewUTF8","exitJS","getHeapMax","emscripten_realloc_buffer","ENV","ERRNO_CODES","ERRNO_MESSAGES","setErrNo","inetPton4","inetNtop4","inetPton6","inetNtop6","readSockaddr","writeSockaddr","DNS","getHostByName","Protocols","Sockets","getRandomDevice","warnOnce","traverseStack","UNWIND_CACHE","convertPCtoSourceLocation","readAsmConstArgsArray","readAsmConstArgs","mainThreadEM_ASM","jstoi_q","jstoi_s","getExecutableName","listenOnce","autoResumeAudioContext","dynCallLegacy","getDynCaller","dynCall","handleException","runtimeKeepalivePush","runtimeKeepalivePop","callUserCallback","maybeExit","safeSetTimeout","asmjsMangle","asyncLoad","alignMemory","mmapAlloc","writeI53ToI64","writeI53ToI64Clamped","writeI53ToI64Signaling","writeI53ToU64Clamped","writeI53ToU64Signaling","readI53FromI64","readI53FromU64","convertI32PairToI53","convertI32PairToI53Checked","convertU32PairToI53","getCFunc","ccall","cwrap","uleb128Encode","sigToWasmTypes","generateFuncType","convertJsFunctionToWasm","freeTableIndexes","functionsInTableMap","getEmptyTableSlot","updateTableMap","addFunction","removeFunction","reallyNegative","unSign","strLen","reSign","formatString","setValue","getValue","PATH","PATH_FS","intArrayFromString","intArrayToString","stringToAscii","UTF16Decoder","UTF16ToString","lengthBytesUTF16","UTF32ToString","stringToUTF32","lengthBytesUTF32","allocateUTF8","allocateUTF8OnStack","writeStringToMemory","writeArrayToMemory","writeAsciiToMemory","SYSCALLS","getSocketFromFD","getSocketAddress","JSEvents","registerKeyEventCallback","specialHTMLTargets","maybeCStringToJsString","findEventTarget","findCanvasEventTarget","getBoundingClientRect","fillMouseEventData","registerMouseEventCallback","registerWheelEventCallback","registerUiEventCallback","registerFocusEventCallback","fillDeviceOrientationEventData","registerDeviceOrientationEventCallback","fillDeviceMotionEventData","registerDeviceMotionEventCallback","screenOrientation","fillOrientationChangeEventData","registerOrientationChangeEventCallback","fillFullscreenChangeEventData","registerFullscreenChangeEventCallback","JSEvents_requestFullscreen","JSEvents_resizeCanvasForFullscreen","registerRestoreOldStyle","hideEverythingExceptGivenElement","restoreHiddenElements","setLetterbox","currentFullscreenStrategy","restoreOldWindowedStyle","softFullscreenResizeWebGLRenderTarget","doRequestFullscreen","fillPointerlockChangeEventData","registerPointerlockChangeEventCallback","registerPointerlockErrorEventCallback","requestPointerLock","fillVisibilityChangeEventData","registerVisibilityChangeEventCallback","registerTouchEventCallback","fillGamepadEventData","registerGamepadEventCallback","registerBeforeUnloadEventCallback","fillBatteryEventData","battery","registerBatteryEventCallback","setCanvasElementSize","getCanvasElementSize","demangle","demangleAll","jsStackTrace","stackTrace","ExitStatus","getEnvStrings","checkWasiClock","doReadv","doWritev","GOT","CurrentModuleWeakSymbols","LDSO","getMemory","mergeLibSymbols","loadWebAssemblyModule","loadDynamicLibrary","dlopenInternal","createDyncallWrapper","setImmediateWrapped","clearImmediateWrapped","polyfillSetImmediate","Browser","setMainLoop","wget","tempFixedLengthArray","miniTempWebGLFloatBuffers","heapObjectForWebGLType","heapAccessShiftForWebGLHeap","GL","emscriptenWebGLGet","computeUnpackAlignedImageSize","emscriptenWebGLGetTexPixelData","emscriptenWebGLGetUniform","webglGetUniformLocation","webglPrepareUniformLocationsBeforeFirstUse","webglGetLeftBracePos","emscriptenWebGLGetVertexAttrib","writeGLArray","AL","SDL_unicode","SDL_ttfContext","SDL_audio","SDL","SDL_gfx","GLUT","EGL","GLFW_Window","GLFW","GLEW","IDBStore","runAndAbortIfError","ALLOC_NORMAL","ALLOC_STACK","allocate"].forEach((function(e){Object.getOwnPropertyDescriptor(n,e)||Object.defineProperty(n,e,{configurable:!0,get:function(){var t="'"+e+"' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)";S(e)&&(t+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),ge(t)}})})),["ptrToString","stringToNewUTF8","setErrNo","inetPton4","inetNtop4","inetPton6","inetNtop6","readSockaddr","writeSockaddr","getHostByName","getRandomDevice","traverseStack","convertPCtoSourceLocation","readAsmConstArgs","mainThreadEM_ASM","jstoi_q","jstoi_s","getExecutableName","listenOnce","autoResumeAudioContext","getDynCaller","runtimeKeepalivePush","runtimeKeepalivePop","callUserCallback","maybeExit","safeSetTimeout","asyncLoad","mmapAlloc","writeI53ToI64","writeI53ToI64Clamped","writeI53ToI64Signaling","writeI53ToU64Clamped","writeI53ToU64Signaling","readI53FromI64","readI53FromU64","convertI32PairToI53","convertU32PairToI53","getCFunc","ccall","cwrap","removeFunction","reallyNegative","strLen","reSign","formatString","intArrayFromString","intArrayToString","stringToAscii","UTF16ToString","lengthBytesUTF16","UTF32ToString","stringToUTF32","lengthBytesUTF32","allocateUTF8","writeStringToMemory","writeArrayToMemory","writeAsciiToMemory","getSocketFromFD","getSocketAddress","registerKeyEventCallback","maybeCStringToJsString","findEventTarget","findCanvasEventTarget","getBoundingClientRect","fillMouseEventData","registerMouseEventCallback","registerWheelEventCallback","registerUiEventCallback","registerFocusEventCallback","fillDeviceOrientationEventData","registerDeviceOrientationEventCallback","fillDeviceMotionEventData","registerDeviceMotionEventCallback","screenOrientation","fillOrientationChangeEventData","registerOrientationChangeEventCallback","fillFullscreenChangeEventData","registerFullscreenChangeEventCallback","JSEvents_requestFullscreen","JSEvents_resizeCanvasForFullscreen","registerRestoreOldStyle","hideEverythingExceptGivenElement","restoreHiddenElements","setLetterbox","softFullscreenResizeWebGLRenderTarget","doRequestFullscreen","fillPointerlockChangeEventData","registerPointerlockChangeEventCallback","registerPointerlockErrorEventCallback","requestPointerLock","fillVisibilityChangeEventData","registerVisibilityChangeEventCallback","registerTouchEventCallback","fillGamepadEventData","registerGamepadEventCallback","registerBeforeUnloadEventCallback","fillBatteryEventData","battery","registerBatteryEventCallback","setCanvasElementSize","getCanvasElementSize","demangle","demangleAll","jsStackTrace","stackTrace","getEnvStrings","checkWasiClock","doReadv","dlopenInternal","createDyncallWrapper","setImmediateWrapped","clearImmediateWrapped","polyfillSetImmediate","setMainLoop","heapObjectForWebGLType","heapAccessShiftForWebGLHeap","emscriptenWebGLGet","computeUnpackAlignedImageSize","emscriptenWebGLGetTexPixelData","emscriptenWebGLGetUniform","webglGetUniformLocation","webglPrepareUniformLocationsBeforeFirstUse","webglGetLeftBracePos","emscriptenWebGLGetVertexAttrib","writeGLArray","SDL_unicode","SDL_ttfContext","SDL_audio","GLFW_Window","runAndAbortIfError","ALLOC_NORMAL","ALLOC_STACK","allocate"].forEach((function(e){"undefined"==typeof globalThis||Object.getOwnPropertyDescriptor(globalThis,e)||Object.defineProperty(globalThis,e,{configurable:!0,get:function(){var t="`"+e+"` is a library symbol and not included by default; add it to your library.js __deps or to DEFAULT_LIBRARY_FUNCS_TO_INCLUDE on the command line",r=e;r.startsWith("_")||(r="$"+e),t+=" (e.g. -sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE="+r+")",S(e)&&(t+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),Xe(t)}})})),de=function e(){vt||Rt(),vt||(de=e)};var Pt=!1;function Rt(e){function t(){vt||(vt=!0,n.calledRun=!0,M||(B(!ae),ae=!0,te(),Ae(se),Ae(ne),te(),Ae(ie),n.onRuntimeInitialized&&n.onRuntimeInitialized(),Nt&&function(e){B(0==le,'cannot call main when async dependencies remain! (listen on Module["onRuntimeInitialized"])'),B(0==re.length,"cannot call main when preRun functions remain to be called");var t=n._main;if(t){(e=e||[]).unshift(c);var r=e.length,i=At(4*(r+1)),o=i>>2;e.forEach((e=>{R(4*o++,function(e){var t=Y(e)+1,r=At(t);return G(e,j,r,t),r}(e),4)})),R(4*o,0,4);try{dt(t(r,i),!0)}catch(e){return function(e){if(e instanceof Se||"unwind"==e)return L;l(1,e)}(e)}}}(e),function(){if(te(),n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)e=n.postRun.shift(),oe.unshift(e);var e;Ae(oe)}()))}var r;e=e||a,le>0||(Tt(5255488,12608),B(0==(3&(r=xt()))),R(4*(r>>2),34821223,4),R(4*(r+4>>2),2310721022,4),!Pt&&(k.length?(he("preloadDylibs"),k.reduce((function(e,t){return e.then((function(){return Qe(t,{loadAsync:!0,global:!0,nodelete:!0,allowUndefined:!0})}))}),Promise.resolve()).then((function(){Ye(),fe("preloadDylibs")}))):Ye(),Pt=!0,le>0)||(function(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)e=n.preRun.shift(),re.unshift(e);var e;Ae(re)}(),le>0||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),t()}),1)):t(),te())))}if(n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();var Nt=!0;n.noInitialRun&&(Nt=!1),Rt();const Ot=n,Dt={},Lt=20,Mt={row:0,column:0},Bt=/[\w-.]*/g,Ft=/^_?tree_sitter_\w+/;var jt,Ut,$t,qt,Ht;class Vt{static init(){$t=Ot._ts_init(),jt=Re($t,"i32"),Ut=Re($t+4,"i32")}initialize(){Ot._ts_parser_new_wasm(),this[0]=Re($t,"i32"),this[1]=Re($t+4,"i32")}delete(){Ot._ts_parser_delete(this[0]),Ot._free(this[1]),this[0]=0,this[1]=0}setLanguage(e){let t;if(e){if(e.constructor!==Gt)throw new Error("Argument must be a Language");{t=e[0];const r=Ot._ts_language_version(t);if(re.slice(t,n);else{if("function"!=typeof e)throw new Error("Argument must be a string or a function");qt=e}this.logCallback?(Ht=this.logCallback,Ot._ts_parser_enable_logger_wasm(this[0],1)):(Ht=null,Ot._ts_parser_enable_logger_wasm(this[0],0));let n=0,i=0;if(r&&r.includedRanges){n=r.includedRanges.length,i=Ot._calloc(n,24);let e=i;for(let t=0;t0){let e=r;for(let r=0;r0){let r=t;for(let t=0;t0){let r=t;for(let t=0;t0){let e=a;for(let t=0;t0){if("string"!==i[0].type)throw new Error("Predicates must begin with a literal value");const t=i[0].value;let r=!0;switch(t){case"not-eq?":r=!1;case"eq?":if(3!==i.length)throw new Error("Wrong number of arguments to `#eq?` predicate. Expected 2, got "+(i.length-1));if("capture"!==i[1].type)throw new Error(`First argument of \`#eq?\` predicate must be a capture. Got "${i[1].value}"`);if("capture"===i[2].type){const t=i[1].name,n=i[2].name;h[e].push((function(e){let i,o;for(const r of e)r.name===t&&(i=r.node),r.name===n&&(o=r.node);return void 0===i||void 0===o||i.text===o.text===r}))}else{const t=i[1].name,n=i[2].value;h[e].push((function(e){for(const i of e)if(i.name===t)return i.node.text===n===r;return!0}))}break;case"not-match?":r=!1;case"match?":if(3!==i.length)throw new Error(`Wrong number of arguments to \`#match?\` predicate. Expected 2, got ${i.length-1}.`);if("capture"!==i[1].type)throw new Error(`First argument of \`#match?\` predicate must be a capture. Got "${i[1].value}".`);if("string"!==i[2].type)throw new Error(`Second argument of \`#match?\` predicate must be a string. Got @${i[2].value}.`);const n=i[1].name,o=new RegExp(i[2].value);h[e].push((function(e){for(const t of e)if(t.name===n)return o.test(t.node.text)===r;return!0}));break;case"set!":if(i.length<2||i.length>3)throw new Error(`Wrong number of arguments to \`#set!\` predicate. Expected 1 or 2. Got ${i.length-1}.`);if(i.some((e=>"string"!==e.type)))throw new Error('Arguments to `#set!` predicate must be a strings.".');l[e]||(l[e]={}),l[e][i[1].value]=i[2]?i[2].value:null;break;case"is?":case"is-not?":if(i.length<2||i.length>3)throw new Error(`Wrong number of arguments to \`#${t}\` predicate. Expected 1 or 2. Got ${i.length-1}.`);if(i.some((e=>"string"!==e.type)))throw new Error(`Arguments to \`#${t}\` predicate must be a strings.".`);const s="is?"===t?u:d;s[e]||(s[e]={}),s[e][i[1].value]=i[2]?i[2].value:null;break;default:p[e].push({operator:t,operands:i.slice(1)})}i.length=0}}Object.freeze(l[e]),Object.freeze(u[e]),Object.freeze(d[e])}return Ot._free(r),new Qt(Dt,n,a,h,p,Object.freeze(l),Object.freeze(u),Object.freeze(d))}static load(e){let t;if(e instanceof Uint8Array)t=Promise.resolve(e);else{const n=e;if("undefined"!=typeof process&&process.versions&&process.versions.node){const e=r(747);t=Promise.resolve(e.readFileSync(n))}else t=fetch(n).then((e=>e.arrayBuffer().then((t=>{if(e.ok)return new Uint8Array(t);{const r=new TextDecoder("utf-8").decode(t);throw new Error(`Language.load failed with status ${e.status}.\n\n${r}`)}}))))}const n="function"==typeof loadSideModule?loadSideModule:Ge;return t.then((e=>n(e,{loadAsync:!0}))).then((e=>{const t=Object.keys(e),r=t.find((e=>Ft.test(e)&&!e.includes("external_scanner_")));r||console.log(`Couldn't find language function in WASM file. Symbols:\n${JSON.stringify(t,null,2)}`);const n=e[r]();return new Gt(Dt,n)}))}}class Qt{constructor(e,t,r,n,i,o,s,a){Xt(e),this[0]=t,this.captureNames=r,this.textPredicates=n,this.predicates=i,this.setProperties=o,this.assertedProperties=s,this.refutedProperties=a,this.exceededMatchLimit=!1}delete(){Ot._ts_query_delete(this[0]),this[0]=0}matches(e,t,r,n){t||(t=Mt),r||(r=Mt),n||(n={});let i=n.matchLimit;if(void 0===i)i=0;else if("number"!=typeof i)throw new Error("Arguments must be numbers");er(e),Ot._ts_query_matches_wasm(this[0],e.tree[0],t.row,t.column,r.row,r.column,i);const o=Re($t,"i32"),s=Re($t+4,"i32"),a=Re($t+8,"i32"),c=new Array(o);this.exceededMatchLimit=!!a;let l=0,u=s;for(let t=0;te(i)))){c[l++]={pattern:r,captures:i};const e=this.setProperties[r];e&&(c[t].setProperties=e);const n=this.assertedProperties[r];n&&(c[t].assertedProperties=n);const o=this.refutedProperties[r];o&&(c[t].refutedProperties=o)}}return c.length=l,Ot._free(s),c}captures(e,t,r,n){t||(t=Mt),r||(r=Mt),n||(n={});let i=n.matchLimit;if(void 0===i)i=0;else if("number"!=typeof i)throw new Error("Arguments must be numbers");er(e),Ot._ts_query_captures_wasm(this[0],e.tree[0],t.row,t.column,r.row,r.column,i);const o=Re($t,"i32"),s=Re($t+4,"i32"),a=Re($t+8,"i32"),c=[];this.exceededMatchLimit=!!a;const l=[];let u=s;for(let t=0;te(l)))){const e=l[n],r=this.setProperties[t];r&&(e.setProperties=r);const i=this.assertedProperties[t];i&&(e.assertedProperties=i);const o=this.refutedProperties[t];o&&(e.refutedProperties=o),c.push(e)}}return Ot._free(s),c}predicatesForPattern(e){return this.predicates[e]}didExceedMatchLimit(){return this.exceededMatchLimit}}function Yt(e,t,r){const n=r-t;let i=e.textCallback(t,null,r);for(t+=i.length;t0))break;t+=n.length,i+=n}return t>r&&(i=i.slice(0,n)),i}function Jt(e,t,r,n){for(let i=0,o=n.length;i{Vt.init(),t()}})))}}return o}();e.exports=i},747:e=>{"use strict";e.exports=r(57147)},622:e=>{"use strict";e.exports=r(71017)},669:e=>{"use strict";e.exports=r(73837)},13:e=>{"use strict";e.exports=r(71267)}},i={},o=function e(t){var r=i[t];if(void 0!==r)return r.exports;var o=i[t]={exports:{}};return n[t].call(o.exports,o,o.exports,e),o.exports}(563),e.exports=o},37201:(e,t,r)=>{var n=void 0!==n?n:{},i=function(){var t,i="object"==typeof window?{currentScript:window.document.currentScript}:null;class o{constructor(){this.initialize()}initialize(){throw new Error("cannot construct a Parser before calling `init()`")}static init(s){return t||(n=Object.assign({},n,s),t=new Promise((t=>{var s=Object.assign({},n),a=[],c="./this.program",l=(e,t)=>{throw t},u="object"==typeof window,d="function"==typeof importScripts,p="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,h=!u&&!p&&!d;if(n.ENVIRONMENT)throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -sENVIRONMENT=web or -sENVIRONMENT=node)");var f,g,m,y="";function v(e){if(e instanceof Se)return;let t=e;e&&"object"==typeof e&&e.stack&&(t=[e,e.stack]),E("exiting due to exception: "+t)}if(p){if("undefined"==typeof process||!process.release||"node"!==process.release.name)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");var _,b;y=d?r(71017).dirname(y)+"/":__dirname+"/",_=r(57147),b=r(71017),f=(e,t)=>(e=b.normalize(e),_.readFileSync(e,t?void 0:"utf8")),m=e=>{var t=f(e,!0);return t.buffer||(t=new Uint8Array(t)),B(t.buffer),t},g=(e,t,r)=>{e=b.normalize(e),_.readFile(e,(function(e,n){e?r(e):t(n.buffer)}))},process.argv.length>1&&(c=process.argv[1].replace(/\\/g,"/")),a=process.argv.slice(2),e.exports=n,l=(e,t)=>{if(ce())throw process.exitCode=e,t;v(t),process.exit(e)},n.inspect=function(){return"[Emscripten Module object]"}}else if(h){if("object"==typeof process||"object"==typeof window||"function"==typeof importScripts)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");"undefined"!=typeof read&&(f=function(e){return read(e)}),m=function(e){let t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(t=read(e,"binary"),B("object"==typeof t),t)},g=function(e,t,r){setTimeout((()=>t(m(e))),0)},"undefined"!=typeof scriptArgs?a=scriptArgs:void 0!==arguments&&(a=arguments),"function"==typeof quit&&(l=(e,t)=>{v(t),quit(e)}),"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)}else{if(!u&&!d)throw new Error("environment detection error");if(d?y=self.location.href:void 0!==i&&i.currentScript&&(y=i.currentScript.src),y=0!==y.indexOf("blob:")?y.substr(0,y.replace(/[?#].*/,"").lastIndexOf("/")+1):"","object"!=typeof window&&"function"!=typeof importScripts)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");f=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},d&&(m=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),g=(e,t,r)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?t(n.response):r()},n.onerror=r,n.send(null)}}var w,C=n.print||console.log.bind(console),E=n.printErr||console.warn.bind(console);function T(e,t){Object.getOwnPropertyDescriptor(n,e)||Object.defineProperty(n,e,{configurable:!0,get:function(){ge("Module."+e+" has been replaced with plain "+t+" (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}})}function S(e){return"FS_createPath"===e||"FS_createDataFile"===e||"FS_createPreloadedFile"===e||"FS_unlink"===e||"addRunDependency"===e||"FS_createLazyFile"===e||"FS_createDevice"===e||"removeRunDependency"===e}Object.assign(n,s),s=null,w="fetchSettings",Object.getOwnPropertyDescriptor(n,w)&&ge("`Module."+w+"` was supplied but `"+w+"` not included in INCOMING_MODULE_JS_API"),n.arguments&&(a=n.arguments),T("arguments","arguments_"),n.thisProgram&&(c=n.thisProgram),T("thisProgram","thisProgram"),n.quit&&(l=n.quit),T("quit","quit_"),B(void 0===n.memoryInitializerPrefixURL,"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),B(void 0===n.pthreadMainPrefixURL,"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),B(void 0===n.cdInitializerPrefixURL,"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),B(void 0===n.filePackagePrefixURL,"Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),B(void 0===n.read,"Module.read option was removed (modify read_ in JS)"),B(void 0===n.readAsync,"Module.readAsync option was removed (modify readAsync in JS)"),B(void 0===n.readBinary,"Module.readBinary option was removed (modify readBinary in JS)"),B(void 0===n.setWindowTitle,"Module.setWindowTitle option was removed (modify setWindowTitle in JS)"),B(void 0===n.TOTAL_MEMORY,"Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY"),T("read","read_"),T("readAsync","readAsync"),T("readBinary","readBinary"),T("setWindowTitle","setWindowTitle"),B(!h,"shell environment detected but not enabled at build time. Add 'shell' to `-sENVIRONMENT` to enable.");var x,k=n.dynamicLibraries||[];n.wasmBinary&&(x=n.wasmBinary),T("wasmBinary","wasmBinary");var I,A=n.noExitRuntime||!0;function P(e,t){switch(e){case 1:return"i8";case 2:return"i16";case 4:return t?"float":"i32";case 8:return t?"double":"i64";default:B(0)}}function R(e,t,r,n){if(e<=0&&ge("segmentation fault storing "+r+" bytes to address "+e),e%r!=0&&ge("alignment error storing to address "+e+", which was expected to be aligned to a multiple of "+r),ae){var i=Ct()>>>0;e+r>i&&ge("segmentation fault, exceeded the top of the available dynamic heap when storing "+r+" bytes to address "+e+". DYNAMICTOP="+i),B(i>=St()),B(i<=j.length)}return function(e,t,r){switch(r){case"i1":case"i8":j[e>>0]=t;break;case"i16":$[e>>1]=t;break;case"i32":q[e>>2]=t;break;case"i64":_e=[t>>>0,(ve=t,+Math.abs(ve)>=1?ve>0?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)],q[e>>2]=_e[0],q[e+4>>2]=_e[1];break;case"float":H[e>>2]=t;break;case"double":V[e>>3]=t;break;default:ge("invalid type for setValue: "+r)}}(e,t,P(r,n)),t}function N(e,t,r){return R(e,t,r,!0)}function O(e,t,r,n){if(e<=0&&ge("segmentation fault loading "+t+" bytes from address "+e),e%t!=0&&ge("alignment error loading from address "+e+", which was expected to be aligned to a multiple of "+t),ae){var i=Ct()>>>0;e+t>i&&ge("segmentation fault, exceeded the top of the available dynamic heap when loading "+t+" bytes from address "+e+". DYNAMICTOP="+i),B(i>=St()),B(i<=j.length)}var o,s,a=P(t,n),c=function(e,t){switch(t){case"i1":case"i8":return j[e>>0];case"i16":return $[e>>1];case"i32":case"i64":return q[e>>2];case"float":return H[e>>2];case"double":return V[e>>3];default:ge("invalid type for getValue: "+t)}}(e,a);return r&&(o=c,s=parseInt(a.substr(1),10),c=o>=0?o:s<=32?2*Math.abs(1<=n);)++i;if(i-t>16&&e.buffer&&z)return z.decode(e.subarray(t,i));for(var o="";t>10,56320|1023&l)}}else o+=String.fromCharCode((31&s)<<6|a)}else o+=String.fromCharCode(s)}return o}function W(e,t){return e?K(U,e,t):""}function G(e,t,r,n){if(!(n>0))return 0;for(var i=r,o=r+n-1,s=0;s=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++s)),a<=127){if(r>=o)break;t[r++]=a}else if(a<=2047){if(r+1>=o)break;t[r++]=192|a>>6,t[r++]=128|63&a}else if(a<=65535){if(r+2>=o)break;t[r++]=224|a>>12,t[r++]=128|a>>6&63,t[r++]=128|63&a}else{if(r+3>=o)break;a>1114111&&Xe("Invalid Unicode code point 0x"+a.toString(16)+" encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF)."),t[r++]=240|a>>18,t[r++]=128|a>>12&63,t[r++]=128|a>>6&63,t[r++]=128|63&a}}return t[r]=0,r-i}function Q(e,t,r){return B("number"==typeof r,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),G(e,U,t,r)}function Y(e){for(var t=0,r=0;r=55296&&n<=57343?(t+=4,++r):t+=3}return t}function J(e){F=e,n.HEAP8=j=new Int8Array(e),n.HEAP16=$=new Int16Array(e),n.HEAP32=q=new Int32Array(e),n.HEAPU8=U=new Uint8Array(e),n.HEAPU16=new Uint16Array(e),n.HEAPU32=new Uint32Array(e),n.HEAPF32=H=new Float32Array(e),n.HEAPF64=V=new Float64Array(e)}var X=5242880;n.STACK_SIZE&&B(X===n.STACK_SIZE,"the stack size can no longer be determined at runtime");var Z=n.INITIAL_MEMORY||33554432;T("INITIAL_MEMORY","INITIAL_MEMORY"),B(Z>=X,"INITIAL_MEMORY should be larger than STACK_SIZE, was "+Z+"! (STACK_SIZE="+X+")"),B("undefined"!=typeof Int32Array&&"undefined"!=typeof Float64Array&&null!=Int32Array.prototype.subarray&&null!=Int32Array.prototype.set,"JS engine does not provide full typed array support"),(I=n.wasmMemory?n.wasmMemory:new WebAssembly.Memory({initial:Z/65536,maximum:32768}))&&(F=I.buffer),B((Z=F.byteLength)%65536==0),J(F);var ee=new WebAssembly.Table({initial:25,element:"anyfunc"});function te(){if(!M){var e=xt(),t=O(4*(e>>2),4,1),r=O(4*(e+4>>2),4,1);34821223==t&&2310721022==r||ge("Stack overflow! Stack cookie has been overwritten at 0x"+e.toString(16)+", expected hex dwords 0x89BACDFE and 0x2135467, but received 0x"+r.toString(16)+" 0x"+t.toString(16))}}!function(){var e=new Int16Array(1),t=new Int8Array(e.buffer);if(e[0]=25459,115!==t[0]||99!==t[1])throw"Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)"}();var re=[],ne=[],ie=[],oe=[],se=[],ae=!1;function ce(){return A}B(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),B(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),B(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),B(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var le=0,ue=null,de=null,pe={};function he(e){le++,n.monitorRunDependencies&&n.monitorRunDependencies(le),e?(B(!pe[e]),pe[e]=1,null===ue&&"undefined"!=typeof setInterval&&(ue=setInterval((function(){if(M)return clearInterval(ue),void(ue=null);var e=!1;for(var t in pe)e||(e=!0,E("still waiting on run dependencies:")),E("dependency: "+t);e&&E("(end of list)")}),1e4))):E("warning: run dependency added without ID")}function fe(e){if(le--,n.monitorRunDependencies&&n.monitorRunDependencies(le),e?(B(pe[e]),delete pe[e]):E("warning: run dependency removed without ID"),0==le&&(null!==ue&&(clearInterval(ue),ue=null),de)){var t=de;de=null,t()}}function ge(e){throw n.onAbort&&n.onAbort(e),E(e="Aborted("+e+")"),M=!0,L=1,new WebAssembly.RuntimeError(e)}var me,ye,ve,_e,be={error:function(){ge("Filesystem support (FS) was not included. The problem is that you are using files from JS, but files were not used from C/C++, so filesystem support was not auto-included. You can force-include filesystem support with -sFORCE_FILESYSTEM")},init:function(){be.error()},createDataFile:function(){be.error()},createPreloadedFile:function(){be.error()},createLazyFile:function(){be.error()},open:function(){be.error()},mkdev:function(){be.error()},registerDevice:function(){be.error()},analyzePath:function(){be.error()},loadFilesFromDB:function(){be.error()},ErrnoError:function(){be.error()}};function we(e){return e.startsWith("data:application/octet-stream;base64,")}function Ce(e){return e.startsWith("file://")}function Ee(e,t){return function(){var r=e,i=t;return t||(i=n.asm),B(ae,"native function `"+r+"` called before runtime initialization"),i[e]||B(i[e],"exported native function `"+r+"` not found"),i[e].apply(null,arguments)}}function Te(e){try{if(e==me&&x)return new Uint8Array(x);if(m)return m(e);throw"both async and sync fetching of the wasm failed"}catch(e){ge(e)}}function Se(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}n.FS_createDataFile=be.createDataFile,n.FS_createPreloadedFile=be.createPreloadedFile,we(me="tree-sitter.wasm")||(ye=me,me=n.locateFile?n.locateFile(ye,y):y+ye);var xe={},ke=new Set([]),Ie={get:function(e,t){var r=xe[t];return r||(r=xe[t]=new WebAssembly.Global({value:"i32",mutable:!0})),ke.has(t)||(r.required=!0),r}};function Ae(e){for(;e.length>0;)e.shift()(n)}function Pe(e){var t=0,r=0;function n(){for(var r=0,n=1;;){var i=e[t++];if(r+=(127&i)*n,n*=128,!(128&i))break}return r}function i(){var r=n();return K(e,(t+=r)-r,r)}function o(e,t){if(e)throw new Error(t)}var s="dylink.0";if(e instanceof WebAssembly.Module){var a=WebAssembly.Module.customSections(e,s);0===a.length&&(s="dylink",a=WebAssembly.Module.customSections(e,s)),o(0===a.length,"need dylink section"),r=(e=new Uint8Array(a[0])).length}else{o(!(1836278016==new Uint32Array(new Uint8Array(e.subarray(0,24)).buffer)[0]),"need to see wasm magic number"),o(0!==e[8],"need the dylink section to be first"),t=9;var c=n();r=t+c,s=i()}var l={neededDynlibs:[],tlsExports:new Set,weakImports:new Set};if("dylink"==s){l.memorySize=n(),l.memoryAlign=n(),l.tableSize=n(),l.tableAlign=n();for(var u=n(),d=0;d>0,1,0);case"i16":return O(2*(e>>1),2,0);case"i32":case"i64":return O(4*(e>>2),4,0);case"float":return D(4*(e>>2),4,0);case"double":return D(8*(e>>3),8,0);case"*":return O(4*(e>>2),4,1);default:ge("invalid type for getValue: "+t)}return null}function Ne(e){return 0==e.indexOf("dynCall_")||["stackAlloc","stackSave","stackRestore","getTempRet0","setTempRet0"].includes(e)?e:"_"+e}function Oe(e,t){for(var r in e)if(e.hasOwnProperty(r)){_t.hasOwnProperty(r)||(_t[r]=e[r]);var i=Ne(r);n.hasOwnProperty(i)||(n[i]=e[r]),"__main_argc_argv"==r&&(n._main=e[r])}}var De={loadedLibsByName:{},loadedLibsByHandle:{}},Le=[];function Me(e){var t=Le[e];return t||(e>=Le.length&&(Le.length=e+1),Le[e]=t=ee.get(e)),B(ee.get(e)==t,"JavaScript-side Wasm function table mirror is out of date!"),t}function Be(e,t,r){return e.includes("j")?function(e,t,r){B("dynCall_"+e in n,"bad function pointer type - dynCall function not found for sig '"+e+"'"),r&&r.length?B(r.length===e.substring(1).replace(/j/g,"--").length):B(1==e.length);var i=n["dynCall_"+e];return r&&r.length?i.apply(null,[t].concat(r)):i.call(null,t)}(e,t,r):(B(Me(t),"missing table entry in dynCall: "+t),Me(t).apply(null,r))}var Fe=5255488;function je(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"].includes(e)}function Ue(e,t){B(e<16384),e<128?t.push(e):t.push(e%128|128,e>>7)}function $e(e,t){if(qe)for(var r=e;r>0,1,0))c=O(4*(r+28>>2),4,1),l=O(4*(r+36>>2),4,1);else{var a=Math.pow(2,n.memoryAlign);a=Math.max(a,16);var c=n.memorySize?(o=function(e){if(ae)return function(e,t){return U.fill(0,e,e+t),e}(bt(e),e);var t=Fe,r=t+e+15&-16;return B(r<=j.length,"failure to getMemory - memory growth etc. is not supported there, call malloc/sbrk directly or increase INITIAL_MEMORY"),Fe=r,xe.__heap_base.value=r,t}(n.memorySize+a),B(s=a,"alignment argument is required"),Math.ceil(o/s)*s):0,l=n.tableSize?ee.length:0;r&&(R(r+24>>0,1,1),R(4*(r+28>>2),c,4),R(4*(r+32>>2),n.memorySize,4),R(4*(r+36>>2),l,4),R(4*(r+40>>2),n.tableSize,4))}var u,d=l+n.tableSize-ee.length;function p(e){var t=We(e,!1);return t||(t=u[e]),B(t,"undefined symbol `"+e+"`. perhaps a side module was not linked in? if this global was expected to arrive from a system library, try to build the MAIN_MODULE with EMCC_FORCE_STDLIBS=1 in the environment"),t}d>0&&ee.grow(d);var h={get:function(e,t){switch(t){case"__memory_base":return c;case"__table_base":return l}return t in _t?_t[t]:(t in e||(e[t]=function(){return r||(r=p(t)),r.apply(null,arguments)}),e[t]);var r}},f=new Proxy({},h),g={"GOT.mem":new Proxy({},Ie),"GOT.func":new Proxy({},Ie),env:f,wasi_snapshot_preview1:f};function m(e){B(ee===i),$e(l,n.tableSize),u=Ke(e.exports,c),t.allowUndefined||Ye();var r=u.__wasm_apply_data_relocs;r&&(ae?r():se.push(r));var o=u.__wasm_call_ctors;return o&&(ae?o():ne.push(o)),u}if(t.loadAsync){if(e instanceof WebAssembly.Module){var y=new WebAssembly.Instance(e,g);return Promise.resolve(m(y))}return WebAssembly.instantiate(e,g).then((function(e){return m(e.instance)}))}var v=e instanceof WebAssembly.Module?e:new WebAssembly.Module(e);return m(y=new WebAssembly.Instance(v,g))}return t.loadAsync?n.neededDynlibs.reduce((function(e,r){return e.then((function(){return Qe(r,t)}))}),Promise.resolve()).then((function(){return o()})):(n.neededDynlibs.forEach((function(e){Qe(e,t)})),o())}function Qe(e,t,r){t=t||{global:!0,nodelete:!0};var n=De.loadedLibsByName[e];if(n)return t.global&&!n.global&&(n.global=!0,"loading"!==n.module&&Oe(n.module)),t.nodelete&&n.refcount!==1/0&&(n.refcount=1/0),n.refcount++,r&&(De.loadedLibsByHandle[r]=n),!t.loadAsync||Promise.resolve(!0);function i(e){if(t.fs&&t.fs.findObject(e)){var r=t.fs.readFile(e,{encoding:"binary"});return r instanceof Uint8Array||(r=new Uint8Array(r)),t.loadAsync?Promise.resolve(r):r}if(t.loadAsync)return new Promise((function(t,r){g(e,(e=>t(new Uint8Array(e))),r)}));if(!m)throw new Error(e+": file not found, and synchronous loading of external files is not available");return m(e)}function o(){if("undefined"!=typeof preloadedWasm&&preloadedWasm[e]){var n=preloadedWasm[e];return t.loadAsync?Promise.resolve(n):n}return t.loadAsync?i(e).then((function(e){return Ge(e,t,r)})):Ge(i(e),t,r)}function s(e){n.global&&Oe(e),n.module=e}return n={refcount:t.nodelete?1/0:1,name:e,module:"loading",global:t.global},De.loadedLibsByName[e]=n,r&&(De.loadedLibsByHandle[r]=n),t.loadAsync?o().then((function(e){return s(e),!0})):(s(o()),!0)}function Ye(){for(var e in xe)if(0==xe[e].value){var t=We(e,!0);if(!t&&!xe[e].required)continue;if(B(t,"undefined symbol `"+e+"`. perhaps a side module was not linked in? if this global was expected to arrive from a system library, try to build the MAIN_MODULE with EMCC_FORCE_STDLIBS=1 in the environment"),"function"==typeof t)xe[e].value=ze(t,t.sig);else{if("number"!=typeof t)throw new Error("bad export type for `"+e+"`: "+typeof t);xe[e].value=t}}}function Je(e,t,r="i8"){switch(r.endsWith("*")&&(r="*"),r){case"i1":case"i8":R(e>>0,t,1);break;case"i16":R(2*(e>>1),t,2);break;case"i32":case"*":R(4*(e>>2),t,4);break;case"i64":R(4*(e>>2),(_e=[t>>>0,(ve=t,+Math.abs(ve)>=1?ve>0?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)])[0],4),R(4*(e+4>>2),_e[1],4);break;case"float":N(4*(e>>2),t,4);break;case"double":N(8*(e>>3),t,8);break;default:ge("invalid type for setValue: "+r)}}function Xe(e){Xe.shown||(Xe.shown={}),Xe.shown[e]||(Xe.shown[e]=1,p&&(e="warning: "+e),E(e))}var Ze,et=new WebAssembly.Global({value:"i32",mutable:!1},1024),tt=new WebAssembly.Global({value:"i32",mutable:!0},5255488),rt=new WebAssembly.Global({value:"i32",mutable:!1},1);function nt(){return!0}function it(){ge("native code called abort()")}function ot(){return Date.now()}function st(e,t,r){U.copyWithin(e,t,t+r)}function at(e){try{return I.grow(e-F.byteLength+65535>>>16),J(I.buffer),1}catch(t){E("emscripten_realloc_buffer: Attempted to grow heap from "+F.byteLength+" bytes to "+e+" bytes, but got error: "+t)}}function ct(e){var t=U.length;B((e>>>=0)>t);var r,n=2147483648;if(e>n)return E("Cannot enlarge memory, asked to go up to "+e+" bytes, but the limit is "+n+" bytes!"),!1;for(var i=1;i<=4;i*=2){var o=t*(1+.2/i);o=Math.min(o,e+100663296);var s=Math.min(n,(r=Math.max(e,o))+(65536-r%65536)%65536);if(at(s))return!0}return E("Failed to grow the heap from "+t+" bytes to "+s+" bytes, not enough memory!"),!1}nt.sig="i",n._abort=it,it.sig="v",ot.sig="d",(Ze=p?()=>{var e=process.hrtime();return 1e3*e[0]+e[1]/1e6}:()=>performance.now()).sig="d",st.sig="vppp",ct.sig="ip";var lt={DEFAULT_POLLMASK:5,calculateAt:function(e,t,r){if(PATH.isAbs(t))return t;var n;if(n=-100===e?be.cwd():lt.getStreamFromFD(e).path,0==t.length){if(!r)throw new be.ErrnoError(44);return n}return PATH.join2(n,t)},doStat:function(e,t,r){try{var n=e(t)}catch(e){if(e&&e.node&&PATH.normalize(t)!==PATH.normalize(be.getPath(e.node)))return-54;throw e}return R(4*(r>>2),n.dev,4),R(4*(r+8>>2),n.ino,4),R(4*(r+12>>2),n.mode,4),R(4*(r+16>>2),n.nlink,4),R(4*(r+20>>2),n.uid,4),R(4*(r+24>>2),n.gid,4),R(4*(r+28>>2),n.rdev,4),R(4*(r+40>>2),(_e=[n.size>>>0,(ve=n.size,+Math.abs(ve)>=1?ve>0?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)])[0],4),R(4*(r+44>>2),_e[1],4),R(4*(r+48>>2),4096,4),R(4*(r+52>>2),n.blocks,4),R(4*(r+56>>2),(_e=[Math.floor(n.atime.getTime()/1e3)>>>0,(ve=Math.floor(n.atime.getTime()/1e3),+Math.abs(ve)>=1?ve>0?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)])[0],4),R(4*(r+60>>2),_e[1],4),R(4*(r+64>>2),0,4),R(4*(r+72>>2),(_e=[Math.floor(n.mtime.getTime()/1e3)>>>0,(ve=Math.floor(n.mtime.getTime()/1e3),+Math.abs(ve)>=1?ve>0?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)])[0],4),R(4*(r+76>>2),_e[1],4),R(4*(r+80>>2),0,4),R(4*(r+88>>2),(_e=[Math.floor(n.ctime.getTime()/1e3)>>>0,(ve=Math.floor(n.ctime.getTime()/1e3),+Math.abs(ve)>=1?ve>0?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)])[0],4),R(4*(r+92>>2),_e[1],4),R(4*(r+96>>2),0,4),R(4*(r+104>>2),(_e=[n.ino>>>0,(ve=n.ino,+Math.abs(ve)>=1?ve>0?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)])[0],4),R(4*(r+108>>2),_e[1],4),0},doMsync:function(e,t,r,n,i){if(!be.isFile(t.node.mode))throw new be.ErrnoError(43);if(2&n)return 0;var o=U.slice(e,e+r);be.msync(t,o,i,r,n)},varargs:void 0,get:function(){return B(null!=lt.varargs),lt.varargs+=4,O(4*(lt.varargs-4>>2),4,0)},getStr:function(e){return W(e)},getStreamFromFD:function(e){var t=be.getStream(e);if(!t)throw new be.ErrnoError(8);return t}};function ut(e){L=e,ce()||(n.onExit&&n.onExit(e),M=!0),l(e,new Se(e))}function dt(e,t){L=e,function(){var e=C,t=E,r=!1;C=E=e=>{r=!0};try{wt(0)}catch(e){}C=e,E=t,r&&(Xe("stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the FAQ), or make sure to emit a newline when you printf etc."),Xe("(this may also be due to not including full filesystem support - try building with -sFORCE_FILESYSTEM)"))}(),ce()&&!t&&E("program exited (with status: "+e+"), but EXIT_RUNTIME is not set, so halting execution but not exiting the runtime or preventing further async execution (build with EXIT_RUNTIME=1, if you want a true shutdown)"),ut(e)}ut.sig="vi";var pt=dt;function ht(e){try{var t=lt.getStreamFromFD(e);return be.close(t),0}catch(e){if(void 0===be||!(e instanceof be.ErrnoError))throw e;return e.errno}}function ft(e,t,r,n,i){try{var o=(c=r,B((a=t)==a>>>0||a==(0|a)),B(c===(0|c)),c+2097152>>>0<4194305-!!a?(a>>>0)+4294967296*c:NaN);if(isNaN(o))return 61;var s=lt.getStreamFromFD(e);return be.llseek(s,o,n),R(4*(i>>2),(_e=[s.position>>>0,(ve=s.position,+Math.abs(ve)>=1?ve>0?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)])[0],4),R(4*(i+4>>2),_e[1],4),s.getdents&&0===o&&0===n&&(s.getdents=null),0}catch(e){if(void 0===be||!(e instanceof be.ErrnoError))throw e;return e.errno}var a,c}function gt(e,t,r,n){try{var i=function(e,t,r,n){for(var i=0,o=0;o>2),4,1),a=O(4*(t+4>>2),4,1);t+=8;var c=be.write(e,j,s,a,undefined);if(c<0)return-1;i+=c}return i}(lt.getStreamFromFD(e),t,r);return R(4*(n>>2),i,4),0}catch(e){if(void 0===be||!(e instanceof be.ErrnoError))throw e;return e.errno}}function mt(e,t,r){if(B(t%2==0,"Pointer passed to stringToUTF16 must be aligned to two bytes!"),B("number"==typeof r,"stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),void 0===r&&(r=2147483647),r<2)return 0;for(var n=t,i=(r-=2)<2*e.length?r/2:e.length,o=0;o>1),e.charCodeAt(o),2),t+=2;return R(2*(t>>1),0,2),t-n}function yt(e){for(var t="";;){var r=O(e++>>0,1,1);if(!r)return t;t+=String.fromCharCode(r)}}pt.sig="vi",ht.sig="ii",ft.sig="iijip",gt.sig="iippp";var vt,_t={__heap_base:Fe,__indirect_function_table:ee,__memory_base:et,__stack_high:5255488,__stack_low:12608,__stack_pointer:tt,__table_base:rt,_emscripten_get_now_is_monotonic:nt,abort:it,alignfault:function(){ge("alignment fault")},emscripten_date_now:ot,emscripten_get_now:Ze,emscripten_memcpy_big:st,emscripten_resize_heap:ct,exit:pt,fd_close:ht,fd_seek:ft,fd_write:gt,memory:I,segfault:function(){ge("segmentation fault")},tree_sitter_log_callback:function(e,t){if(Ht){const r=W(t);Ht(r,0!==e)}},tree_sitter_parse_callback:function(e,t,r,n,i){var o=qt(t,{row:r,column:n});"string"==typeof o?(Je(i,o.length,"i32"),mt(o,e,10240)):Je(i,0,"i32")}},bt=(function(){var e={env:_t,wasi_snapshot_preview1:_t,"GOT.mem":new Proxy(_t,Ie),"GOT.func":new Proxy(_t,Ie)};function t(e,t){var r=e.exports;r=Ke(r,1024);var i,o=Pe(t);o.neededDynlibs&&(k=o.neededDynlibs.concat(k)),Oe(r),n.asm=r,i=n.asm.__wasm_call_ctors,ne.unshift(i),se.push(n.asm.__wasm_apply_data_relocs),fe("wasm-instantiate")}he("wasm-instantiate");var r=n;function i(e){B(n===r,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),r=null,t(e.instance,e.module)}function o(t){return function(){if(!x&&(u||d)){if("function"==typeof fetch&&!Ce(me))return fetch(me,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+me+"'";return e.arrayBuffer()})).catch((function(){return Te(me)}));if(g)return new Promise((function(e,t){g(me,(function(t){e(new Uint8Array(t))}),t)}))}return Promise.resolve().then((function(){return Te(me)}))}().then((function(t){return WebAssembly.instantiate(t,e)})).then((function(e){return e})).then(t,(function(e){E("failed to asynchronously prepare wasm: "+e),Ce(me)&&E("warning: Loading from a file URI ("+me+") is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing"),ge(e)}))}if(n.instantiateWasm)try{return n.instantiateWasm(e,t)}catch(e){return E("Module.instantiateWasm callback failed with error: "+e),!1}x||"function"!=typeof WebAssembly.instantiateStreaming||we(me)||Ce(me)||p||"function"!=typeof fetch?o(i):fetch(me,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(i,(function(e){return E("wasm streaming compile failed: "+e),E("falling back to ArrayBuffer instantiation"),o(i)}))}))}(),n.___wasm_call_ctors=Ee("__wasm_call_ctors"),n.___wasm_apply_data_relocs=Ee("__wasm_apply_data_relocs"),n._malloc=Ee("malloc")),wt=(n._calloc=Ee("calloc"),n._realloc=Ee("realloc"),n._free=Ee("free"),n._ts_language_symbol_count=Ee("ts_language_symbol_count"),n._ts_language_version=Ee("ts_language_version"),n._ts_language_field_count=Ee("ts_language_field_count"),n._ts_language_symbol_name=Ee("ts_language_symbol_name"),n._ts_language_symbol_for_name=Ee("ts_language_symbol_for_name"),n._ts_language_symbol_type=Ee("ts_language_symbol_type"),n._ts_language_field_name_for_id=Ee("ts_language_field_name_for_id"),n._memset=Ee("memset"),n._memcpy=Ee("memcpy"),n._ts_parser_delete=Ee("ts_parser_delete"),n._ts_parser_set_language=Ee("ts_parser_set_language"),n._ts_parser_reset=Ee("ts_parser_reset"),n._ts_parser_timeout_micros=Ee("ts_parser_timeout_micros"),n._ts_parser_set_timeout_micros=Ee("ts_parser_set_timeout_micros"),n._ts_query_new=Ee("ts_query_new"),n._ts_query_delete=Ee("ts_query_delete"),n._iswspace=Ee("iswspace"),n._ts_query_pattern_count=Ee("ts_query_pattern_count"),n._ts_query_capture_count=Ee("ts_query_capture_count"),n._ts_query_string_count=Ee("ts_query_string_count"),n._ts_query_capture_name_for_id=Ee("ts_query_capture_name_for_id"),n._ts_query_string_value_for_id=Ee("ts_query_string_value_for_id"),n._ts_query_predicates_for_pattern=Ee("ts_query_predicates_for_pattern"),n._memmove=Ee("memmove"),n._memcmp=Ee("memcmp"),n._ts_tree_copy=Ee("ts_tree_copy"),n._ts_tree_delete=Ee("ts_tree_delete"),n._iswalnum=Ee("iswalnum"),n._ts_init=Ee("ts_init"),n._ts_parser_new_wasm=Ee("ts_parser_new_wasm"),n._ts_parser_enable_logger_wasm=Ee("ts_parser_enable_logger_wasm"),n._ts_parser_parse_wasm=Ee("ts_parser_parse_wasm"),n._ts_language_type_is_named_wasm=Ee("ts_language_type_is_named_wasm"),n._ts_language_type_is_visible_wasm=Ee("ts_language_type_is_visible_wasm"),n._ts_tree_root_node_wasm=Ee("ts_tree_root_node_wasm"),n._ts_tree_edit_wasm=Ee("ts_tree_edit_wasm"),n._ts_tree_get_changed_ranges_wasm=Ee("ts_tree_get_changed_ranges_wasm"),n._ts_tree_cursor_new_wasm=Ee("ts_tree_cursor_new_wasm"),n._ts_tree_cursor_delete_wasm=Ee("ts_tree_cursor_delete_wasm"),n._ts_tree_cursor_reset_wasm=Ee("ts_tree_cursor_reset_wasm"),n._ts_tree_cursor_goto_first_child_wasm=Ee("ts_tree_cursor_goto_first_child_wasm"),n._ts_tree_cursor_goto_next_sibling_wasm=Ee("ts_tree_cursor_goto_next_sibling_wasm"),n._ts_tree_cursor_goto_parent_wasm=Ee("ts_tree_cursor_goto_parent_wasm"),n._ts_tree_cursor_current_node_type_id_wasm=Ee("ts_tree_cursor_current_node_type_id_wasm"),n._ts_tree_cursor_current_node_is_named_wasm=Ee("ts_tree_cursor_current_node_is_named_wasm"),n._ts_tree_cursor_current_node_is_missing_wasm=Ee("ts_tree_cursor_current_node_is_missing_wasm"),n._ts_tree_cursor_current_node_id_wasm=Ee("ts_tree_cursor_current_node_id_wasm"),n._ts_tree_cursor_start_position_wasm=Ee("ts_tree_cursor_start_position_wasm"),n._ts_tree_cursor_end_position_wasm=Ee("ts_tree_cursor_end_position_wasm"),n._ts_tree_cursor_start_index_wasm=Ee("ts_tree_cursor_start_index_wasm"),n._ts_tree_cursor_end_index_wasm=Ee("ts_tree_cursor_end_index_wasm"),n._ts_tree_cursor_current_field_id_wasm=Ee("ts_tree_cursor_current_field_id_wasm"),n._ts_tree_cursor_current_node_wasm=Ee("ts_tree_cursor_current_node_wasm"),n._ts_node_symbol_wasm=Ee("ts_node_symbol_wasm"),n._ts_node_child_count_wasm=Ee("ts_node_child_count_wasm"),n._ts_node_named_child_count_wasm=Ee("ts_node_named_child_count_wasm"),n._ts_node_child_wasm=Ee("ts_node_child_wasm"),n._ts_node_named_child_wasm=Ee("ts_node_named_child_wasm"),n._ts_node_child_by_field_id_wasm=Ee("ts_node_child_by_field_id_wasm"),n._ts_node_next_sibling_wasm=Ee("ts_node_next_sibling_wasm"),n._ts_node_prev_sibling_wasm=Ee("ts_node_prev_sibling_wasm"),n._ts_node_next_named_sibling_wasm=Ee("ts_node_next_named_sibling_wasm"),n._ts_node_prev_named_sibling_wasm=Ee("ts_node_prev_named_sibling_wasm"),n._ts_node_parent_wasm=Ee("ts_node_parent_wasm"),n._ts_node_descendant_for_index_wasm=Ee("ts_node_descendant_for_index_wasm"),n._ts_node_named_descendant_for_index_wasm=Ee("ts_node_named_descendant_for_index_wasm"),n._ts_node_descendant_for_position_wasm=Ee("ts_node_descendant_for_position_wasm"),n._ts_node_named_descendant_for_position_wasm=Ee("ts_node_named_descendant_for_position_wasm"),n._ts_node_start_point_wasm=Ee("ts_node_start_point_wasm"),n._ts_node_end_point_wasm=Ee("ts_node_end_point_wasm"),n._ts_node_start_index_wasm=Ee("ts_node_start_index_wasm"),n._ts_node_end_index_wasm=Ee("ts_node_end_index_wasm"),n._ts_node_to_string_wasm=Ee("ts_node_to_string_wasm"),n._ts_node_children_wasm=Ee("ts_node_children_wasm"),n._ts_node_named_children_wasm=Ee("ts_node_named_children_wasm"),n._ts_node_descendants_of_type_wasm=Ee("ts_node_descendants_of_type_wasm"),n._ts_node_is_named_wasm=Ee("ts_node_is_named_wasm"),n._ts_node_has_changes_wasm=Ee("ts_node_has_changes_wasm"),n._ts_node_has_error_wasm=Ee("ts_node_has_error_wasm"),n._ts_node_is_missing_wasm=Ee("ts_node_is_missing_wasm"),n._ts_query_matches_wasm=Ee("ts_query_matches_wasm"),n._ts_query_captures_wasm=Ee("ts_query_captures_wasm"),n.___cxa_atexit=Ee("__cxa_atexit"),n.___errno_location=Ee("__errno_location"),n._fflush=Ee("fflush")),Ct=(n._strlen=Ee("strlen"),n._iswdigit=Ee("iswdigit"),n._iswalpha=Ee("iswalpha"),n._iswlower=Ee("iswlower"),n._memchr=Ee("memchr"),n._towupper=Ee("towupper"),n._sbrk=Ee("sbrk")),Et=(n._emscripten_get_sbrk_ptr=Ee("emscripten_get_sbrk_ptr"),n._setThrew=Ee("setThrew")),Tt=n._emscripten_stack_set_limits=function(){return(Tt=n._emscripten_stack_set_limits=n.asm.emscripten_stack_set_limits).apply(null,arguments)},St=(n._emscripten_stack_get_free=function(){return(n._emscripten_stack_get_free=n.asm.emscripten_stack_get_free).apply(null,arguments)},n._emscripten_stack_get_base=function(){return(St=n._emscripten_stack_get_base=n.asm.emscripten_stack_get_base).apply(null,arguments)}),xt=n._emscripten_stack_get_end=function(){return(xt=n._emscripten_stack_get_end=n.asm.emscripten_stack_get_end).apply(null,arguments)},kt=n.stackSave=Ee("stackSave"),It=n.stackRestore=Ee("stackRestore"),At=n.stackAlloc=Ee("stackAlloc");n.__Znwm=Ee("_Znwm"),n.__ZdlPv=Ee("_ZdlPv"),n.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev=Ee("_ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev"),n.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm=Ee("_ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm"),n.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm=Ee("_ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm"),n.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm=Ee("_ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm"),n.__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm=Ee("_ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm"),n.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc=Ee("_ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc"),n.__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev=Ee("_ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev"),n.__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw=Ee("_ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw"),n.dynCall_jiji=Ee("dynCall_jiji"),n._orig$ts_parser_timeout_micros=Ee("orig$ts_parser_timeout_micros"),n._orig$ts_parser_set_timeout_micros=Ee("orig$ts_parser_set_timeout_micros"),n.AsciiToString=yt,n.stringToUTF16=mt,["run","UTF8ArrayToString","UTF8ToString","stringToUTF8Array","stringToUTF8","lengthBytesUTF8","addOnPreRun","addOnInit","addOnPreMain","addOnExit","addOnPostRun","addRunDependency","removeRunDependency","FS_createFolder","FS_createPath","FS_createDataFile","FS_createPreloadedFile","FS_createLazyFile","FS_createLink","FS_createDevice","FS_unlink","getLEB","getFunctionTables","alignFunctionTables","registerFunctions","prettyPrint","getCompilerSetting","out","err","callMain","abort","keepRuntimeAlive","wasmMemory","stackAlloc","stackSave","stackRestore","getTempRet0","setTempRet0","writeStackCookie","checkStackCookie","ptrToString","zeroMemory","stringToNewUTF8","exitJS","getHeapMax","emscripten_realloc_buffer","ENV","ERRNO_CODES","ERRNO_MESSAGES","setErrNo","inetPton4","inetNtop4","inetPton6","inetNtop6","readSockaddr","writeSockaddr","DNS","getHostByName","Protocols","Sockets","getRandomDevice","warnOnce","traverseStack","UNWIND_CACHE","convertPCtoSourceLocation","readAsmConstArgsArray","readAsmConstArgs","mainThreadEM_ASM","jstoi_q","jstoi_s","getExecutableName","listenOnce","autoResumeAudioContext","dynCallLegacy","getDynCaller","dynCall","handleException","runtimeKeepalivePush","runtimeKeepalivePop","callUserCallback","maybeExit","safeSetTimeout","asmjsMangle","asyncLoad","alignMemory","mmapAlloc","writeI53ToI64","writeI53ToI64Clamped","writeI53ToI64Signaling","writeI53ToU64Clamped","writeI53ToU64Signaling","readI53FromI64","readI53FromU64","convertI32PairToI53","convertI32PairToI53Checked","convertU32PairToI53","getCFunc","ccall","cwrap","uleb128Encode","sigToWasmTypes","generateFuncType","convertJsFunctionToWasm","freeTableIndexes","functionsInTableMap","getEmptyTableSlot","updateTableMap","addFunction","removeFunction","reallyNegative","unSign","strLen","reSign","formatString","setValue","getValue","PATH","PATH_FS","intArrayFromString","intArrayToString","stringToAscii","UTF16Decoder","UTF16ToString","lengthBytesUTF16","UTF32ToString","stringToUTF32","lengthBytesUTF32","allocateUTF8","allocateUTF8OnStack","writeStringToMemory","writeArrayToMemory","writeAsciiToMemory","SYSCALLS","getSocketFromFD","getSocketAddress","JSEvents","registerKeyEventCallback","specialHTMLTargets","maybeCStringToJsString","findEventTarget","findCanvasEventTarget","getBoundingClientRect","fillMouseEventData","registerMouseEventCallback","registerWheelEventCallback","registerUiEventCallback","registerFocusEventCallback","fillDeviceOrientationEventData","registerDeviceOrientationEventCallback","fillDeviceMotionEventData","registerDeviceMotionEventCallback","screenOrientation","fillOrientationChangeEventData","registerOrientationChangeEventCallback","fillFullscreenChangeEventData","registerFullscreenChangeEventCallback","JSEvents_requestFullscreen","JSEvents_resizeCanvasForFullscreen","registerRestoreOldStyle","hideEverythingExceptGivenElement","restoreHiddenElements","setLetterbox","currentFullscreenStrategy","restoreOldWindowedStyle","softFullscreenResizeWebGLRenderTarget","doRequestFullscreen","fillPointerlockChangeEventData","registerPointerlockChangeEventCallback","registerPointerlockErrorEventCallback","requestPointerLock","fillVisibilityChangeEventData","registerVisibilityChangeEventCallback","registerTouchEventCallback","fillGamepadEventData","registerGamepadEventCallback","registerBeforeUnloadEventCallback","fillBatteryEventData","battery","registerBatteryEventCallback","setCanvasElementSize","getCanvasElementSize","demangle","demangleAll","jsStackTrace","stackTrace","ExitStatus","getEnvStrings","checkWasiClock","doReadv","doWritev","GOT","CurrentModuleWeakSymbols","LDSO","getMemory","mergeLibSymbols","loadWebAssemblyModule","loadDynamicLibrary","dlopenInternal","createDyncallWrapper","setImmediateWrapped","clearImmediateWrapped","polyfillSetImmediate","Browser","setMainLoop","wget","tempFixedLengthArray","miniTempWebGLFloatBuffers","heapObjectForWebGLType","heapAccessShiftForWebGLHeap","GL","emscriptenWebGLGet","computeUnpackAlignedImageSize","emscriptenWebGLGetTexPixelData","emscriptenWebGLGetUniform","webglGetUniformLocation","webglPrepareUniformLocationsBeforeFirstUse","webglGetLeftBracePos","emscriptenWebGLGetVertexAttrib","writeGLArray","AL","SDL_unicode","SDL_ttfContext","SDL_audio","SDL","SDL_gfx","GLUT","EGL","GLFW_Window","GLFW","GLEW","IDBStore","runAndAbortIfError","ALLOC_NORMAL","ALLOC_STACK","allocate"].forEach((function(e){Object.getOwnPropertyDescriptor(n,e)||Object.defineProperty(n,e,{configurable:!0,get:function(){var t="'"+e+"' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)";S(e)&&(t+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),ge(t)}})})),["ptrToString","stringToNewUTF8","setErrNo","inetPton4","inetNtop4","inetPton6","inetNtop6","readSockaddr","writeSockaddr","getHostByName","getRandomDevice","traverseStack","convertPCtoSourceLocation","readAsmConstArgs","mainThreadEM_ASM","jstoi_q","jstoi_s","getExecutableName","listenOnce","autoResumeAudioContext","getDynCaller","runtimeKeepalivePush","runtimeKeepalivePop","callUserCallback","maybeExit","safeSetTimeout","asyncLoad","mmapAlloc","writeI53ToI64","writeI53ToI64Clamped","writeI53ToI64Signaling","writeI53ToU64Clamped","writeI53ToU64Signaling","readI53FromI64","readI53FromU64","convertI32PairToI53","convertU32PairToI53","getCFunc","ccall","cwrap","removeFunction","reallyNegative","strLen","reSign","formatString","intArrayFromString","intArrayToString","stringToAscii","UTF16ToString","lengthBytesUTF16","UTF32ToString","stringToUTF32","lengthBytesUTF32","allocateUTF8","writeStringToMemory","writeArrayToMemory","writeAsciiToMemory","getSocketFromFD","getSocketAddress","registerKeyEventCallback","maybeCStringToJsString","findEventTarget","findCanvasEventTarget","getBoundingClientRect","fillMouseEventData","registerMouseEventCallback","registerWheelEventCallback","registerUiEventCallback","registerFocusEventCallback","fillDeviceOrientationEventData","registerDeviceOrientationEventCallback","fillDeviceMotionEventData","registerDeviceMotionEventCallback","screenOrientation","fillOrientationChangeEventData","registerOrientationChangeEventCallback","fillFullscreenChangeEventData","registerFullscreenChangeEventCallback","JSEvents_requestFullscreen","JSEvents_resizeCanvasForFullscreen","registerRestoreOldStyle","hideEverythingExceptGivenElement","restoreHiddenElements","setLetterbox","softFullscreenResizeWebGLRenderTarget","doRequestFullscreen","fillPointerlockChangeEventData","registerPointerlockChangeEventCallback","registerPointerlockErrorEventCallback","requestPointerLock","fillVisibilityChangeEventData","registerVisibilityChangeEventCallback","registerTouchEventCallback","fillGamepadEventData","registerGamepadEventCallback","registerBeforeUnloadEventCallback","fillBatteryEventData","battery","registerBatteryEventCallback","setCanvasElementSize","getCanvasElementSize","demangle","demangleAll","jsStackTrace","stackTrace","getEnvStrings","checkWasiClock","doReadv","dlopenInternal","createDyncallWrapper","setImmediateWrapped","clearImmediateWrapped","polyfillSetImmediate","setMainLoop","heapObjectForWebGLType","heapAccessShiftForWebGLHeap","emscriptenWebGLGet","computeUnpackAlignedImageSize","emscriptenWebGLGetTexPixelData","emscriptenWebGLGetUniform","webglGetUniformLocation","webglPrepareUniformLocationsBeforeFirstUse","webglGetLeftBracePos","emscriptenWebGLGetVertexAttrib","writeGLArray","SDL_unicode","SDL_ttfContext","SDL_audio","GLFW_Window","runAndAbortIfError","ALLOC_NORMAL","ALLOC_STACK","allocate"].forEach((function(e){"undefined"==typeof globalThis||Object.getOwnPropertyDescriptor(globalThis,e)||Object.defineProperty(globalThis,e,{configurable:!0,get:function(){var t="`"+e+"` is a library symbol and not included by default; add it to your library.js __deps or to DEFAULT_LIBRARY_FUNCS_TO_INCLUDE on the command line",r=e;r.startsWith("_")||(r="$"+e),t+=" (e.g. -sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE="+r+")",S(e)&&(t+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),Xe(t)}})})),de=function e(){vt||Rt(),vt||(de=e)};var Pt=!1;function Rt(e){function t(){vt||(vt=!0,n.calledRun=!0,M||(B(!ae),ae=!0,te(),Ae(se),Ae(ne),te(),Ae(ie),n.onRuntimeInitialized&&n.onRuntimeInitialized(),Nt&&function(e){B(0==le,'cannot call main when async dependencies remain! (listen on Module["onRuntimeInitialized"])'),B(0==re.length,"cannot call main when preRun functions remain to be called");var t=n._main;if(t){(e=e||[]).unshift(c);var r=e.length,i=At(4*(r+1)),o=i>>2;e.forEach((e=>{R(4*o++,function(e){var t=Y(e)+1,r=At(t);return G(e,j,r,t),r}(e),4)})),R(4*o,0,4);try{var s=t(r,i);dt(s,!0)}catch(e){return function(e){if(e instanceof Se||"unwind"==e)return L;l(1,e)}(e)}}}(e),function(){if(te(),n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)e=n.postRun.shift(),oe.unshift(e);var e;Ae(oe)}()))}var r;e=e||a,le>0||(Tt(5255488,12608),B(0==(3&(r=xt()))),R(4*(r>>2),34821223,4),R(4*(r+4>>2),2310721022,4),!Pt&&(k.length?(he("preloadDylibs"),k.reduce((function(e,t){return e.then((function(){return Qe(t,{loadAsync:!0,global:!0,nodelete:!0,allowUndefined:!0})}))}),Promise.resolve()).then((function(){Ye(),fe("preloadDylibs")}))):Ye(),Pt=!0,le>0)||(function(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)e=n.preRun.shift(),re.unshift(e);var e;Ae(re)}(),le>0||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),t()}),1)):t(),te())))}if(n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();var Nt=!0;n.noInitialRun&&(Nt=!1),Rt();const Ot=n,Dt={},Lt=20,Mt={row:0,column:0},Bt=/[\w-.]*/g,Ft=/^_?tree_sitter_\w+/;var jt,Ut,$t,qt,Ht;class Vt{static init(){$t=Ot._ts_init(),jt=Re($t,"i32"),Ut=Re($t+4,"i32")}initialize(){Ot._ts_parser_new_wasm(),this[0]=Re($t,"i32"),this[1]=Re($t+4,"i32")}delete(){Ot._ts_parser_delete(this[0]),Ot._free(this[1]),this[0]=0,this[1]=0}setLanguage(e){let t;if(e){if(e.constructor!==Gt)throw new Error("Argument must be a Language");{t=e[0];const r=Ot._ts_language_version(t);if(re.slice(t,n);else{if("function"!=typeof e)throw new Error("Argument must be a string or a function");qt=e}this.logCallback?(Ht=this.logCallback,Ot._ts_parser_enable_logger_wasm(this[0],1)):(Ht=null,Ot._ts_parser_enable_logger_wasm(this[0],0));let n=0,i=0;if(r&&r.includedRanges){n=r.includedRanges.length,i=Ot._calloc(n,24);let e=i;for(let t=0;t0){let e=r;for(let r=0;r0){let r=t;for(let t=0;t0){let r=t;for(let t=0;t0){let e=a;for(let t=0;t0){if("string"!==i[0].type)throw new Error("Predicates must begin with a literal value");const t=i[0].value;let r=!0;switch(t){case"not-eq?":r=!1;case"eq?":if(3!==i.length)throw new Error("Wrong number of arguments to `#eq?` predicate. Expected 2, got "+(i.length-1));if("capture"!==i[1].type)throw new Error(`First argument of \`#eq?\` predicate must be a capture. Got "${i[1].value}"`);if("capture"===i[2].type){const t=i[1].name,n=i[2].name;h[e].push((function(e){let i,o;for(const r of e)r.name===t&&(i=r.node),r.name===n&&(o=r.node);return void 0===i||void 0===o||i.text===o.text===r}))}else{const t=i[1].name,n=i[2].value;h[e].push((function(e){for(const i of e)if(i.name===t)return i.node.text===n===r;return!0}))}break;case"not-match?":r=!1;case"match?":if(3!==i.length)throw new Error(`Wrong number of arguments to \`#match?\` predicate. Expected 2, got ${i.length-1}.`);if("capture"!==i[1].type)throw new Error(`First argument of \`#match?\` predicate must be a capture. Got "${i[1].value}".`);if("string"!==i[2].type)throw new Error(`Second argument of \`#match?\` predicate must be a string. Got @${i[2].value}.`);const n=i[1].name,o=new RegExp(i[2].value);h[e].push((function(e){for(const t of e)if(t.name===n)return o.test(t.node.text)===r;return!0}));break;case"set!":if(i.length<2||i.length>3)throw new Error(`Wrong number of arguments to \`#set!\` predicate. Expected 1 or 2. Got ${i.length-1}.`);if(i.some((e=>"string"!==e.type)))throw new Error('Arguments to `#set!` predicate must be a strings.".');l[e]||(l[e]={}),l[e][i[1].value]=i[2]?i[2].value:null;break;case"is?":case"is-not?":if(i.length<2||i.length>3)throw new Error(`Wrong number of arguments to \`#${t}\` predicate. Expected 1 or 2. Got ${i.length-1}.`);if(i.some((e=>"string"!==e.type)))throw new Error(`Arguments to \`#${t}\` predicate must be a strings.".`);const s="is?"===t?u:d;s[e]||(s[e]={}),s[e][i[1].value]=i[2]?i[2].value:null;break;default:p[e].push({operator:t,operands:i.slice(1)})}i.length=0}}Object.freeze(l[e]),Object.freeze(u[e]),Object.freeze(d[e])}return Ot._free(r),new Qt(Dt,n,a,h,p,Object.freeze(l),Object.freeze(u),Object.freeze(d))}static load(e){let t;if(e instanceof Uint8Array)t=Promise.resolve(e);else{const n=e;if("undefined"!=typeof process&&process.versions&&process.versions.node){const e=r(57147);t=Promise.resolve(e.readFileSync(n))}else t=fetch(n).then((e=>e.arrayBuffer().then((t=>{if(e.ok)return new Uint8Array(t);{const r=new TextDecoder("utf-8").decode(t);throw new Error(`Language.load failed with status ${e.status}.\n\n${r}`)}}))))}const n="function"==typeof loadSideModule?loadSideModule:Ge;return t.then((e=>n(e,{loadAsync:!0}))).then((e=>{const t=Object.keys(e),r=t.find((e=>Ft.test(e)&&!e.includes("external_scanner_")));r||console.log(`Couldn't find language function in WASM file. Symbols:\n${JSON.stringify(t,null,2)}`);const n=e[r]();return new Gt(Dt,n)}))}}class Qt{constructor(e,t,r,n,i,o,s,a){Xt(e),this[0]=t,this.captureNames=r,this.textPredicates=n,this.predicates=i,this.setProperties=o,this.assertedProperties=s,this.refutedProperties=a,this.exceededMatchLimit=!1}delete(){Ot._ts_query_delete(this[0]),this[0]=0}matches(e,t,r,n){t||(t=Mt),r||(r=Mt),n||(n={});let i=n.matchLimit;if(void 0===i)i=0;else if("number"!=typeof i)throw new Error("Arguments must be numbers");er(e),Ot._ts_query_matches_wasm(this[0],e.tree[0],t.row,t.column,r.row,r.column,i);const o=Re($t,"i32"),s=Re($t+4,"i32"),a=Re($t+8,"i32"),c=new Array(o);this.exceededMatchLimit=!!a;let l=0,u=s;for(let t=0;te(i)))){c[l++]={pattern:r,captures:i};const e=this.setProperties[r];e&&(c[t].setProperties=e);const n=this.assertedProperties[r];n&&(c[t].assertedProperties=n);const o=this.refutedProperties[r];o&&(c[t].refutedProperties=o)}}return c.length=l,Ot._free(s),c}captures(e,t,r,n){t||(t=Mt),r||(r=Mt),n||(n={});let i=n.matchLimit;if(void 0===i)i=0;else if("number"!=typeof i)throw new Error("Arguments must be numbers");er(e),Ot._ts_query_captures_wasm(this[0],e.tree[0],t.row,t.column,r.row,r.column,i);const o=Re($t,"i32"),s=Re($t+4,"i32"),a=Re($t+8,"i32"),c=[];this.exceededMatchLimit=!!a;const l=[];let u=s;for(let t=0;te(l)))){const e=l[n],r=this.setProperties[t];r&&(e.setProperties=r);const i=this.assertedProperties[t];i&&(e.assertedProperties=i);const o=this.refutedProperties[t];o&&(e.refutedProperties=o),c.push(e)}}return Ot._free(s),c}predicatesForPattern(e){return this.predicates[e]}didExceedMatchLimit(){return this.exceededMatchLimit}}function Yt(e,t,r){const n=r-t;let i=e.textCallback(t,null,r);for(t+=i.length;t0))break;t+=n.length,i+=n}return t>r&&(i=i.slice(0,n)),i}function Jt(e,t,r,n){for(let i=0,o=n.length;i{Vt.init(),t()}})))}}return o}();e.exports=i},28028:e=>{"use strict";e.exports=require("@opentelemetry/tracing")},89166:e=>{"use strict";e.exports=require("applicationinsights-native-metrics")},39491:e=>{"use strict";e.exports=require("assert")},50852:e=>{"use strict";e.exports=require("async_hooks")},14300:e=>{"use strict";e.exports=require("buffer")},32081:e=>{"use strict";e.exports=require("child_process")},96206:e=>{"use strict";e.exports=require("console")},22057:e=>{"use strict";e.exports=require("constants")},6113:e=>{"use strict";e.exports=require("crypto")},9523:e=>{"use strict";e.exports=require("dns")},82361:e=>{"use strict";e.exports=require("events")},57147:e=>{"use strict";e.exports=require("fs")},13685:e=>{"use strict";e.exports=require("http")},85158:e=>{"use strict";e.exports=require("http2")},95687:e=>{"use strict";e.exports=require("https")},98188:e=>{"use strict";e.exports=require("module")},41808:e=>{"use strict";e.exports=require("net")},22037:e=>{"use strict";e.exports=require("os")},71017:e=>{"use strict";e.exports=require("path")},77282:e=>{"use strict";e.exports=require("process")},12781:e=>{"use strict";e.exports=require("stream")},71576:e=>{"use strict";e.exports=require("string_decoder")},39512:e=>{"use strict";e.exports=require("timers")},24404:e=>{"use strict";e.exports=require("tls")},76224:e=>{"use strict";e.exports=require("tty")},57310:e=>{"use strict";e.exports=require("url")},73837:e=>{"use strict";e.exports=require("util")},71267:e=>{"use strict";e.exports=require("worker_threads")},59796:e=>{"use strict";e.exports=require("zlib")},93180:e=>{"use strict";e.exports=JSON.parse('{"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.0","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"}}}')},84821:e=>{"use strict";e.exports=JSON.parse('{"name":"@roamhq/mac-ca","version":"1.0.7","description":"Get Mac OS Root certificates","main":"index.js","repository":{"type":"git","url":"https://github.com/WonderInventions/mac-ca.git"},"scripts":{"test":"echo \\"Error: no test specified\\" && exit 1","lint":"eslint ."},"license":"BSD-3-Clause","dependencies":{"node-forge":"^1.3.1"},"devDependencies":{"eslint":"^8.22.0"}}')},71143:e=>{"use strict";e.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},31512:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')},43186:e=>{"use strict";e.exports={i8:"1.7.6"}},99674:e=>{"use strict";e.exports={i8:"0.2.0"}},70735:e=>{"use strict";e.exports={i8:"1.3.7"}},99876:e=>{"use strict";e.exports=JSON.parse('{"name":"copilot","displayName":"GitHub Copilot","description":"Your AI pair programmer","version":"1.71.0","build":"dev","buildType":"dev","publisher":"GitHub","preview":false,"homepage":"https://github.com/features/copilot","bugs":{"url":"https://github.com/community/community/discussions/categories/copilot"},"qna":"https://github.com/github-community/community/discussions/categories/copilot","icon":"assets/Copilot-App-Icon.png","pricing":"Trial","engines":{"vscode":"^1.68.0","npm":">=7.0.0"},"categories":["Programming Languages","Machine Learning","Education","Snippets"],"keywords":["ai","openai","codex","pilot","snippets","documentation","autocomplete","intellisense","refactor","javascript","python","typescript","php","go","golang","ruby","c++","c#","java","kotlin"],"badges":[{"url":"https://img.shields.io/badge/GitHub%20Copilot-Subscription%20Required-orange","href":"https://github.com/github-copilot/signup","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"}],"activationEvents":["onStartupFinished"],"main":"./dist/extension","enabledApiProposals":["inlineCompletionsAdditions"],"contributes":{"commands":[{"command":"github.copilot.generate","title":"Open GitHub Copilot"},{"command":"github.copilot.toggleCopilot","title":"GitHub Copilot: Configure Enabled/Disabled"},{"command":"github.copilot.sendFeedback","title":"GitHub Copilot: Send Feedback"},{"command":"github.copilot.collectDiagnostics","title":"GitHub Copilot: Collect Diagnostics"}],"keybindings":[{"command":"github.copilot.generate","key":"ctrl+enter","mac":"ctrl+enter","when":"editorTextFocus && github.copilot.activated"},{"command":"editor.action.inlineSuggest.trigger","key":"alt+\\\\","when":"editorTextFocus && !editorHasSelection && config.github.copilot.inlineSuggest.enable && !inlineSuggestionsVisible"}],"menus":{"editor/inlineCompletions/actions":[{"command":"github.copilot.generate","when":"github.copilot.activated"}],"commandPalette":[{"command":"github.copilot.generate","when":"github.copilot.activated"},{"command":"github.copilot.toggleCopilot","when":"github.copilot.activated"},{"command":"github.copilot.sendFeedback","when":"github.copilot.activated"},{"command":"github.copilot.collectDiagnostics"}]},"configuration":[{"title":"Copilot","properties":{"github.copilot.advanced":{"type":"object","title":"Advanced Settings","properties":{"secret_key":{"type":"string","default":"","description":"Secret API key"},"length":{"type":"integer","default":500,"description":"Length of code to generate in tokens"},"temperature":{"type":"string","default":"","description":"Override sampling temperature (range 0.0 - 1.0)"},"top_p":{"type":"number","default":1,"description":"Top probability mass to consider"},"stops":{"type":"object","default":{"*":["\\n\\n\\n"],"python":["\\ndef ","\\nclass ","\\nif ","\\n\\n#"]},"description":"Configure per-language stop sequences"},"indentationMode":{"type":"object","default":{"python":false,"javascript":false,"javascriptreact":false,"jsx":false,"typescript":false,"typescriptreact":false,"go":false,"ruby":false,"*":true},"markdownDescription":"Enable or disable indentation block termination for specified [languages](https://code.visualstudio.com/docs/languages/identifiers). Set to \'clientandserver\' to run both parser-based and indent-based termination."},"inlineSuggestCount":{"type":"integer","default":3,"description":"Number of inline suggestions to fetch"},"listCount":{"type":"integer","default":10,"description":"Number of solutions to list in Open GitHub Copilot"},"debug.showScores":{"type":"boolean","default":false,"description":"Show scores in sorted solutions"},"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.overrideLogLevels":{"type":"object","default":{},"description":"Override what the minimum logged level is per logger (or \'*\' for all loggers). Levels are \'DEBUG\', \'INFO\', \'WARN\', \'ERROR\'. Ex: `{\\"default\\": \\"DEBUG\\"}` to see all things logged to the \'default\' logger."},"debug.filterLogCategories":{"type":"array","default":[],"description":"Show only log categories listed in this setting. If an array is empty, show all loggers"}}},"github.copilot.enable":{"type":"object","default":{"*":true,"yaml":false,"plaintext":false,"markdown":false},"markdownDescription":"Enable or disable Copilot for specified [languages](https://code.visualstudio.com/docs/languages/identifiers)"},"github.copilot.inlineSuggest.enable":{"type":"boolean","default":true,"description":"Show inline suggestions"}}}],"icons":{"copilot-logo":{"description":"GitHub Copilot icon","default":{"fontPath":"assets/copilot.woff","fontCharacter":"\\\\0041"}},"copilot-warning":{"description":"GitHub Copilot icon","default":{"fontPath":"assets/copilot.woff","fontCharacter":"\\\\0042"}},"copilot-notconnected":{"description":"GitHub Copilot icon","default":{"fontPath":"assets/copilot.woff","fontCharacter":"\\\\0043"}}},"iconFonts":[{"id":"copilot-font","src":[{"path":"assets/copilot.woff","format":"woff"}]}]},"scripts":{"postinstall":"npx vscode-dts dev && mv vscode.proposed.*.ts extension/src","vscode:prepublish":"npm-run-all build:extension","build":"npm-run-all build:*","build:agent":"cd agent && npm run build","build:agent-no-pkg":"cd agent && npm run build-no-pkg","build:extension":"webpack --mode production","build:lib":"cd lib && npm run build","compile":"npm-run-all compile:*","compile:agent":"cd agent && npm run compile","compile:extension":"webpack --mode development","compile:lib":"cd lib && npm run compile","watch":"npm-run-all -p watch:*","watch:agent":"cd agent && npm run watch","watch:extension":"webpack --mode development --watch","watch:lib":"cd lib && npm run watch","lint":"eslint lib extension agent --ext ts","check_deps":"depcruise -c .dependency-cruiser.js .","test":"npm-run-all test:*","test:agent":"cd agent && npm run test","test:extension":"cd extension && ts-node ./test/runTest.ts","test:prompt":"cd prompt && npm install && npm run test","test:lib":"cd lib && npm run test","test:lsp-client":"cd lsp-client && npm run test","build_test":"tsc extension/test/run.ts","get_token":"ts-node script/getToken.ts"},"devDependencies":{"@github/prettier-config":"0.0.4","@types/crypto-js":"^4.0.1","@types/git-url-parse":"^9.0.1","@types/mocha":"^10.0.0","@types/node":"^13.11.0","@types/node-forge":"^1.3.0","@types/sinon":"^10.0.13","@types/tunnel":"^0.0.3","@types/uuid":"^8.3.1","@types/vscode":"^1.68.0","@typescript-eslint/eslint-plugin":"^4.27.0","@typescript-eslint/parser":"^4.27.0","@vscode/test-electron":"^2.2.0","@vscode/vsce":"2.15.0","dependency-cruiser":"^12.5.0","eslint":"^7.29.0","eslint-plugin-no-only-tests":"^2.6.0","fantasticon":"^1.2.3","get-port":"^5.1.1","ignore-loader":"^0.1.2","mocha":"^10.2.0","npm-run-all":"^4.1.5","prettier":"2.5.1","prettier-plugin-organize-imports":"^2.3.4","proxy":"^1.0.2","sinon":"^15.0.0","ts-dedent":"^2.2.0","ts-loader":"^9.4.2","ts-node":"^10.9.1","typed-emitter":"^2.1.0","typescript":"^4.9.4","vscode-dts":"^0.3.2","webpack":"^5.54.0","webpack-cli":"^4.2.0","zlib":"^1.0.5"},"dependencies":{"@adobe/helix-fetch":"github:bmuskalla/helix-fetch#4e33e47bf6e64b637d5d713558fde504bf71c947","@github/copilot-promptlib":"file:prompt","@roamhq/mac-ca":"^1.0.7","@sinclair/typebox":"^0.25.21","ajv":"8.11.0","ajv-errors":"^3.0.0","crypto-js":"^4.0.0","git-url-parse":"^13.1.0","node-forge":"^1.3.1","open":"^8.4.0","source-map-support":"^0.5.19","tunnel":"^0.0.6","uuid":"^8.3.2","vscode-extension-telemetry":"^0.1.6","vscode-uri":"^3.0.2","win-ca":"^3.5.0"}}')}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{"use strict";var e=n;Object.defineProperty(e,"__esModule",{value:!0});const t=r(76995),i=r(32879);!async function(){const e=(0,t.init)(),r=(0,i.createWrappedConnection)(e,process.stdin,process.stdout);new i.CopilotService(e,r).listen()}()})(),module.exports=n})(); + deps: ${r}}`};const s={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){const[t,r]=function({schema:e}){const t={},r={};for(const n in e)"__proto__"!==n&&((Array.isArray(e[n])?t:r)[n]=e[n]);return[t,r]}(e);a(e,t),c(e,r)}};function a(e,t=e.schema){const{gen:r,data:i,it:s}=e;if(0===Object.keys(t).length)return;const a=r.let("missing");for(const c in t){const l=t[c];if(0===l.length)continue;const u=(0,o.propertyInData)(r,i,c,s.opts.ownProperties);e.setParams({property:c,depsCount:l.length,deps:l.join(", ")}),s.allErrors?r.if(u,(()=>{for(const t of l)(0,o.checkReportMissingProp)(e,t)})):(r.if(n._`${u} && (${(0,o.checkMissingProp)(e,l,a)})`),(0,o.reportMissingProp)(e,a),r.else())}}function c(e,t=e.schema){const{gen:r,data:n,keyword:s,it:a}=e,c=r.name("valid");for(const l in t)(0,i.alwaysValidSchema)(a,t[l])||(r.if((0,o.propertyInData)(r,n,l,a.opts.ownProperties),(()=>{const t=e.subschema({keyword:s,schemaProp:l},c);e.mergeValidEvaluated(t,c)}),(()=>r.var(c,!0))),e.ok(c))}t.validatePropertyDeps=a,t.validateSchemaDeps=c,t.default=s},50076:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(15669),i=r(88936),o={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>n.str`must match "${e.ifClause}" schema`,params:({params:e})=>n._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:r,it:o}=e;void 0===r.then&&void 0===r.else&&(0,i.checkStrictMode)(o,'"if" without "then" and "else" is ignored');const a=s(o,"then"),c=s(o,"else");if(!a&&!c)return;const l=t.let("valid",!0),u=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(t)}(),e.reset(),a&&c){const r=t.let("ifClause");e.setParams({ifClause:r}),t.if(u,d("then",r),d("else",r))}else a?t.if(u,d("then")):t.if((0,n.not)(u),d("else"));function d(r,i){return()=>{const o=e.subschema({keyword:r},u);t.assign(l,u),e.mergeValidEvaluated(o,l),i?t.assign(i,n._`${r}`):e.setParams({ifClause:r})}}e.pass(l,(()=>e.error(!0)))}};function s(e,t){const r=e.schema[t];return void 0!==r&&!(0,i.alwaysValidSchema)(e,r)}t.default=o},46951:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(78891),i=r(21162),o=r(98634),s=r(65151),a=r(95609),c=r(5463),l=r(53021),u=r(24943),d=r(34243),p=r(98103),h=r(72869),f=r(54279),g=r(14880),m=r(22609),y=r(50076),v=r(25316);t.default=function(e=!1){const t=[h.default,f.default,g.default,m.default,y.default,v.default,l.default,u.default,c.default,d.default,p.default];return e?t.push(i.default,s.default):t.push(n.default,o.default),t.push(a.default),t}},98634:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;const n=r(15669),i=r(88936),o=r(3499),s={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return a(e,"additionalItems",t);r.items=!0,(0,i.alwaysValidSchema)(r,t)||e.ok((0,o.validateArray)(e))}};function a(e,t,r=e.schema){const{gen:o,parentSchema:s,data:a,keyword:c,it:l}=e;!function(e){const{opts:n,errSchemaPath:o}=l,s=r.length,a=s===e.minItems&&(s===e.maxItems||!1===e[t]);if(n.strictTuples&&!a){const e=`"${c}" is ${s}-tuple, but minItems or maxItems/${t} are not specified or different at path "${o}"`;(0,i.checkStrictMode)(l,e,n.strictTuples)}}(s),l.opts.unevaluated&&r.length&&!0!==l.items&&(l.items=i.mergeEvaluated.items(o,r.length,l.items));const u=o.name("valid"),d=o.const("len",n._`${a}.length`);r.forEach(((t,r)=>{(0,i.alwaysValidSchema)(l,t)||(o.if(n._`${d} > ${r}`,(()=>e.subschema({keyword:c,schemaProp:r,dataProp:r},u))),e.ok(u))}))}t.validateTuple=a,t.default=s},65151:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(15669),i=r(88936),o=r(3499),s=r(78891),a={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:r,it:n}=e,{prefixItems:a}=r;n.items=!0,(0,i.alwaysValidSchema)(n,t)||(a?(0,s.validateAdditionalItems)(e,a):e.ok((0,o.validateArray)(e)))}};t.default=a},72869:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(88936),i={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:i}=e;if((0,n.alwaysValidSchema)(i,r))return void e.fail();const o=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),e.failResult(o,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};t.default=i},14880:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(15669),i=r(88936),o={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>n._`{passingSchemas: ${e.passing}}`},code(e){const{gen:t,schema:r,parentSchema:o,it:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(s.opts.discriminator&&o.discriminator)return;const a=r,c=t.let("valid",!1),l=t.let("passing",null),u=t.name("_valid");e.setParams({passing:l}),t.block((function(){a.forEach(((r,o)=>{let a;(0,i.alwaysValidSchema)(s,r)?t.var(u,!0):a=e.subschema({keyword:"oneOf",schemaProp:o,compositeRule:!0},u),o>0&&t.if(n._`${u} && ${c}`).assign(c,!1).assign(l,n._`[${l}, ${o}]`).else(),t.if(u,(()=>{t.assign(c,!0),t.assign(l,o),a&&e.mergeEvaluated(a,n.Name)}))}))})),e.result(c,(()=>e.reset()),(()=>e.error(!0)))}};t.default=o},98103:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3499),i=r(15669),o=r(88936),s=r(88936),a={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:a,parentSchema:c,it:l}=e,{opts:u}=l,d=(0,n.allSchemaProperties)(r),p=d.filter((e=>(0,o.alwaysValidSchema)(l,r[e])));if(0===d.length||p.length===d.length&&(!l.opts.unevaluated||!0===l.props))return;const h=u.strictSchema&&!u.allowMatchingProperties&&c.properties,f=t.name("valid");!0===l.props||l.props instanceof i.Name||(l.props=(0,s.evaluatedPropsToName)(t,l.props));const{props:g}=l;function m(e){for(const t in h)new RegExp(e).test(t)&&(0,o.checkStrictMode)(l,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function y(r){t.forIn("key",a,(o=>{t.if(i._`${(0,n.usePattern)(e,r)}.test(${o})`,(()=>{const n=p.includes(r);n||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:o,dataPropType:s.Type.Str},f),l.opts.unevaluated&&!0!==g?t.assign(i._`${g}[${o}]`,!0):n||l.allErrors||t.if((0,i.not)(f),(()=>t.break()))}))}))}!function(){for(const e of d)h&&m(e),l.allErrors?y(e):(t.var(f,!0),y(e),t.if(f))}()}};t.default=a},21162:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(98634),i={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,n.validateTuple)(e,"items")};t.default=i},34243:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(91686),i=r(3499),o=r(88936),s=r(24943),a={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:a,data:c,it:l}=e;"all"===l.opts.removeAdditional&&void 0===a.additionalProperties&&s.default.code(new n.KeywordCxt(l,s.default,"additionalProperties"));const u=(0,i.allSchemaProperties)(r);for(const e of u)l.definedProperties.add(e);l.opts.unevaluated&&u.length&&!0!==l.props&&(l.props=o.mergeEvaluated.props(t,(0,o.toHash)(u),l.props));const d=u.filter((e=>!(0,o.alwaysValidSchema)(l,r[e])));if(0===d.length)return;const p=t.name("valid");for(const r of d)h(r)?f(r):(t.if((0,i.propertyInData)(t,c,r,l.opts.ownProperties)),f(r),l.allErrors||t.else().var(p,!0),t.endIf()),e.it.definedProperties.add(r),e.ok(p);function h(e){return l.opts.useDefaults&&!l.compositeRule&&void 0!==r[e].default}function f(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},p)}}};t.default=a},53021:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(15669),i=r(88936),o={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>n._`{propertyName: ${e.propertyName}}`},code(e){const{gen:t,schema:r,data:o,it:s}=e;if((0,i.alwaysValidSchema)(s,r))return;const a=t.name("valid");t.forIn("key",o,(r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},a),t.if((0,n.not)(a),(()=>{e.error(!0),s.allErrors||t.break()}))})),e.ok(a)}};t.default=o},25316:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(88936),i={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){void 0===t.if&&(0,n.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};t.default=i},3499:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;const n=r(15669),i=r(88936),o=r(17250),s=r(88936);function a(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:n._`Object.prototype.hasOwnProperty`})}function c(e,t,r){return n._`${a(e)}.call(${t}, ${r})`}function l(e,t,r,i){const o=n._`${t}${(0,n.getProperty)(r)} === undefined`;return i?(0,n.or)(o,(0,n.not)(c(e,t,r))):o}function u(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}t.checkReportMissingProp=function(e,t){const{gen:r,data:i,it:o}=e;r.if(l(r,i,t,o.opts.ownProperties),(()=>{e.setParams({missingProperty:n._`${t}`},!0),e.error()}))},t.checkMissingProp=function({gen:e,data:t,it:{opts:r}},i,o){return(0,n.or)(...i.map((i=>(0,n.and)(l(e,t,i,r.ownProperties),n._`${o} = ${i}`))))},t.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=a,t.isOwnProperty=c,t.propertyInData=function(e,t,r,i){const o=n._`${t}${(0,n.getProperty)(r)} !== undefined`;return i?n._`${o} && ${c(e,t,r)}`:o},t.noPropertyInData=l,t.allSchemaProperties=u,t.schemaProperties=function(e,t){return u(t).filter((r=>!(0,i.alwaysValidSchema)(e,t[r])))},t.callValidateCode=function({schemaCode:e,data:t,it:{gen:r,topSchemaRef:i,schemaPath:s,errorPath:a},it:c},l,u,d){const p=d?n._`${e}, ${t}, ${i}${s}`:t,h=[[o.default.instancePath,(0,n.strConcat)(o.default.instancePath,a)],[o.default.parentData,c.parentData],[o.default.parentDataProperty,c.parentDataProperty],[o.default.rootData,o.default.rootData]];c.opts.dynamicRef&&h.push([o.default.dynamicAnchors,o.default.dynamicAnchors]);const f=n._`${p}, ${r.object(...h)}`;return u!==n.nil?n._`${l}.call(${u}, ${f})`:n._`${l}(${f})`};const d=n._`new RegExp`;t.usePattern=function({gen:e,it:{opts:t}},r){const i=t.unicodeRegExp?"u":"",{regExp:o}=t.code,a=o(r,i);return e.scopeValue("pattern",{key:a.toString(),ref:a,code:n._`${"new RegExp"===o.code?d:(0,s.useFunc)(e,o)}(${r}, ${i})`})},t.validateArray=function(e){const{gen:t,data:r,keyword:o,it:s}=e,a=t.name("valid");if(s.allErrors){const e=t.let("valid",!0);return c((()=>t.assign(e,!1))),e}return t.var(a,!0),c((()=>t.break())),a;function c(s){const c=t.const("len",n._`${r}.length`);t.forRange("i",0,c,(r=>{e.subschema({keyword:o,dataProp:r,dataPropType:i.Type.Num},a),t.if((0,n.not)(a),s)}))}},t.validateUnion=function(e){const{gen:t,schema:r,keyword:o,it:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some((e=>(0,i.alwaysValidSchema)(s,e)))&&!s.opts.unevaluated)return;const a=t.let("valid",!1),c=t.name("_valid");t.block((()=>r.forEach(((r,i)=>{const s=e.subschema({keyword:o,schemaProp:i,compositeRule:!0},c);t.assign(a,n._`${a} || ${c}`),e.mergeValidEvaluated(s,c)||t.if((0,n.not)(a))})))),e.result(a,(()=>e.reset()),(()=>e.error(!0)))}},71018:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t.default=r},32101:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(71018),i=r(41939),o=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",n.default,i.default];t.default=o},41939:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;const n=r(91578),i=r(3499),o=r(15669),s=r(17250),a=r(87382),c=r(88936),l={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:i}=e,{baseId:s,schemaEnv:c,validateName:l,opts:p,self:h}=i,{root:f}=c;if(("#"===r||"#/"===r)&&s===f.baseId)return function(){if(c===f)return d(e,l,c,c.$async);const r=t.scopeValue("root",{ref:f});return d(e,o._`${r}.validate`,f,f.$async)}();const g=a.resolveRef.call(h,f,s,r);if(void 0===g)throw new n.default(i.opts.uriResolver,s,r);return g instanceof a.SchemaEnv?function(t){const r=u(e,t);d(e,r,t,t.$async)}(g):function(n){const i=t.scopeValue("schema",!0===p.code.source?{ref:n,code:(0,o.stringify)(n)}:{ref:n}),s=t.name("valid"),a=e.subschema({schema:n,dataTypes:[],schemaPath:o.nil,topSchemaRef:i,errSchemaPath:r},s);e.mergeEvaluated(a),e.ok(s)}(g)}};function u(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):o._`${r.scopeValue("wrapper",{ref:t})}.validate`}function d(e,t,r,n){const{gen:a,it:l}=e,{allErrors:u,schemaEnv:d,opts:p}=l,h=p.passContext?s.default.this:o.nil;function f(e){const t=o._`${e}.errors`;a.assign(s.default.vErrors,o._`${s.default.vErrors} === null ? ${t} : ${s.default.vErrors}.concat(${t})`),a.assign(s.default.errors,o._`${s.default.vErrors}.length`)}function g(e){var t;if(!l.opts.unevaluated)return;const n=null===(t=null==r?void 0:r.validate)||void 0===t?void 0:t.evaluated;if(!0!==l.props)if(n&&!n.dynamicProps)void 0!==n.props&&(l.props=c.mergeEvaluated.props(a,n.props,l.props));else{const t=a.var("props",o._`${e}.evaluated.props`);l.props=c.mergeEvaluated.props(a,t,l.props,o.Name)}if(!0!==l.items)if(n&&!n.dynamicItems)void 0!==n.items&&(l.items=c.mergeEvaluated.items(a,n.items,l.items));else{const t=a.var("items",o._`${e}.evaluated.items`);l.items=c.mergeEvaluated.items(a,t,l.items,o.Name)}}n?function(){if(!d.$async)throw new Error("async schema referenced by sync schema");const r=a.let("valid");a.try((()=>{a.code(o._`await ${(0,i.callValidateCode)(e,t,h)}`),g(t),u||a.assign(r,!0)}),(e=>{a.if(o._`!(${e} instanceof ${l.ValidationError})`,(()=>a.throw(e))),f(e),u||a.assign(r,!1)})),e.ok(r)}():e.result((0,i.callValidateCode)(e,t,h),(()=>g(t)),(()=>f(t)))}t.getValidate=u,t.callRef=d,t.default=l},30002:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(15669),i=r(77421),o=r(87382),s=r(88936),a={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===i.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>n._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},code(e){const{gen:t,data:r,schema:a,parentSchema:c,it:l}=e,{oneOf:u}=c;if(!l.opts.discriminator)throw new Error("discriminator: requires discriminator option");const d=a.propertyName;if("string"!=typeof d)throw new Error("discriminator: requires propertyName");if(a.mapping)throw new Error("discriminator: mapping is not supported");if(!u)throw new Error("discriminator: requires oneOf keyword");const p=t.let("valid",!1),h=t.const("tag",n._`${r}${(0,n.getProperty)(d)}`);function f(r){const i=t.name("valid"),o=e.subschema({keyword:"oneOf",schemaProp:r},i);return e.mergeEvaluated(o,n.Name),i}t.if(n._`typeof ${h} == "string"`,(()=>function(){const r=function(){var e;const t={},r=i(c);let n=!0;for(let t=0;te.error(!1,{discrError:i.DiscrError.Tag,tag:h,tagName:d}))),e.ok(p)}};t.default=a},77421:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,(r=t.DiscrError||(t.DiscrError={})).Tag="tag",r.Mapping="mapping"},35671:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(32101),i=r(37499),o=r(46951),s=r(4480),a=r(32480),c=[n.default,i.default,(0,o.default)(),s.default,a.metadataVocabulary,a.contentVocabulary];t.default=c},73599:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(15669),i={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>n.str`must match format "${e}"`,params:({schemaCode:e})=>n._`{format: ${e}}`},code(e,t){const{gen:r,data:i,$data:o,schema:s,schemaCode:a,it:c}=e,{opts:l,errSchemaPath:u,schemaEnv:d,self:p}=c;l.validateFormats&&(o?function(){const o=r.scopeValue("formats",{ref:p.formats,code:l.code.formats}),s=r.const("fDef",n._`${o}[${a}]`),c=r.let("fType"),u=r.let("format");r.if(n._`typeof ${s} == "object" && !(${s} instanceof RegExp)`,(()=>r.assign(c,n._`${s}.type || "string"`).assign(u,n._`${s}.validate`)),(()=>r.assign(c,n._`"string"`).assign(u,s))),e.fail$data((0,n.or)(!1===l.strictSchema?n.nil:n._`${a} && !${u}`,function(){const e=d.$async?n._`(${s}.async ? await ${u}(${i}) : ${u}(${i}))`:n._`${u}(${i})`,r=n._`(typeof ${u} == "function" ? ${e} : ${u}.test(${i}))`;return n._`${u} && ${u} !== true && ${c} === ${t} && !${r}`}()))}():function(){const o=p.formats[s];if(!o)return void function(){if(!1!==l.strictSchema)throw new Error(e());function e(){return`unknown format "${s}" ignored in schema at path "${u}"`}p.logger.warn(e())}();if(!0===o)return;const[a,c,h]=function(e){const t=e instanceof RegExp?(0,n.regexpCode)(e):l.code.formats?n._`${l.code.formats}${(0,n.getProperty)(s)}`:void 0,i=r.scopeValue("formats",{key:s,ref:e,code:t});return"object"!=typeof e||e instanceof RegExp?["string",e,i]:[e.type||"string",e.validate,n._`${i}.validate`]}(o);a===t&&e.pass(function(){if("object"==typeof o&&!(o instanceof RegExp)&&o.async){if(!d.$async)throw new Error("async format in sync schema");return n._`await ${h}(${i})`}return"function"==typeof c?n._`${h}(${i})`:n._`${h}.test(${i})`}())}())}};t.default=i},4480:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=[r(73599).default];t.default=n},32480:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},36577:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(15669),i=r(88936),o=r(94285),s={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>n._`{allowedValue: ${e}}`},code(e){const{gen:t,data:r,$data:s,schemaCode:a,schema:c}=e;s||c&&"object"==typeof c?e.fail$data(n._`!${(0,i.useFunc)(t,o.default)}(${r}, ${a})`):e.fail(n._`${c} !== ${r}`)}};t.default=s},59450:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(15669),i=r(88936),o=r(94285),s={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>n._`{allowedValues: ${e}}`},code(e){const{gen:t,data:r,$data:s,schema:a,schemaCode:c,it:l}=e;if(!s&&0===a.length)throw new Error("enum must have non-empty array");const u=a.length>=l.opts.loopEnum;let d;const p=()=>null!=d?d:d=(0,i.useFunc)(t,o.default);let h;if(u||s)h=t.let("valid"),e.block$data(h,(function(){t.assign(h,!1),t.forOf("v",c,(e=>t.if(n._`${p()}(${r}, ${e})`,(()=>t.assign(h,!0).break()))))}));else{if(!Array.isArray(a))throw new Error("ajv implementation error");const e=t.const("vSchema",c);h=(0,n.or)(...a.map(((t,i)=>function(e,t){const i=a[t];return"object"==typeof i&&null!==i?n._`${p()}(${r}, ${e}[${t}])`:n._`${r} === ${i}`}(e,i))))}e.pass(h)}};t.default=s},37499:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(31337),i=r(59706),o=r(99507),s=r(51216),a=r(70034),c=r(96962),l=r(61135),u=r(10194),d=r(36577),p=r(59450),h=[n.default,i.default,o.default,s.default,a.default,c.default,l.default,u.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},d.default,p.default];t.default=h},61135:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(15669),i={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxItems"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:i}=e,o="maxItems"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`${r}.length ${o} ${i}`)}};t.default=i},99507:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(15669),i=r(88936),o=r(49161),s={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxLength"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:s,it:a}=e,c="maxLength"===t?n.operators.GT:n.operators.LT,l=!1===a.opts.unicode?n._`${r}.length`:n._`${(0,i.useFunc)(e.gen,o.default)}(${r})`;e.fail$data(n._`${l} ${c} ${s}`)}};t.default=s},31337:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(15669),i=n.operators,o={maximum:{okStr:"<=",ok:i.LTE,fail:i.GT},minimum:{okStr:">=",ok:i.GTE,fail:i.LT},exclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},exclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}},s={message:({keyword:e,schemaCode:t})=>n.str`must be ${o[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>n._`{comparison: ${o[e].okStr}, limit: ${t}}`},a={keyword:Object.keys(o),type:"number",schemaType:"number",$data:!0,error:s,code(e){const{keyword:t,data:r,schemaCode:i}=e;e.fail$data(n._`${r} ${o[t].fail} ${i} || isNaN(${r})`)}};t.default=a},70034:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(15669),i={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxProperties"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:i}=e,o="maxProperties"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`Object.keys(${r}).length ${o} ${i}`)}};t.default=i},59706:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(15669),i={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>n.str`must be multiple of ${e}`,params:({schemaCode:e})=>n._`{multipleOf: ${e}}`},code(e){const{gen:t,data:r,schemaCode:i,it:o}=e,s=o.opts.multipleOfPrecision,a=t.let("res"),c=s?n._`Math.abs(Math.round(${a}) - ${a}) > 1e-${s}`:n._`${a} !== parseInt(${a})`;e.fail$data(n._`(${i} === 0 || (${a} = ${r}/${i}, ${c}))`)}};t.default=i},51216:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3499),i=r(15669),o={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>i.str`must match pattern "${e}"`,params:({schemaCode:e})=>i._`{pattern: ${e}}`},code(e){const{data:t,$data:r,schema:o,schemaCode:s,it:a}=e,c=a.opts.unicodeRegExp?"u":"",l=r?i._`(new RegExp(${s}, ${c}))`:(0,n.usePattern)(e,o);e.fail$data(i._`!${l}.test(${t})`)}};t.default=o},96962:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3499),i=r(15669),o=r(88936),s={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>i.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>i._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:r,schemaCode:s,data:a,$data:c,it:l}=e,{opts:u}=l;if(!c&&0===r.length)return;const d=r.length>=u.loopRequired;if(l.allErrors?function(){if(d||c)e.block$data(i.nil,p);else for(const t of r)(0,n.checkReportMissingProp)(e,t)}():function(){const o=t.let("missing");if(d||c){const r=t.let("valid",!0);e.block$data(r,(()=>function(r,o){e.setParams({missingProperty:r}),t.forOf(r,s,(()=>{t.assign(o,(0,n.propertyInData)(t,a,r,u.ownProperties)),t.if((0,i.not)(o),(()=>{e.error(),t.break()}))}),i.nil)}(o,r))),e.ok(r)}else t.if((0,n.checkMissingProp)(e,r,o)),(0,n.reportMissingProp)(e,o),t.else()}(),u.strictRequired){const t=e.parentSchema.properties,{definedProperties:n}=e.it;for(const e of r)if(void 0===(null==t?void 0:t[e])&&!n.has(e)){const t=`required property "${e}" is not defined at "${l.schemaEnv.baseId+l.errSchemaPath}" (strictRequired)`;(0,o.checkStrictMode)(l,t,l.opts.strictRequired)}}function p(){t.forOf("prop",s,(r=>{e.setParams({missingProperty:r}),t.if((0,n.noPropertyInData)(t,a,r,u.ownProperties),(()=>e.error()))}))}}};t.default=s},10194:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(97332),i=r(15669),o=r(88936),s=r(94285),a={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>i.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>i._`{i: ${e}, j: ${t}}`},code(e){const{gen:t,data:r,$data:a,schema:c,parentSchema:l,schemaCode:u,it:d}=e;if(!a&&!c)return;const p=t.let("valid"),h=l.items?(0,n.getSchemaTypes)(l.items):[];function f(o,s){const a=t.name("item"),c=(0,n.checkDataTypes)(h,a,d.opts.strictNumbers,n.DataType.Wrong),l=t.const("indices",i._`{}`);t.for(i._`;${o}--;`,(()=>{t.let(a,i._`${r}[${o}]`),t.if(c,i._`continue`),h.length>1&&t.if(i._`typeof ${a} == "string"`,i._`${a} += "_"`),t.if(i._`typeof ${l}[${a}] == "number"`,(()=>{t.assign(s,i._`${l}[${a}]`),e.error(),t.assign(p,!1).break()})).code(i._`${l}[${a}] = ${o}`)}))}function g(n,a){const c=(0,o.useFunc)(t,s.default),l=t.name("outer");t.label(l).for(i._`;${n}--;`,(()=>t.for(i._`${a} = ${n}; ${a}--;`,(()=>t.if(i._`${c}(${r}[${n}], ${r}[${a}])`,(()=>{e.error(),t.assign(p,!1).break(l)}))))))}e.block$data(p,(function(){const n=t.let("i",i._`${r}.length`),o=t.let("j");e.setParams({i:n,j:o}),t.assign(p,!0),t.if(i._`${n} > 1`,(()=>(h.length>0&&!h.some((e=>"object"===e||"array"===e))?f:g)(n,o)))}),i._`${u} === false`),e.ok(p)}};t.default=a},3245:(e,t,r)=>{"use strict";var n=r(1767),i=function(){function e(t){if(e.INSTANCE)throw new Error("Console logging adapter tracking should be configured from the applicationInsights object");this._client=t,e.INSTANCE=this}return e.prototype.enable=function(e,t){n.IsInitialized&&(r(72469).wp(e&&t,this._client),r(23805).wp(e,this._client),r(27916).wp(e,this._client))},e.prototype.isInitialized=function(){return this._isInitialized},e.prototype.dispose=function(){e.INSTANCE=null,this.enable(!1,!1)},e._methodNames=["debug","info","log","warn","error"],e}();e.exports=i},6751:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(12010),i=r(1767),o=function(){function e(){}return e.getCurrentContext=function(){if(!e.enabled)return null;var t=e.session.get(e.CONTEXT_NAME);return void 0===t?null:t},e.generateContextObject=function(e,t,r,n,i,o){return t=t||e,this.enabled?{operation:{name:r,id:e,parentId:t,traceparent:i,tracestate:o},customProperties:new s(n)}:null},e.runWithContext=function(t,r){return e.enabled?e.session.bind(r,((n={})[e.CONTEXT_NAME]=t,n))():r();var n},e.wrapEmitter=function(t){e.enabled&&e.session.bindEmitter(t)},e.wrapCallback=function(t){return e.enabled?e.session.bind(t):t},e.enable=function(t){this.enabled||(this.isNodeVersionCompatible()?(e.hasEverEnabled||(this.forceClsHooked=t,this.hasEverEnabled=!0,void 0===this.cls&&(!0===e.forceClsHooked||void 0===e.forceClsHooked&&e.shouldUseClsHooked()?this.cls=r(19172):this.cls=r(92611)),e.session=this.cls.createNamespace("AI-CLS-Session"),i.registerContextPreservation((function(t){return e.session.bind(t)}))),this.enabled=!0):this.enabled=!1)},e.disable=function(){this.enabled=!1},e.reset=function(){e.hasEverEnabled&&(e.session=null,e.session=this.cls.createNamespace("AI-CLS-Session"))},e.isNodeVersionCompatible=function(){var e=process.versions.node.split(".");return parseInt(e[0])>3||parseInt(e[0])>2&&parseInt(e[1])>2},e.shouldUseClsHooked=function(){var e=process.versions.node.split(".");return parseInt(e[0])>8||parseInt(e[0])>=8&&parseInt(e[1])>=2},e.canUseClsHooked=function(){var e=process.versions.node.split("."),t=parseInt(e[0])>8||parseInt(e[0])>=8&&parseInt(e[1])>=0,r=parseInt(e[0])<8||parseInt(e[0])<=8&&parseInt(e[1])<2,n=parseInt(e[0])>4||parseInt(e[0])>=4&&parseInt(e[1])>=7;return!(t&&r)&&n},e.enabled=!1,e.hasEverEnabled=!1,e.forceClsHooked=void 0,e.CONTEXT_NAME="ApplicationInsights-Context",e}();t.CorrelationContextManager=o;var s=function(){function e(e){this.props=[],this.addHeaderData(e)}return e.prototype.addHeaderData=function(e){var t=e?e.split(", "):[];this.props=t.map((function(e){var t=e.split("=");return{key:t[0],value:t[1]}})).concat(this.props)},e.prototype.serializeToHeader=function(){return this.props.map((function(e){return e.key+"="+e.value})).join(", ")},e.prototype.getProperty=function(e){for(var t=0;t0&&process.once("uncaughtException",(function(){e.post.call(l,p,!0),s.delete(h),e.destroy.call(null,p)}))}e.post.call(l,p,!1),u=null,(a||d)&&(d=!1,s.delete(h),e.destroy.call(null,p))},h=c.apply(n,r),s.set(h,p),h},n[i]=function(t){if(u===t&&null!==t)d=!0;else if(s.has(t)){const r=s.get(t);s.delete(t),e.destroy.call(null,r)}l.apply(n,arguments)}}e.exports=function(){p(this._hooks,this._state,"setTimeout","clearTimeout",i,a,!0),p(this._hooks,this._state,"setInterval","clearInterval",o,c,!1),p(this._hooks,this._state,"setImmediate","clearImmediate",s,l,!0),global.setTimeout=n.setTimeout,global.setInterval=n.setInterval,global.setImmediate=n.setImmediate,global.clearTimeout=n.clearTimeout,global.clearInterval=n.clearInterval,global.clearImmediate=n.clearImmediate}},57600:e=>{"use strict";e.exports=(e,t)=>class extends e{constructor(e){var r,n;super((function(e,o){r=this,n=[function(r){return t(i,!1),e(r)},function(e){return t(i,!1),o(e)}]}));var i=this;try{e.apply(r,n)}catch(e){n[1](e)}return i}}},61747:(e,t,r)=>{var n,i,o=r(94403).wrap,s=[],a=0,c=!1,l=[];function u(e,t){var r=e.length,n=t.length,i=[];if(0===r&&0===n)return i;for(var o=0;o0&&(s=l.pop()),d=void 0,r&&!c},i=function(e,t,r){var n=[];c=!0;for(var i=0;i0&&t[i].before(this,n[t[i].uid]);c=!1;var o=e.apply(this,arguments);for(c=!0,i=0;i0&&t[i].after(this,n[t[i].uid]);return c=!1,s=l.pop(),d=void 0,o}},o(process,"_fatalException",(function(e){return function(t){return n(t)||e(t)}}))}else{var h=!1;n=function(e){if(h)throw e;for(var t=!1,r=s.length,n=0;n0&&t[p].before(this,i[t[p].uid]);c=!1;try{o=e.apply(this,arguments)}catch(e){for(a=!0,p=0;p0&&t[p].after(this,i[t[p].uid]);c=!1}s=l.pop()}return o}},process.addListener("uncaughtException",n)}function f(e,t){"function"==typeof e.create&&(this.create=e.create,this.flags|=1),"function"==typeof e.before&&(this.before=e.before,this.flags|=2),"function"==typeof e.after&&(this.after=e.after,this.flags|=4),"function"==typeof e.error&&(this.error=e.error,this.flags|=8),this.uid=++a,this.data=void 0===t?null:t}function g(e,t){if("object"!=typeof e||!e)throw new TypeError("callbacks argument must be an object");return e instanceof f?e:new f(e,t)}f.prototype.create=void 0,f.prototype.before=void 0,f.prototype.after=void 0,f.prototype.error=void 0,f.prototype.data=void 0,f.prototype.uid=0,f.prototype.flags=0,process.createAsyncListener=g,process.addAsyncListener=function(e,t){var r;r=e instanceof f?e:g(e,t);for(var n=!1,i=0;i0)return i(e,r,t);return function(e,t,r){c=!0;for(var n=0;n{"use strict";if(process.addAsyncListener)throw new Error("Don't require polyfill unless needed");var n=r(94403),i=r(3341),o=n.wrap,s=n.massWrap,a=r(61747),c=r(73837),l=i.gte(process.version,"6.0.0"),u=i.gte(process.version,"7.0.0"),d=i.gte(process.version,"8.0.0"),p=i.gte(process.version,"11.0.0"),h=r(41808);function f(e){return function(){this.on("connection",(function(e){e._handle&&(e._handle.onread=a(e._handle.onread))}));try{return e.apply(this,arguments)}finally{this._handle&&this._handle.onconnection&&(this._handle.onconnection=a(this._handle.onconnection))}}}function g(e){if(e&&e._handle){var t=e._handle;t._originalOnread||(t._originalOnread=t.onread),t.onread=a(t._originalOnread)}}u&&!h._normalizeArgs?h._normalizeArgs=function(e){if(0===e.length)return[{},null];var t,r,n=e[0],i={};"object"==typeof n&&null!==n?i=n:"string"==typeof(t=n)&&!1===(r=t,(r=Number(r))>=0&&r)?i.path=n:(i.port=n,e.length>1&&"string"==typeof e[1]&&(i.host=e[1]));var o=e[e.length-1];return"function"!=typeof o?[i,null]:[i,o]}:u||h._normalizeConnectArgs||(h._normalizeConnectArgs=function(e){var t,r={};"object"==typeof e[0]&&null!==e[0]?r=e[0]:"string"==typeof e[0]&&!1===(t=e[0],(t=Number(t))>=0&&t)?r.path=e[0]:(r.port=e[0],"string"==typeof e[1]&&(r.host=e[1]));var n=e[e.length-1];return"function"==typeof n?[r,n]:[r]}),"_setUpListenHandle"in h.Server.prototype?o(h.Server.prototype,"_setUpListenHandle",f):o(h.Server.prototype,"_listen2",f),o(h.Socket.prototype,"connect",(function(e){return function(){var t;(t=d&&Array.isArray(arguments[0])&&Object.getOwnPropertySymbols(arguments[0]).length>0?arguments[0]:u?h._normalizeArgs(arguments):h._normalizeConnectArgs(arguments))[1]&&(t[1]=a(t[1]));var r=e.apply(this,t);return g(this),r}}));var m=r(13685);o(m.Agent.prototype,"addRequest",(function(e){return function(t){var r=t.onSocket;return t.onSocket=a((function(e){return g(e),r.apply(this,arguments)})),e.apply(this,arguments)}}));var y=r(32081);function v(e){Array.isArray(e.stdio)&&e.stdio.forEach((function(e){e&&e._handle&&(e._handle.onread=a(e._handle.onread),o(e._handle,"close",N))})),e._handle&&(e._handle.onexit=a(e._handle.onexit))}y.ChildProcess?o(y.ChildProcess.prototype,"spawn",(function(e){return function(){var t=e.apply(this,arguments);return v(this),t}})):s(y,["execFile","fork","spawn"],(function(e){return function(){var t=e.apply(this,arguments);return v(t),t}})),process._fatalException||(process._originalNextTick=process.nextTick);var _=[];process._nextDomainTick&&_.push("_nextDomainTick"),process._tickDomainCallback&&_.push("_tickDomainCallback"),s(process,_,R),o(process,"nextTick",N);var b=["setTimeout","setInterval"];global.setImmediate&&b.push("setImmediate");var w=r(39512),C=global.setTimeout===w.setTimeout;s(w,b,N),C&&s(global,b,N);var E=r(9523);s(E,["lookup","resolve","resolve4","resolve6","resolveCname","resolveMx","resolveNs","resolveTxt","resolveSrv","reverse"],R),E.resolveNaptr&&o(E,"resolveNaptr",R);var T,S,x=r(57147);s(x,["watch","rename","truncate","chown","fchown","chmod","fchmod","stat","lstat","fstat","link","symlink","readlink","realpath","unlink","rmdir","mkdir","readdir","close","open","utimes","futimes","fsync","write","read","readFile","writeFile","appendFile","watchFile","unwatchFile","exists"],R),x.lchown&&o(x,"lchown",R),x.lchmod&&o(x,"lchmod",R),x.ftruncate&&o(x,"ftruncate",R);try{T=r(59796)}catch(e){}if(T&&T.Deflate&&T.Deflate.prototype){var k=Object.getPrototypeOf(T.Deflate.prototype);k._transform?o(k,"_transform",R):k.write&&k.flush&&k.end&&s(k,["write","flush","end"],R)}try{S=r(6113)}catch(e){}if(S){var I=["pbkdf2","randomBytes"];p||I.push("pseudoRandomBytes"),s(S,I,R)}var A=!!global.Promise&&"function Promise() { [native code] }"===Promise.toString()&&"function toString() { [native code] }"===Promise.toString.toString();if(A){var P=process.addAsyncListener({create:function(){A=!1}});global.Promise.resolve(!0).then((function(){A=!1})),process.removeAsyncListener(P)}function R(e){var t=function(){var t,r=arguments.length-1;if("function"==typeof arguments[r]){t=Array(arguments.length);for(var n=0;n{var r;t=e.exports=K,r="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},t.SEMVER_SPEC_VERSION="2.0.0";var n=Number.MAX_SAFE_INTEGER||9007199254740991,i=t.re=[],o=t.src=[],s=0,a=s++;o[a]="0|[1-9]\\d*";var c=s++;o[c]="[0-9]+";var l=s++;o[l]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var u=s++;o[u]="("+o[a]+")\\.("+o[a]+")\\.("+o[a]+")";var d=s++;o[d]="("+o[c]+")\\.("+o[c]+")\\.("+o[c]+")";var p=s++;o[p]="(?:"+o[a]+"|"+o[l]+")";var h=s++;o[h]="(?:"+o[c]+"|"+o[l]+")";var f=s++;o[f]="(?:-("+o[p]+"(?:\\."+o[p]+")*))";var g=s++;o[g]="(?:-?("+o[h]+"(?:\\."+o[h]+")*))";var m=s++;o[m]="[0-9A-Za-z-]+";var y=s++;o[y]="(?:\\+("+o[m]+"(?:\\."+o[m]+")*))";var v=s++,_="v?"+o[u]+o[f]+"?"+o[y]+"?";o[v]="^"+_+"$";var b="[v=\\s]*"+o[d]+o[g]+"?"+o[y]+"?",w=s++;o[w]="^"+b+"$";var C=s++;o[C]="((?:<|>)?=?)";var E=s++;o[E]=o[c]+"|x|X|\\*";var T=s++;o[T]=o[a]+"|x|X|\\*";var S=s++;o[S]="[v=\\s]*("+o[T]+")(?:\\.("+o[T]+")(?:\\.("+o[T]+")(?:"+o[f]+")?"+o[y]+"?)?)?";var x=s++;o[x]="[v=\\s]*("+o[E]+")(?:\\.("+o[E]+")(?:\\.("+o[E]+")(?:"+o[g]+")?"+o[y]+"?)?)?";var k=s++;o[k]="^"+o[C]+"\\s*"+o[S]+"$";var I=s++;o[I]="^"+o[C]+"\\s*"+o[x]+"$";var A=s++;o[A]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var P=s++;o[P]="(?:~>?)";var R=s++;o[R]="(\\s*)"+o[P]+"\\s+",i[R]=new RegExp(o[R],"g");var N=s++;o[N]="^"+o[P]+o[S]+"$";var O=s++;o[O]="^"+o[P]+o[x]+"$";var L=s++;o[L]="(?:\\^)";var D=s++;o[D]="(\\s*)"+o[L]+"\\s+",i[D]=new RegExp(o[D],"g");var M=s++;o[M]="^"+o[L]+o[S]+"$";var B=s++;o[B]="^"+o[L]+o[x]+"$";var F=s++;o[F]="^"+o[C]+"\\s*("+b+")$|^$";var j=s++;o[j]="^"+o[C]+"\\s*("+_+")$|^$";var U=s++;o[U]="(\\s*)"+o[C]+"\\s*("+b+"|"+o[S]+")",i[U]=new RegExp(o[U],"g");var $=s++;o[$]="^\\s*("+o[S]+")\\s+-\\s+("+o[S]+")\\s*$";var q=s++;o[q]="^\\s*("+o[x]+")\\s+-\\s+("+o[x]+")\\s*$";var H=s++;o[H]="(<|>)?=?\\s*\\*";for(var V=0;V<35;V++)r(V,o[V]),i[V]||(i[V]=new RegExp(o[V]));function z(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof K)return e;if("string"!=typeof e)return null;if(e.length>256)return null;if(!(t.loose?i[w]:i[v]).test(e))return null;try{return new K(e,t)}catch(e){return null}}function K(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof K){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>256)throw new TypeError("version is longer than 256 characters");if(!(this instanceof K))return new K(e,t);r("SemVer",e,t),this.options=t,this.loose=!!t.loose;var o=e.trim().match(t.loose?i[w]:i[v]);if(!o)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);-1===r&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},t.inc=function(e,t,r,n){"string"==typeof r&&(n=r,r=void 0);try{return new K(e,r).inc(t,n).version}catch(e){return null}},t.diff=function(e,t){if(X(e,t))return null;var r=z(e),n=z(t),i="";if(r.prerelease.length||n.prerelease.length){i="pre";var o="prerelease"}for(var s in r)if(("major"===s||"minor"===s||"patch"===s)&&r[s]!==n[s])return i+s;return o},t.compareIdentifiers=G;var W=/^[0-9]+$/;function G(e,t){var r=W.test(e),n=W.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:e0}function Y(e,t,r){return Q(e,t,r)<0}function X(e,t,r){return 0===Q(e,t,r)}function Z(e,t,r){return 0!==Q(e,t,r)}function ee(e,t,r){return Q(e,t,r)>=0}function te(e,t,r){return Q(e,t,r)<=0}function re(e,t,r,n){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return X(e,r,n);case"!=":return Z(e,r,n);case">":return J(e,r,n);case">=":return ee(e,r,n);case"<":return Y(e,r,n);case"<=":return te(e,r,n);default:throw new TypeError("Invalid operator: "+t)}}function ne(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof ne){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof ne))return new ne(e,t);r("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===ie?this.value="":this.value=this.operator+this.semver.version,r("comp",this)}t.rcompareIdentifiers=function(e,t){return G(t,e)},t.major=function(e,t){return new K(e,t).major},t.minor=function(e,t){return new K(e,t).minor},t.patch=function(e,t){return new K(e,t).patch},t.compare=Q,t.compareLoose=function(e,t){return Q(e,t,!0)},t.rcompare=function(e,t,r){return Q(t,e,r)},t.sort=function(e,r){return e.sort((function(e,n){return t.compare(e,n,r)}))},t.rsort=function(e,r){return e.sort((function(e,n){return t.rcompare(e,n,r)}))},t.gt=J,t.lt=Y,t.eq=X,t.neq=Z,t.gte=ee,t.lte=te,t.cmp=re,t.Comparator=ne;var ie={};function oe(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof oe)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new oe(e.raw,t);if(e instanceof ne)return new oe(e.value,t);if(!(this instanceof oe))return new oe(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function se(e){return!e||"x"===e.toLowerCase()||"*"===e}function ae(e,t,r,n,i,o,s,a,c,l,u,d,p){return((t=se(r)?"":se(n)?">="+r+".0.0":se(i)?">="+r+"."+n+".0":">="+t)+" "+(a=se(c)?"":se(l)?"<"+(+c+1)+".0.0":se(u)?"<"+c+"."+(+l+1)+".0":d?"<="+c+"."+l+"."+u+"-"+d:"<="+a)).trim()}function ce(e,t,n){for(var i=0;i0){var o=e[i].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch)return!0}return!1}return!0}function le(e,t,r){try{t=new oe(t,r)}catch(e){return!1}return t.test(e)}function ue(e,t,r,n){var i,o,s,a,c;switch(e=new K(e,n),t=new oe(t,n),r){case">":i=J,o=te,s=Y,a=">",c=">=";break;case"<":i=Y,o=ee,s=J,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(le(e,t,n))return!1;for(var l=0;l=0.0.0")),d=d||e,p=p||e,i(e.semver,d.semver,n)?d=e:s(e.semver,p.semver,n)&&(p=e)})),d.operator===a||d.operator===c)return!1;if((!p.operator||p.operator===a)&&o(e,p.semver))return!1;if(p.operator===c&&s(e,p.semver))return!1}return!0}ne.prototype.parse=function(e){var t=this.options.loose?i[F]:i[j],r=e.match(t);if(!r)throw new TypeError("Invalid comparator: "+e);this.operator=r[1],"="===this.operator&&(this.operator=""),r[2]?this.semver=new K(r[2],this.options.loose):this.semver=ie},ne.prototype.toString=function(){return this.value},ne.prototype.test=function(e){return r("Comparator.test",e,this.options.loose),this.semver===ie||("string"==typeof e&&(e=new K(e,this.options)),re(e,this.operator,this.semver,this.options))},ne.prototype.intersects=function(e,t){if(!(e instanceof ne))throw new TypeError("a Comparator is required");var r;if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return r=new oe(e.value,t),le(this.value,r,t);if(""===e.operator)return r=new oe(this.value,t),le(e.semver,r,t);var n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),o=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=re(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=re(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||i||o&&s||a||c},t.Range=oe,oe.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},oe.prototype.toString=function(){return this.range},oe.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var n=t?i[q]:i[$];e=e.replace(n,ae),r("hyphen replace",e),e=e.replace(i[U],"$1$2$3"),r("comparator trim",e,i[U]),e=(e=(e=e.replace(i[R],"$1~")).replace(i[D],"$1^")).split(/\s+/).join(" ");var o=t?i[F]:i[j],s=e.split(" ").map((function(e){return function(e,t){return r("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){r("caret",e,t);var n=t.loose?i[B]:i[M];return e.replace(n,(function(t,n,i,o,s){var a;return r("caret",e,t,n,i,o,s),se(n)?a="":se(i)?a=">="+n+".0.0 <"+(+n+1)+".0.0":se(o)?a="0"===n?">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0":">="+n+"."+i+".0 <"+(+n+1)+".0.0":s?(r("replaceCaret pr",s),a="0"===n?"0"===i?">="+n+"."+i+"."+o+"-"+s+" <"+n+"."+i+"."+(+o+1):">="+n+"."+i+"."+o+"-"+s+" <"+n+"."+(+i+1)+".0":">="+n+"."+i+"."+o+"-"+s+" <"+(+n+1)+".0.0"):(r("no pr"),a="0"===n?"0"===i?">="+n+"."+i+"."+o+" <"+n+"."+i+"."+(+o+1):">="+n+"."+i+"."+o+" <"+n+"."+(+i+1)+".0":">="+n+"."+i+"."+o+" <"+(+n+1)+".0.0"),r("caret return",a),a}))}(e,t)})).join(" ")}(e,t),r("caret",e),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){var n=t.loose?i[O]:i[N];return e.replace(n,(function(t,n,i,o,s){var a;return r("tilde",e,t,n,i,o,s),se(n)?a="":se(i)?a=">="+n+".0.0 <"+(+n+1)+".0.0":se(o)?a=">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0":s?(r("replaceTilde pr",s),a=">="+n+"."+i+"."+o+"-"+s+" <"+n+"."+(+i+1)+".0"):a=">="+n+"."+i+"."+o+" <"+n+"."+(+i+1)+".0",r("tilde return",a),a}))}(e,t)})).join(" ")}(e,t),r("tildes",e),e=function(e,t){return r("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return function(e,t){e=e.trim();var n=t.loose?i[I]:i[k];return e.replace(n,(function(t,n,i,o,s,a){r("xRange",e,t,n,i,o,s,a);var c=se(i),l=c||se(o),u=l||se(s);return"="===n&&u&&(n=""),c?t=">"===n||"<"===n?"<0.0.0":"*":n&&u?(l&&(o=0),s=0,">"===n?(n=">=",l?(i=+i+1,o=0,s=0):(o=+o+1,s=0)):"<="===n&&(n="<",l?i=+i+1:o=+o+1),t=n+i+"."+o+"."+s):l?t=">="+i+".0.0 <"+(+i+1)+".0.0":u&&(t=">="+i+"."+o+".0 <"+i+"."+(+o+1)+".0"),r("xRange return",t),t}))}(e,t)})).join(" ")}(e,t),r("xrange",e),e=function(e,t){return r("replaceStars",e,t),e.trim().replace(i[H],"")}(e,t),r("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(s=s.filter((function(e){return!!e.match(o)}))),s.map((function(e){return new ne(e,this.options)}),this)},oe.prototype.intersects=function(e,t){if(!(e instanceof oe))throw new TypeError("a Range is required");return this.set.some((function(r){return r.every((function(r){return e.set.some((function(e){return e.every((function(e){return r.intersects(e,t)}))}))}))}))},t.toComparators=function(e,t){return new oe(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},oe.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new K(e,this.options));for(var t=0;t":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":r&&!J(r,t)||(r=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}));return r&&e.test(r)?r:null},t.validRange=function(e,t){try{return new oe(e,t).range||"*"}catch(e){return null}},t.ltr=function(e,t,r){return ue(e,t,"<",r)},t.gtr=function(e,t,r){return ue(e,t,">",r)},t.outside=ue,t.prerelease=function(e,t){var r=z(e,t);return r&&r.prerelease.length?r.prerelease:null},t.intersects=function(e,t,r){return e=new oe(e,r),t=new oe(t,r),e.intersects(t)},t.coerce=function(e){if(e instanceof K)return e;if("string"!=typeof e)return null;var t=e.match(i[A]);return null==t?null:z(t[1]+"."+(t[2]||"0")+"."+(t[3]||"0"))}},42172:(e,t,r)=>{"use strict";const n=r(73837),i=r(39491),o=r(7267),s=r(20632),a="cls@contexts",c="error@context",l=[];for(let e in s.providers)l[s.providers[e]]=e;const u=process.env.DEBUG_CLS_HOOKED;let d=-1;function p(e){this.name=e,this.active=null,this._set=[],this.id=null,this._contexts=new Map}function h(e){return process.namespaces[e]}function f(e){let t=h(e);i.ok(t,"can't delete nonexistent namespace! \""+e+'"'),i.ok(t.id,"don't assign to process.namespaces directly! "+n.inspect(t)),process.namespaces[e]=null}function g(e){process.env.DEBUG&&process._rawDebug(e)}function m(e){return e?"function"==typeof e?e.name?e.name:(e.toString().trim().match(/^function\s*([^\s(]+)/)||[])[1]:e.constructor&&e.constructor.name?e.constructor.name:void 0:e}if(e.exports={getNamespace:h,createNamespace:function(e){i.ok(e,"namespace must be given a name."),u&&g("CREATING NAMESPACE "+e);let t=new p(e);return t.id=d,s.addHooks({init(r,i,o,s,a){d=r,s?(t._contexts.set(r,t._contexts.get(s)),u&&g("PARENTID: "+e+" uid:"+r+" parent:"+s+" provider:"+o)):t._contexts.set(d,t.active),u&&g("INIT "+e+" uid:"+r+" parent:"+s+" provider:"+l[o]+" active:"+n.inspect(t.active,!0))},pre(r,i){d=r;let o=t._contexts.get(r);o?(u&&g(" PRE "+e+" uid:"+r+" handle:"+m(i)+" context:"+n.inspect(o)),t.enter(o)):u&&g(" PRE MISSING CONTEXT "+e+" uid:"+r+" handle:"+m(i))},post(r,i){d=r;let o=t._contexts.get(r);o?(u&&g(" POST "+e+" uid:"+r+" handle:"+m(i)+" context:"+n.inspect(o)),t.exit(o)):u&&g(" POST MISSING CONTEXT "+e+" uid:"+r+" handle:"+m(i))},destroy(r){d=r,u&&g("DESTROY "+e+" uid:"+r+" context:"+n.inspect(t._contexts.get(d))+" active:"+n.inspect(t.active,!0)),t._contexts.delete(r)}}),process.namespaces[e]=t,t},destroyNamespace:f,reset:function(){process.namespaces&&Object.keys(process.namespaces).forEach((function(e){f(e)})),process.namespaces=Object.create(null)},ERROR_SYMBOL:c},p.prototype.set=function(e,t){if(!this.active)throw new Error("No context available. ns.run() or ns.bind() must be called first.");return u&&g(" SETTING KEY:"+e+"="+t+" in ns:"+this.name+" uid:"+d+" active:"+n.inspect(this.active,!0)),this.active[e]=t,t},p.prototype.get=function(e){if(this.active)return u&&g(" GETTING KEY:"+e+"="+this.active[e]+" "+this.name+" uid:"+d+" active:"+n.inspect(this.active,!0)),this.active[e];u&&g(" GETTING KEY:"+e+"=undefined "+this.name+" uid:"+d+" active:"+n.inspect(this.active,!0))},p.prototype.createContext=function(){u&&g(" CREATING Context: "+this.name+" uid:"+d+" len:"+this._set.length+" active:"+n.inspect(this.active,!0,2,!0));let e=Object.create(this.active?this.active:Object.prototype);return e._ns_name=this.name,e.id=d,u&&g(" CREATED Context: "+this.name+" uid:"+d+" len:"+this._set.length+" context:"+n.inspect(e,!0,2,!0)),e},p.prototype.run=function(e){let t=this.createContext();this.enter(t);try{return u&&g(" BEFORE RUN: "+this.name+" uid:"+d+" len:"+this._set.length+" "+n.inspect(t)),e(t),t}catch(e){throw e&&(e[c]=t),e}finally{u&&g(" AFTER RUN: "+this.name+" uid:"+d+" len:"+this._set.length+" "+n.inspect(t)),this.exit(t)}},p.prototype.runAndReturn=function(e){var t;return this.run((function(r){t=e(r)})),t},p.prototype.runPromise=function(e){let t=this.createContext();this.enter(t);let r=e(t);if(!r||!r.then||!r.catch)throw new Error("fn must return a promise.");return u&&g(" BEFORE runPromise: "+this.name+" uid:"+d+" len:"+this._set.length+" "+n.inspect(t)),r.then((e=>(u&&g(" AFTER runPromise: "+this.name+" uid:"+d+" len:"+this._set.length+" "+n.inspect(t)),this.exit(t),e))).catch((e=>{throw e[c]=t,u&&g(" AFTER runPromise: "+this.name+" uid:"+d+" len:"+this._set.length+" "+n.inspect(t)),this.exit(t),e}))},p.prototype.bind=function(e,t){t||(t=this.active?this.active:this.createContext());let r=this;return function(){r.enter(t);try{return e.apply(this,arguments)}catch(e){throw e&&(e[c]=t),e}finally{r.exit(t)}}},p.prototype.enter=function(e){i.ok(e,"context must be provided for entering"),u&&g(" ENTER "+this.name+" uid:"+d+" len:"+this._set.length+" context: "+n.inspect(e)),this._set.push(this.active),this.active=e},p.prototype.exit=function(e){if(i.ok(e,"context must be provided for exiting"),u&&g(" EXIT "+this.name+" uid:"+d+" len:"+this._set.length+" context: "+n.inspect(e)),this.active===e)return i.ok(this._set.length,"can't remove top context"),void(this.active=this._set.pop());let t=this._set.lastIndexOf(e);t<0?(u&&g("??ERROR?? context exiting but not entered - ignoring: "+n.inspect(e)),i.ok(t>=0,"context not currently entered; can't exit. \n"+n.inspect(this)+"\n"+n.inspect(e))):(i.ok(t,"can't remove top context"),this._set.splice(t,1))},p.prototype.bindEmitter=function(e){i.ok(e.on&&e.addListener&&e.emit,"can only bind real EEs");let t=this,r="context@"+this.name;o(e,(function(e){e&&(e[a]||(e[a]=Object.create(null)),e[a][r]={namespace:t,context:t.active})}),(function(e){if(!e||!e[a])return e;let t=e,r=e[a];return Object.keys(r).forEach((function(e){let n=r[e];t=n.namespace.bind(t,n.context)})),t}))},p.prototype.fromException=function(e){return e[c]},process.namespaces={},s._state&&!s._state.enabled&&s.enable(),u){var y=r(26818);for(var v in y.filter._modifiers)y.filter.deattach(v)}},68423:(e,t,r)=>{"use strict";const n=r(73837),i=r(39491),o=r(7267),s=r(50852),a="cls@contexts",c="error@context",l=process.env.DEBUG_CLS_HOOKED;let u=-1;function d(e){this.name=e,this.active=null,this._set=[],this.id=null,this._contexts=new Map,this._indent=0}function p(e){return process.namespaces[e]}function h(e){let t=p(e);i.ok(t,"can't delete nonexistent namespace! \""+e+'"'),i.ok(t.id,"don't assign to process.namespaces directly! "+n.inspect(t)),process.namespaces[e]=null}function f(...e){l&&process._rawDebug(`${n.format(...e)}`)}e.exports={getNamespace:p,createNamespace:function(e){i.ok(e,"namespace must be given a name."),l&&f(`NS-CREATING NAMESPACE (${e})`);let t=new d(e);return t.id=u,s.createHook({init(r,i,o,a){if(u=s.executionAsyncId(),t.active){if(t._contexts.set(r,t.active),l){f(`${" ".repeat(t._indent<0?0:t._indent)}INIT [${i}] (${e}) asyncId:${r} currentUid:${u} triggerId:${o} active:${n.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} resource:${a}`)}}else if(0===u){const o=s.triggerAsyncId(),c=t._contexts.get(o);if(c){if(t._contexts.set(r,c),l){f(`${" ".repeat(t._indent<0?0:t._indent)}INIT USING CONTEXT FROM TRIGGERID [${i}] (${e}) asyncId:${r} currentUid:${u} triggerId:${o} active:${n.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} resource:${a}`)}}else if(l){f(`${" ".repeat(t._indent<0?0:t._indent)}INIT MISSING CONTEXT [${i}] (${e}) asyncId:${r} currentUid:${u} triggerId:${o} active:${n.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} resource:${a}`)}}if(l&&"PROMISE"===i){f(n.inspect(a,{showHidden:!0}));const s=a.parentId;f(`${" ".repeat(t._indent<0?0:t._indent)}INIT RESOURCE-PROMISE [${i}] (${e}) parentId:${s} asyncId:${r} currentUid:${u} triggerId:${o} active:${n.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} resource:${a}`)}},before(r){let i;if(u=s.executionAsyncId(),i=t._contexts.get(r)||t._contexts.get(u),i){if(l){const o=s.triggerAsyncId();f(`${" ".repeat(t._indent<0?0:t._indent)}BEFORE (${e}) asyncId:${r} currentUid:${u} triggerId:${o} active:${n.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} context:${n.inspect(i)}`),t._indent+=2}t.enter(i)}else if(l){const i=s.triggerAsyncId();f(`${" ".repeat(t._indent<0?0:t._indent)}BEFORE MISSING CONTEXT (${e}) asyncId:${r} currentUid:${u} triggerId:${i} active:${n.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} namespace._contexts:${n.inspect(t._contexts,{showHidden:!0,depth:2,colors:!0})}`),t._indent+=2}},after(r){let i;if(u=s.executionAsyncId(),i=t._contexts.get(r)||t._contexts.get(u),i){if(l){const o=s.triggerAsyncId();t._indent-=2;f(`${" ".repeat(t._indent<0?0:t._indent)}AFTER (${e}) asyncId:${r} currentUid:${u} triggerId:${o} active:${n.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} context:${n.inspect(i)}`)}t.exit(i)}else if(l){const o=s.triggerAsyncId();t._indent-=2;f(`${" ".repeat(t._indent<0?0:t._indent)}AFTER MISSING CONTEXT (${e}) asyncId:${r} currentUid:${u} triggerId:${o} active:${n.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} context:${n.inspect(i)}`)}},destroy(r){if(u=s.executionAsyncId(),l){const i=s.triggerAsyncId();f(`${" ".repeat(t._indent<0?0:t._indent)}DESTROY (${e}) currentUid:${u} asyncId:${r} triggerId:${i} active:${n.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} context:${n.inspect(t._contexts.get(u))}`)}t._contexts.delete(r)}}).enable(),process.namespaces[e]=t,t},destroyNamespace:h,reset:function(){process.namespaces&&Object.keys(process.namespaces).forEach((function(e){h(e)})),process.namespaces=Object.create(null)},ERROR_SYMBOL:c},d.prototype.set=function(e,t){if(!this.active)throw new Error("No context available. ns.run() or ns.bind() must be called first.");return this.active[e]=t,l&&f(" ".repeat(this._indent<0?0:this._indent)+"CONTEXT-SET KEY:"+e+"="+t+" in ns:"+this.name+" currentUid:"+u+" active:"+n.inspect(this.active,{showHidden:!0,depth:2,colors:!0})),t},d.prototype.get=function(e){if(this.active){if(l){const t=s.executionAsyncId(),r=s.triggerAsyncId(),i=" ".repeat(this._indent<0?0:this._indent);f(i+"CONTEXT-GETTING KEY:"+e+"="+this.active[e]+" ("+this.name+") currentUid:"+u+" active:"+n.inspect(this.active,{showHidden:!0,depth:2,colors:!0})),f(`${i}CONTEXT-GETTING KEY: (${this.name}) ${e}=${this.active[e]} currentUid:${u} asyncHooksCurrentId:${t} triggerId:${r} len:${this._set.length} active:${n.inspect(this.active)}`)}return this.active[e]}if(l){const t=s.currentId(),r=s.triggerAsyncId();f(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-GETTING KEY NO ACTIVE NS: (${this.name}) ${e}=undefined currentUid:${u} asyncHooksCurrentId:${t} triggerId:${r} len:${this._set.length}`)}},d.prototype.createContext=function(){let e=Object.create(this.active?this.active:Object.prototype);if(e._ns_name=this.name,e.id=u,l){const t=s.executionAsyncId(),r=s.triggerAsyncId();f(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-CREATED Context: (${this.name}) currentUid:${u} asyncHooksCurrentId:${t} triggerId:${r} len:${this._set.length} context:${n.inspect(e,{showHidden:!0,depth:2,colors:!0})}`)}return e},d.prototype.run=function(e){let t=this.createContext();this.enter(t);try{if(l){const e=s.triggerAsyncId(),r=s.executionAsyncId();f(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-RUN BEGIN: (${this.name}) currentUid:${u} triggerId:${e} asyncHooksCurrentId:${r} len:${this._set.length} context:${n.inspect(t)}`)}return e(t),t}catch(e){throw e&&(e[c]=t),e}finally{if(l){const e=s.triggerAsyncId(),r=s.executionAsyncId();f(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-RUN END: (${this.name}) currentUid:${u} triggerId:${e} asyncHooksCurrentId:${r} len:${this._set.length} ${n.inspect(t)}`)}this.exit(t)}},d.prototype.runAndReturn=function(e){let t;return this.run((function(r){t=e(r)})),t},d.prototype.runPromise=function(e){let t=this.createContext();this.enter(t);let r=e(t);if(!r||!r.then||!r.catch)throw new Error("fn must return a promise.");return l&&f("CONTEXT-runPromise BEFORE: ("+this.name+") currentUid:"+u+" len:"+this._set.length+" "+n.inspect(t)),r.then((e=>(l&&f("CONTEXT-runPromise AFTER then: ("+this.name+") currentUid:"+u+" len:"+this._set.length+" "+n.inspect(t)),this.exit(t),e))).catch((e=>{throw e[c]=t,l&&f("CONTEXT-runPromise AFTER catch: ("+this.name+") currentUid:"+u+" len:"+this._set.length+" "+n.inspect(t)),this.exit(t),e}))},d.prototype.bind=function(e,t){t||(t=this.active?this.active:this.createContext());let r=this;return function(){r.enter(t);try{return e.apply(this,arguments)}catch(e){throw e&&(e[c]=t),e}finally{r.exit(t)}}},d.prototype.enter=function(e){if(i.ok(e,"context must be provided for entering"),l){const t=s.executionAsyncId(),r=s.triggerAsyncId();f(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-ENTER: (${this.name}) currentUid:${u} triggerId:${r} asyncHooksCurrentId:${t} len:${this._set.length} ${n.inspect(e)}`)}this._set.push(this.active),this.active=e},d.prototype.exit=function(e){if(i.ok(e,"context must be provided for exiting"),l){const t=s.executionAsyncId(),r=s.triggerAsyncId();f(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-EXIT: (${this.name}) currentUid:${u} triggerId:${r} asyncHooksCurrentId:${t} len:${this._set.length} ${n.inspect(e)}`)}if(this.active===e)return i.ok(this._set.length,"can't remove top context"),void(this.active=this._set.pop());let t=this._set.lastIndexOf(e);t<0?(l&&f("??ERROR?? context exiting but not entered - ignoring: "+n.inspect(e)),i.ok(t>=0,"context not currently entered; can't exit. \n"+n.inspect(this)+"\n"+n.inspect(e))):(i.ok(t,"can't remove top context"),this._set.splice(t,1))},d.prototype.bindEmitter=function(e){i.ok(e.on&&e.addListener&&e.emit,"can only bind real EEs");let t=this,r="context@"+this.name;o(e,(function(e){e&&(e[a]||(e[a]=Object.create(null)),e[a][r]={namespace:t,context:t.active})}),(function(e){if(!e||!e[a])return e;let t=e,r=e[a];return Object.keys(r).forEach((function(e){let n=r[e];t=n.namespace.bind(t,n.context)})),t}))},d.prototype.fromException=function(e){return e[c]},process.namespaces={}},19172:(e,t,r)=>{"use strict";const n=r(22173);process&&n.gte(process.versions.node,"8.0.0")?e.exports=r(68423):e.exports=r(42172)},22173:(e,t)=>{var r;t=e.exports=K,r="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},t.SEMVER_SPEC_VERSION="2.0.0";var n=Number.MAX_SAFE_INTEGER||9007199254740991,i=t.re=[],o=t.src=[],s=0,a=s++;o[a]="0|[1-9]\\d*";var c=s++;o[c]="[0-9]+";var l=s++;o[l]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var u=s++;o[u]="("+o[a]+")\\.("+o[a]+")\\.("+o[a]+")";var d=s++;o[d]="("+o[c]+")\\.("+o[c]+")\\.("+o[c]+")";var p=s++;o[p]="(?:"+o[a]+"|"+o[l]+")";var h=s++;o[h]="(?:"+o[c]+"|"+o[l]+")";var f=s++;o[f]="(?:-("+o[p]+"(?:\\."+o[p]+")*))";var g=s++;o[g]="(?:-?("+o[h]+"(?:\\."+o[h]+")*))";var m=s++;o[m]="[0-9A-Za-z-]+";var y=s++;o[y]="(?:\\+("+o[m]+"(?:\\."+o[m]+")*))";var v=s++,_="v?"+o[u]+o[f]+"?"+o[y]+"?";o[v]="^"+_+"$";var b="[v=\\s]*"+o[d]+o[g]+"?"+o[y]+"?",w=s++;o[w]="^"+b+"$";var C=s++;o[C]="((?:<|>)?=?)";var E=s++;o[E]=o[c]+"|x|X|\\*";var T=s++;o[T]=o[a]+"|x|X|\\*";var S=s++;o[S]="[v=\\s]*("+o[T]+")(?:\\.("+o[T]+")(?:\\.("+o[T]+")(?:"+o[f]+")?"+o[y]+"?)?)?";var x=s++;o[x]="[v=\\s]*("+o[E]+")(?:\\.("+o[E]+")(?:\\.("+o[E]+")(?:"+o[g]+")?"+o[y]+"?)?)?";var k=s++;o[k]="^"+o[C]+"\\s*"+o[S]+"$";var I=s++;o[I]="^"+o[C]+"\\s*"+o[x]+"$";var A=s++;o[A]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var P=s++;o[P]="(?:~>?)";var R=s++;o[R]="(\\s*)"+o[P]+"\\s+",i[R]=new RegExp(o[R],"g");var N=s++;o[N]="^"+o[P]+o[S]+"$";var O=s++;o[O]="^"+o[P]+o[x]+"$";var L=s++;o[L]="(?:\\^)";var D=s++;o[D]="(\\s*)"+o[L]+"\\s+",i[D]=new RegExp(o[D],"g");var M=s++;o[M]="^"+o[L]+o[S]+"$";var B=s++;o[B]="^"+o[L]+o[x]+"$";var F=s++;o[F]="^"+o[C]+"\\s*("+b+")$|^$";var j=s++;o[j]="^"+o[C]+"\\s*("+_+")$|^$";var U=s++;o[U]="(\\s*)"+o[C]+"\\s*("+b+"|"+o[S]+")",i[U]=new RegExp(o[U],"g");var $=s++;o[$]="^\\s*("+o[S]+")\\s+-\\s+("+o[S]+")\\s*$";var q=s++;o[q]="^\\s*("+o[x]+")\\s+-\\s+("+o[x]+")\\s*$";var H=s++;o[H]="(<|>)?=?\\s*\\*";for(var V=0;V<35;V++)r(V,o[V]),i[V]||(i[V]=new RegExp(o[V]));function z(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof K)return e;if("string"!=typeof e)return null;if(e.length>256)return null;if(!(t.loose?i[w]:i[v]).test(e))return null;try{return new K(e,t)}catch(e){return null}}function K(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof K){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>256)throw new TypeError("version is longer than 256 characters");if(!(this instanceof K))return new K(e,t);r("SemVer",e,t),this.options=t,this.loose=!!t.loose;var o=e.trim().match(t.loose?i[w]:i[v]);if(!o)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);-1===r&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},t.inc=function(e,t,r,n){"string"==typeof r&&(n=r,r=void 0);try{return new K(e,r).inc(t,n).version}catch(e){return null}},t.diff=function(e,t){if(X(e,t))return null;var r=z(e),n=z(t),i="";if(r.prerelease.length||n.prerelease.length){i="pre";var o="prerelease"}for(var s in r)if(("major"===s||"minor"===s||"patch"===s)&&r[s]!==n[s])return i+s;return o},t.compareIdentifiers=G;var W=/^[0-9]+$/;function G(e,t){var r=W.test(e),n=W.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:e0}function Y(e,t,r){return Q(e,t,r)<0}function X(e,t,r){return 0===Q(e,t,r)}function Z(e,t,r){return 0!==Q(e,t,r)}function ee(e,t,r){return Q(e,t,r)>=0}function te(e,t,r){return Q(e,t,r)<=0}function re(e,t,r,n){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return X(e,r,n);case"!=":return Z(e,r,n);case">":return J(e,r,n);case">=":return ee(e,r,n);case"<":return Y(e,r,n);case"<=":return te(e,r,n);default:throw new TypeError("Invalid operator: "+t)}}function ne(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof ne){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof ne))return new ne(e,t);r("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===ie?this.value="":this.value=this.operator+this.semver.version,r("comp",this)}t.rcompareIdentifiers=function(e,t){return G(t,e)},t.major=function(e,t){return new K(e,t).major},t.minor=function(e,t){return new K(e,t).minor},t.patch=function(e,t){return new K(e,t).patch},t.compare=Q,t.compareLoose=function(e,t){return Q(e,t,!0)},t.rcompare=function(e,t,r){return Q(t,e,r)},t.sort=function(e,r){return e.sort((function(e,n){return t.compare(e,n,r)}))},t.rsort=function(e,r){return e.sort((function(e,n){return t.rcompare(e,n,r)}))},t.gt=J,t.lt=Y,t.eq=X,t.neq=Z,t.gte=ee,t.lte=te,t.cmp=re,t.Comparator=ne;var ie={};function oe(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof oe)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new oe(e.raw,t);if(e instanceof ne)return new oe(e.value,t);if(!(this instanceof oe))return new oe(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function se(e){return!e||"x"===e.toLowerCase()||"*"===e}function ae(e,t,r,n,i,o,s,a,c,l,u,d,p){return((t=se(r)?"":se(n)?">="+r+".0.0":se(i)?">="+r+"."+n+".0":">="+t)+" "+(a=se(c)?"":se(l)?"<"+(+c+1)+".0.0":se(u)?"<"+c+"."+(+l+1)+".0":d?"<="+c+"."+l+"."+u+"-"+d:"<="+a)).trim()}function ce(e,t,n){for(var i=0;i0){var o=e[i].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch)return!0}return!1}return!0}function le(e,t,r){try{t=new oe(t,r)}catch(e){return!1}return t.test(e)}function ue(e,t,r,n){var i,o,s,a,c;switch(e=new K(e,n),t=new oe(t,n),r){case">":i=J,o=te,s=Y,a=">",c=">=";break;case"<":i=Y,o=ee,s=J,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(le(e,t,n))return!1;for(var l=0;l=0.0.0")),d=d||e,p=p||e,i(e.semver,d.semver,n)?d=e:s(e.semver,p.semver,n)&&(p=e)})),d.operator===a||d.operator===c)return!1;if((!p.operator||p.operator===a)&&o(e,p.semver))return!1;if(p.operator===c&&s(e,p.semver))return!1}return!0}ne.prototype.parse=function(e){var t=this.options.loose?i[F]:i[j],r=e.match(t);if(!r)throw new TypeError("Invalid comparator: "+e);this.operator=r[1],"="===this.operator&&(this.operator=""),r[2]?this.semver=new K(r[2],this.options.loose):this.semver=ie},ne.prototype.toString=function(){return this.value},ne.prototype.test=function(e){return r("Comparator.test",e,this.options.loose),this.semver===ie||("string"==typeof e&&(e=new K(e,this.options)),re(e,this.operator,this.semver,this.options))},ne.prototype.intersects=function(e,t){if(!(e instanceof ne))throw new TypeError("a Comparator is required");var r;if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return r=new oe(e.value,t),le(this.value,r,t);if(""===e.operator)return r=new oe(this.value,t),le(e.semver,r,t);var n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),o=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=re(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=re(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||i||o&&s||a||c},t.Range=oe,oe.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},oe.prototype.toString=function(){return this.range},oe.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var n=t?i[q]:i[$];e=e.replace(n,ae),r("hyphen replace",e),e=e.replace(i[U],"$1$2$3"),r("comparator trim",e,i[U]),e=(e=(e=e.replace(i[R],"$1~")).replace(i[D],"$1^")).split(/\s+/).join(" ");var o=t?i[F]:i[j],s=e.split(" ").map((function(e){return function(e,t){return r("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){r("caret",e,t);var n=t.loose?i[B]:i[M];return e.replace(n,(function(t,n,i,o,s){var a;return r("caret",e,t,n,i,o,s),se(n)?a="":se(i)?a=">="+n+".0.0 <"+(+n+1)+".0.0":se(o)?a="0"===n?">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0":">="+n+"."+i+".0 <"+(+n+1)+".0.0":s?(r("replaceCaret pr",s),a="0"===n?"0"===i?">="+n+"."+i+"."+o+"-"+s+" <"+n+"."+i+"."+(+o+1):">="+n+"."+i+"."+o+"-"+s+" <"+n+"."+(+i+1)+".0":">="+n+"."+i+"."+o+"-"+s+" <"+(+n+1)+".0.0"):(r("no pr"),a="0"===n?"0"===i?">="+n+"."+i+"."+o+" <"+n+"."+i+"."+(+o+1):">="+n+"."+i+"."+o+" <"+n+"."+(+i+1)+".0":">="+n+"."+i+"."+o+" <"+(+n+1)+".0.0"),r("caret return",a),a}))}(e,t)})).join(" ")}(e,t),r("caret",e),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){var n=t.loose?i[O]:i[N];return e.replace(n,(function(t,n,i,o,s){var a;return r("tilde",e,t,n,i,o,s),se(n)?a="":se(i)?a=">="+n+".0.0 <"+(+n+1)+".0.0":se(o)?a=">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0":s?(r("replaceTilde pr",s),a=">="+n+"."+i+"."+o+"-"+s+" <"+n+"."+(+i+1)+".0"):a=">="+n+"."+i+"."+o+" <"+n+"."+(+i+1)+".0",r("tilde return",a),a}))}(e,t)})).join(" ")}(e,t),r("tildes",e),e=function(e,t){return r("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return function(e,t){e=e.trim();var n=t.loose?i[I]:i[k];return e.replace(n,(function(t,n,i,o,s,a){r("xRange",e,t,n,i,o,s,a);var c=se(i),l=c||se(o),u=l||se(s);return"="===n&&u&&(n=""),c?t=">"===n||"<"===n?"<0.0.0":"*":n&&u?(l&&(o=0),s=0,">"===n?(n=">=",l?(i=+i+1,o=0,s=0):(o=+o+1,s=0)):"<="===n&&(n="<",l?i=+i+1:o=+o+1),t=n+i+"."+o+"."+s):l?t=">="+i+".0.0 <"+(+i+1)+".0.0":u&&(t=">="+i+"."+o+".0 <"+i+"."+(+o+1)+".0"),r("xRange return",t),t}))}(e,t)})).join(" ")}(e,t),r("xrange",e),e=function(e,t){return r("replaceStars",e,t),e.trim().replace(i[H],"")}(e,t),r("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(s=s.filter((function(e){return!!e.match(o)}))),s.map((function(e){return new ne(e,this.options)}),this)},oe.prototype.intersects=function(e,t){if(!(e instanceof oe))throw new TypeError("a Range is required");return this.set.some((function(r){return r.every((function(r){return e.set.some((function(e){return e.every((function(e){return r.intersects(e,t)}))}))}))}))},t.toComparators=function(e,t){return new oe(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},oe.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new K(e,this.options));for(var t=0;t":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":r&&!J(r,t)||(r=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}));return r&&e.test(r)?r:null},t.validRange=function(e,t){try{return new oe(e,t).range||"*"}catch(e){return null}},t.ltr=function(e,t,r){return ue(e,t,"<",r)},t.gtr=function(e,t,r){return ue(e,t,">",r)},t.outside=ue,t.prerelease=function(e,t){var r=z(e,t);return r&&r.prerelease.length?r.prerelease:null},t.intersects=function(e,t,r){return e=new oe(e,r),t=new oe(t,r),e.intersects(t)},t.coerce=function(e){if(e instanceof K)return e;if("string"!=typeof e)return null;var t=e.match(i[A]);return null==t?null:z(t[1]+"."+(t[2]||"0")+"."+(t[3]||"0"))}},92611:(e,t,r)=>{"use strict";var n=r(39491),i=r(7267),o="cls@contexts",s="error@context";function a(e){this.name=e,this.active=null,this._set=[],this.id=null}function c(e){return process.namespaces[e]}function l(e){var t=c(e);n.ok(t,"can't delete nonexistent namespace!"),n.ok(t.id,"don't assign to process.namespaces directly!"),process.removeAsyncListener(t.id),process.namespaces[e]=null}function u(){process.namespaces&&Object.keys(process.namespaces).forEach((function(e){l(e)})),process.namespaces=Object.create(null)}process.addAsyncListener||r(71274),a.prototype.set=function(e,t){if(!this.active)throw new Error("No context available. ns.run() or ns.bind() must be called first.");return this.active[e]=t,t},a.prototype.get=function(e){if(this.active)return this.active[e]},a.prototype.createContext=function(){return Object.create(this.active)},a.prototype.run=function(e){var t=this.createContext();this.enter(t);try{return e(t),t}catch(e){throw e&&(e[s]=t),e}finally{this.exit(t)}},a.prototype.runAndReturn=function(e){var t;return this.run((function(r){t=e(r)})),t},a.prototype.bind=function(e,t){t||(t=this.active?this.active:this.createContext());var r=this;return function(){r.enter(t);try{return e.apply(this,arguments)}catch(e){throw e&&(e[s]=t),e}finally{r.exit(t)}}},a.prototype.enter=function(e){n.ok(e,"context must be provided for entering"),this._set.push(this.active),this.active=e},a.prototype.exit=function(e){if(n.ok(e,"context must be provided for exiting"),this.active===e)return n.ok(this._set.length,"can't remove top context"),void(this.active=this._set.pop());var t=this._set.lastIndexOf(e);n.ok(t>=0,"context not currently entered; can't exit"),n.ok(t,"can't remove top context"),this._set.splice(t,1)},a.prototype.bindEmitter=function(e){n.ok(e.on&&e.addListener&&e.emit,"can only bind real EEs");var t=this,r="context@"+this.name;i(e,(function(e){e&&(e[o]||(e[o]=Object.create(null)),e[o][r]={namespace:t,context:t.active})}),(function(e){if(!e||!e[o])return e;var t=e,r=e[o];return Object.keys(r).forEach((function(e){var n=r[e];t=n.namespace.bind(t,n.context)})),t}))},a.prototype.fromException=function(e){return e[s]},process.namespaces||u(),e.exports={getNamespace:c,createNamespace:function(e){n.ok(e,"namespace must be given a name!");var t=new a(e);return t.id=process.addAsyncListener({create:function(){return t.active},before:function(e,r){r&&t.enter(r)},after:function(e,r){r&&t.exit(r)},error:function(e){e&&t.exit(e)}}),process.namespaces[e]=t,t},destroyNamespace:l,reset:u}},46725:function(e,t,r){var n;e.exports=(n=r(58112),r(58885),r(74678),r(6165),r(78976),function(){var e=n,t=e.lib.BlockCipher,r=e.algo,i=[],o=[],s=[],a=[],c=[],l=[],u=[],d=[],p=[],h=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,n=0;for(t=0;t<256;t++){var f=n^n<<1^n<<2^n<<3^n<<4;f=f>>>8^255&f^99,i[r]=f,o[f]=r;var g=e[r],m=e[g],y=e[m],v=257*e[f]^16843008*f;s[r]=v<<24|v>>>8,a[r]=v<<16|v>>>16,c[r]=v<<8|v>>>24,l[r]=v,v=16843009*y^65537*m^257*g^16843008*r,u[f]=v<<24|v>>>8,d[f]=v<<16|v>>>16,p[f]=v<<8|v>>>24,h[f]=v,r?(r=g^e[e[e[y^g]]],n^=e[e[n]]):r=n=1}}();var f=[0,1,2,4,8,16,32,64,128,27,54],g=r.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4,n=4*((this._nRounds=r+6)+1),o=this._keySchedule=[],s=0;s6&&s%r==4&&(l=i[l>>>24]<<24|i[l>>>16&255]<<16|i[l>>>8&255]<<8|i[255&l]):(l=i[(l=l<<8|l>>>24)>>>24]<<24|i[l>>>16&255]<<16|i[l>>>8&255]<<8|i[255&l],l^=f[s/r|0]<<24),o[s]=o[s-r]^l);for(var a=this._invKeySchedule=[],c=0;c>>24]]^d[i[l>>>16&255]]^p[i[l>>>8&255]]^h[i[255&l]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,s,a,c,l,i)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,u,d,p,h,o),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,i,o,s,a){for(var c=this._nRounds,l=e[t]^r[0],u=e[t+1]^r[1],d=e[t+2]^r[2],p=e[t+3]^r[3],h=4,f=1;f>>24]^i[u>>>16&255]^o[d>>>8&255]^s[255&p]^r[h++],m=n[u>>>24]^i[d>>>16&255]^o[p>>>8&255]^s[255&l]^r[h++],y=n[d>>>24]^i[p>>>16&255]^o[l>>>8&255]^s[255&u]^r[h++],v=n[p>>>24]^i[l>>>16&255]^o[u>>>8&255]^s[255&d]^r[h++];l=g,u=m,d=y,p=v}g=(a[l>>>24]<<24|a[u>>>16&255]<<16|a[d>>>8&255]<<8|a[255&p])^r[h++],m=(a[u>>>24]<<24|a[d>>>16&255]<<16|a[p>>>8&255]<<8|a[255&l])^r[h++],y=(a[d>>>24]<<24|a[p>>>16&255]<<16|a[l>>>8&255]<<8|a[255&u])^r[h++],v=(a[p>>>24]<<24|a[l>>>16&255]<<16|a[u>>>8&255]<<8|a[255&d])^r[h++],e[t]=g,e[t+1]=m,e[t+2]=y,e[t+3]=v},keySize:8});e.AES=t._createHelper(g)}(),n.AES)},78976:function(e,t,r){var n,i,o,s,a,c,l,u,d,p,h,f,g,m,y,v,_,b,w;e.exports=(n=r(58112),r(6165),void(n.lib.Cipher||(i=n,o=i.lib,s=o.Base,a=o.WordArray,c=o.BufferedBlockAlgorithm,l=i.enc,l.Utf8,u=l.Base64,d=i.algo.EvpKDF,p=o.Cipher=c.extend({cfg:s.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,r){this.cfg=this.cfg.extend(r),this._xformMode=e,this._key=t,this.reset()},reset:function(){c.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?w:_}return function(t){return{encrypt:function(r,n,i){return e(n).encrypt(t,r,n,i)},decrypt:function(r,n,i){return e(n).decrypt(t,r,n,i)}}}}()}),o.StreamCipher=p.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),h=i.mode={},f=o.BlockCipherMode=s.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),g=h.CBC=function(){var e=f.extend();function t(e,t,r){var n,i=this._iv;i?(n=i,this._iv=void 0):n=this._prevBlock;for(var o=0;o>>2];e.sigBytes-=t}},o.BlockCipher=p.extend({cfg:p.cfg.extend({mode:g,padding:m}),reset:function(){var e;p.reset.call(this);var t=this.cfg,r=t.iv,n=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=n.createEncryptor:(e=n.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,r&&r.words):(this._mode=e.call(n,this,r&&r.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4}),y=o.CipherParams=s.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),v=(i.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,r=e.salt;return(r?a.create([1398893684,1701076831]).concat(r).concat(t):t).toString(u)},parse:function(e){var t,r=u.parse(e),n=r.words;return 1398893684==n[0]&&1701076831==n[1]&&(t=a.create(n.slice(2,4)),n.splice(0,4),r.sigBytes-=16),y.create({ciphertext:r,salt:t})}},_=o.SerializableCipher=s.extend({cfg:s.extend({format:v}),encrypt:function(e,t,r,n){n=this.cfg.extend(n);var i=e.createEncryptor(r,n),o=i.finalize(t),s=i.cfg;return y.create({ciphertext:o,key:r,iv:s.iv,algorithm:e,mode:s.mode,padding:s.padding,blockSize:e.blockSize,formatter:n.format})},decrypt:function(e,t,r,n){return n=this.cfg.extend(n),t=this._parse(t,n.format),e.createDecryptor(r,n).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),b=(i.kdf={}).OpenSSL={execute:function(e,t,r,n){n||(n=a.random(8));var i=d.create({keySize:t+r}).compute(e,n),o=a.create(i.words.slice(t),4*r);return i.sigBytes=4*t,y.create({key:i,iv:o,salt:n})}},w=o.PasswordBasedCipher=_.extend({cfg:_.cfg.extend({kdf:b}),encrypt:function(e,t,r,n){var i=(n=this.cfg.extend(n)).kdf.execute(r,e.keySize,e.ivSize);n.iv=i.iv;var o=_.encrypt.call(this,e,t,i.key,n);return o.mixIn(i),o},decrypt:function(e,t,r,n){n=this.cfg.extend(n),t=this._parse(t,n.format);var i=n.kdf.execute(r,e.keySize,e.ivSize,t.salt);return n.iv=i.iv,_.decrypt.call(this,e,t,i.key,n)}}))))},58112:function(e,t,r){var n;e.exports=(n=n||function(e,t){var n;if("undefined"!=typeof window&&window.crypto&&(n=window.crypto),!n&&"undefined"!=typeof window&&window.msCrypto&&(n=window.msCrypto),!n&&"undefined"!=typeof global&&global.crypto&&(n=global.crypto),!n)try{n=r(6113)}catch(e){}var i=function(){if(n){if("function"==typeof n.getRandomValues)try{return n.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof n.randomBytes)try{return n.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),s={},a=s.lib={},c=a.Base={extend:function(e){var t=o(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},l=a.WordArray=c.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||d).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes,i=e.sigBytes;if(this.clamp(),n%4)for(var o=0;o>>2]>>>24-o%4*8&255;t[n+o>>>2]|=s<<24-(n+o)%4*8}else for(o=0;o>>2]=r[o>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=c.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],r=0;r>>2]>>>24-i%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new l.init(r,t/2)}},p=u.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(o))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new l.init(r,t)}},h=u.Utf8={stringify:function(e){try{return decodeURIComponent(escape(p.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return p.parse(unescape(encodeURIComponent(e)))}},f=a.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new l.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=h.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r,n=this._data,i=n.words,o=n.sigBytes,s=this.blockSize,a=o/(4*s),c=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*s,u=e.min(4*c,o);if(c){for(var d=0;d>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,a=0;a<4&&o+.75*a>>6*(3-a)&63));var c=n.charAt(64);if(c)for(;i.length%4;)i.push(c);return i.join("")},parse:function(e){var t=e.length,r=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var i=0;i>>6-s%4*2;n[i>>>2]|=a<<24-i%4*8,i++}return o.create(n,i)}(e,t,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},n.enc.Base64)},18559:function(e,t,r){var n;e.exports=(n=r(58112),function(){var e=n,t=e.lib.WordArray,r=e.enc;function i(e){return e<<8&4278255360|e>>>8&16711935}r.Utf16=r.Utf16BE={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i>>2]>>>16-i%4*8&65535;n.push(String.fromCharCode(o))}return n.join("")},parse:function(e){for(var r=e.length,n=[],i=0;i>>1]|=e.charCodeAt(i)<<16-i%2*16;return t.create(n,2*r)}},r.Utf16LE={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],o=0;o>>2]>>>16-o%4*8&65535);n.push(String.fromCharCode(s))}return n.join("")},parse:function(e){for(var r=e.length,n=[],o=0;o>>1]|=i(e.charCodeAt(o)<<16-o%2*16);return t.create(n,2*r)}}}(),n.enc.Utf16)},6165:function(e,t,r){var n,i,o,s,a,c,l,u;e.exports=(u=r(58112),r(31284),r(73456),o=(i=(n=u).lib).Base,s=i.WordArray,c=(a=n.algo).MD5,l=a.EvpKDF=o.extend({cfg:o.extend({keySize:4,hasher:c,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r,n=this.cfg,i=n.hasher.create(),o=s.create(),a=o.words,c=n.keySize,l=n.iterations;a.lengthn&&(t=e.finalize(t)),t.clamp();for(var i=this._oKey=t.clone(),s=this._iKey=t.clone(),a=i.words,c=s.words,l=0;l>>2]|=e[i]<<24-i%4*8;t.call(this,n,r)}else t.apply(this,arguments)};r.prototype=e}}(),n.lib.WordArray)},74678:function(e,t,r){var n;e.exports=(n=r(58112),function(e){var t=n,r=t.lib,i=r.WordArray,o=r.Hasher,s=t.algo,a=[];!function(){for(var t=0;t<64;t++)a[t]=4294967296*e.abs(e.sin(t+1))|0}();var c=s.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,s=e[t+0],c=e[t+1],h=e[t+2],f=e[t+3],g=e[t+4],m=e[t+5],y=e[t+6],v=e[t+7],_=e[t+8],b=e[t+9],w=e[t+10],C=e[t+11],E=e[t+12],T=e[t+13],S=e[t+14],x=e[t+15],k=o[0],I=o[1],A=o[2],P=o[3];k=l(k,I,A,P,s,7,a[0]),P=l(P,k,I,A,c,12,a[1]),A=l(A,P,k,I,h,17,a[2]),I=l(I,A,P,k,f,22,a[3]),k=l(k,I,A,P,g,7,a[4]),P=l(P,k,I,A,m,12,a[5]),A=l(A,P,k,I,y,17,a[6]),I=l(I,A,P,k,v,22,a[7]),k=l(k,I,A,P,_,7,a[8]),P=l(P,k,I,A,b,12,a[9]),A=l(A,P,k,I,w,17,a[10]),I=l(I,A,P,k,C,22,a[11]),k=l(k,I,A,P,E,7,a[12]),P=l(P,k,I,A,T,12,a[13]),A=l(A,P,k,I,S,17,a[14]),k=u(k,I=l(I,A,P,k,x,22,a[15]),A,P,c,5,a[16]),P=u(P,k,I,A,y,9,a[17]),A=u(A,P,k,I,C,14,a[18]),I=u(I,A,P,k,s,20,a[19]),k=u(k,I,A,P,m,5,a[20]),P=u(P,k,I,A,w,9,a[21]),A=u(A,P,k,I,x,14,a[22]),I=u(I,A,P,k,g,20,a[23]),k=u(k,I,A,P,b,5,a[24]),P=u(P,k,I,A,S,9,a[25]),A=u(A,P,k,I,f,14,a[26]),I=u(I,A,P,k,_,20,a[27]),k=u(k,I,A,P,T,5,a[28]),P=u(P,k,I,A,h,9,a[29]),A=u(A,P,k,I,v,14,a[30]),k=d(k,I=u(I,A,P,k,E,20,a[31]),A,P,m,4,a[32]),P=d(P,k,I,A,_,11,a[33]),A=d(A,P,k,I,C,16,a[34]),I=d(I,A,P,k,S,23,a[35]),k=d(k,I,A,P,c,4,a[36]),P=d(P,k,I,A,g,11,a[37]),A=d(A,P,k,I,v,16,a[38]),I=d(I,A,P,k,w,23,a[39]),k=d(k,I,A,P,T,4,a[40]),P=d(P,k,I,A,s,11,a[41]),A=d(A,P,k,I,f,16,a[42]),I=d(I,A,P,k,y,23,a[43]),k=d(k,I,A,P,b,4,a[44]),P=d(P,k,I,A,E,11,a[45]),A=d(A,P,k,I,x,16,a[46]),k=p(k,I=d(I,A,P,k,h,23,a[47]),A,P,s,6,a[48]),P=p(P,k,I,A,v,10,a[49]),A=p(A,P,k,I,S,15,a[50]),I=p(I,A,P,k,m,21,a[51]),k=p(k,I,A,P,E,6,a[52]),P=p(P,k,I,A,f,10,a[53]),A=p(A,P,k,I,w,15,a[54]),I=p(I,A,P,k,c,21,a[55]),k=p(k,I,A,P,_,6,a[56]),P=p(P,k,I,A,x,10,a[57]),A=p(A,P,k,I,y,15,a[58]),I=p(I,A,P,k,T,21,a[59]),k=p(k,I,A,P,g,6,a[60]),P=p(P,k,I,A,C,10,a[61]),A=p(A,P,k,I,h,15,a[62]),I=p(I,A,P,k,b,21,a[63]),o[0]=o[0]+k|0,o[1]=o[1]+I|0,o[2]=o[2]+A|0,o[3]=o[3]+P|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;r[i>>>5]|=128<<24-i%32;var o=e.floor(n/4294967296),s=n;r[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),r[14+(i+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),t.sigBytes=4*(r.length+1),this._process();for(var a=this._hash,c=a.words,l=0;l<4;l++){var u=c[l];c[l]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return a},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function l(e,t,r,n,i,o,s){var a=e+(t&r|~t&n)+i+s;return(a<>>32-o)+t}function u(e,t,r,n,i,o,s){var a=e+(t&n|r&~n)+i+s;return(a<>>32-o)+t}function d(e,t,r,n,i,o,s){var a=e+(t^r^n)+i+s;return(a<>>32-o)+t}function p(e,t,r,n,i,o,s){var a=e+(r^(t|~n))+i+s;return(a<>>32-o)+t}t.MD5=o._createHelper(c),t.HmacMD5=o._createHmacHelper(c)}(Math),n.MD5)},98581:function(e,t,r){var n;e.exports=(n=r(58112),r(78976),n.mode.CFB=function(){var e=n.lib.BlockCipherMode.extend();function t(e,t,r,n){var i,o=this._iv;o?(i=o.slice(0),this._iv=void 0):i=this._prevBlock,n.encryptBlock(i,0);for(var s=0;s>24&255)){var t=e>>16&255,r=e>>8&255,n=255&e;255===t?(t=0,255===r?(r=0,255===n?n=0:++n):++r):++t,e=0,e+=t<<16,e+=r<<8,e+=n}else e+=1<<24;return e}var r=e.Encryptor=e.extend({processBlock:function(e,r){var n=this._cipher,i=n.blockSize,o=this._iv,s=this._counter;o&&(s=this._counter=o.slice(0),this._iv=void 0),function(e){0===(e[0]=t(e[0]))&&(e[1]=t(e[1]))}(s);var a=s.slice(0);n.encryptBlock(a,0);for(var c=0;c>>2]|=i<<24-o%4*8,e.sigBytes+=i},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},n.pad.Ansix923)},17051:function(e,t,r){var n;e.exports=(n=r(58112),r(78976),n.pad.Iso10126={pad:function(e,t){var r=4*t,i=r-e.sigBytes%r;e.concat(n.lib.WordArray.random(i-1)).concat(n.lib.WordArray.create([i<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},n.pad.Iso10126)},6863:function(e,t,r){var n;e.exports=(n=r(58112),r(78976),n.pad.Iso97971={pad:function(e,t){e.concat(n.lib.WordArray.create([2147483648],1)),n.pad.ZeroPadding.pad(e,t)},unpad:function(e){n.pad.ZeroPadding.unpad(e),e.sigBytes--}},n.pad.Iso97971)},56261:function(e,t,r){var n;e.exports=(n=r(58112),r(78976),n.pad.NoPadding={pad:function(){},unpad:function(){}},n.pad.NoPadding)},42864:function(e,t,r){var n;e.exports=(n=r(58112),r(78976),n.pad.ZeroPadding={pad:function(e,t){var r=4*t;e.clamp(),e.sigBytes+=r-(e.sigBytes%r||r)},unpad:function(e){var t=e.words,r=e.sigBytes-1;for(r=e.sigBytes-1;r>=0;r--)if(t[r>>>2]>>>24-r%4*8&255){e.sigBytes=r+1;break}}},n.pad.ZeroPadding)},59220:function(e,t,r){var n,i,o,s,a,c,l,u,d;e.exports=(d=r(58112),r(31284),r(73456),o=(i=(n=d).lib).Base,s=i.WordArray,c=(a=n.algo).SHA1,l=a.HMAC,u=a.PBKDF2=o.extend({cfg:o.extend({keySize:4,hasher:c,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r=this.cfg,n=l.create(r.hasher,e),i=s.create(),o=s.create([1]),a=i.words,c=o.words,u=r.keySize,d=r.iterations;a.length>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],n=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var i=0;i<4;i++)c.call(this);for(i=0;i<8;i++)n[i]^=r[i+4&7];if(t){var o=t.words,s=o[0],a=o[1],l=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),u=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),d=l>>>16|4294901760&u,p=u<<16|65535&l;for(n[0]^=l,n[1]^=d,n[2]^=u,n[3]^=p,n[4]^=l,n[5]^=d,n[6]^=u,n[7]^=p,i=0;i<4;i++)c.call(this)}},_doProcessBlock:function(e,t){var r=this._X;c.call(this),i[0]=r[0]^r[5]>>>16^r[3]<<16,i[1]=r[2]^r[7]>>>16^r[5]<<16,i[2]=r[4]^r[1]>>>16^r[7]<<16,i[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)i[n]=16711935&(i[n]<<8|i[n]>>>24)|4278255360&(i[n]<<24|i[n]>>>8),e[t+n]^=i[n]},blockSize:4,ivSize:2});function c(){for(var e=this._X,t=this._C,r=0;r<8;r++)o[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],i=65535&n,a=n>>>16,c=((i*i>>>17)+i*a>>>15)+a*a,l=((4294901760&n)*n|0)+((65535&n)*n|0);s[r]=c^l}e[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,e[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,e[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,e[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,e[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,e[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,e[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,e[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}e.RabbitLegacy=t._createHelper(a)}(),n.RabbitLegacy)},5129:function(e,t,r){var n;e.exports=(n=r(58112),r(58885),r(74678),r(6165),r(78976),function(){var e=n,t=e.lib.StreamCipher,r=e.algo,i=[],o=[],s=[],a=r.Rabbit=t.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,r=0;r<4;r++)e[r]=16711935&(e[r]<<8|e[r]>>>24)|4278255360&(e[r]<<24|e[r]>>>8);var n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],i=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,r=0;r<4;r++)c.call(this);for(r=0;r<8;r++)i[r]^=n[r+4&7];if(t){var o=t.words,s=o[0],a=o[1],l=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),u=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),d=l>>>16|4294901760&u,p=u<<16|65535&l;for(i[0]^=l,i[1]^=d,i[2]^=u,i[3]^=p,i[4]^=l,i[5]^=d,i[6]^=u,i[7]^=p,r=0;r<4;r++)c.call(this)}},_doProcessBlock:function(e,t){var r=this._X;c.call(this),i[0]=r[0]^r[5]>>>16^r[3]<<16,i[1]=r[2]^r[7]>>>16^r[5]<<16,i[2]=r[4]^r[1]>>>16^r[7]<<16,i[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)i[n]=16711935&(i[n]<<8|i[n]>>>24)|4278255360&(i[n]<<24|i[n]>>>8),e[t+n]^=i[n]},blockSize:4,ivSize:2});function c(){for(var e=this._X,t=this._C,r=0;r<8;r++)o[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],i=65535&n,a=n>>>16,c=((i*i>>>17)+i*a>>>15)+a*a,l=((4294901760&n)*n|0)+((65535&n)*n|0);s[r]=c^l}e[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,e[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,e[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,e[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,e[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,e[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,e[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,e[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}e.Rabbit=t._createHelper(a)}(),n.Rabbit)},53954:function(e,t,r){var n;e.exports=(n=r(58112),r(58885),r(74678),r(6165),r(78976),function(){var e=n,t=e.lib.StreamCipher,r=e.algo,i=r.RC4=t.extend({_doReset:function(){for(var e=this._key,t=e.words,r=e.sigBytes,n=this._S=[],i=0;i<256;i++)n[i]=i;i=0;for(var o=0;i<256;i++){var s=i%r,a=t[s>>>2]>>>24-s%4*8&255;o=(o+n[i]+a)%256;var c=n[i];n[i]=n[o],n[o]=c}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=o.call(this)},keySize:8,ivSize:0});function o(){for(var e=this._S,t=this._i,r=this._j,n=0,i=0;i<4;i++){r=(r+e[t=(t+1)%256])%256;var o=e[t];e[t]=e[r],e[r]=o,n|=e[(e[t]+e[r])%256]<<24-8*i}return this._i=t,this._j=r,n}e.RC4=t._createHelper(i);var s=r.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)o.call(this)}});e.RC4Drop=t._createHelper(s)}(),n.RC4)},23787:function(e,t,r){var n;e.exports=(n=r(58112),function(e){var t=n,r=t.lib,i=r.WordArray,o=r.Hasher,s=t.algo,a=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]),l=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]),u=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]),d=i.create([0,1518500249,1859775393,2400959708,2840853838]),p=i.create([1352829926,1548603684,1836072691,2053994217,0]),h=s.RIPEMD160=o.extend({_doReset:function(){this._hash=i.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o,s,h,b,w,C,E,T,S,x,k,I=this._hash.words,A=d.words,P=p.words,R=a.words,N=c.words,O=l.words,L=u.words;for(C=o=I[0],E=s=I[1],T=h=I[2],S=b=I[3],x=w=I[4],r=0;r<80;r+=1)k=o+e[t+R[r]]|0,k+=r<16?f(s,h,b)+A[0]:r<32?g(s,h,b)+A[1]:r<48?m(s,h,b)+A[2]:r<64?y(s,h,b)+A[3]:v(s,h,b)+A[4],k=(k=_(k|=0,O[r]))+w|0,o=w,w=b,b=_(h,10),h=s,s=k,k=C+e[t+N[r]]|0,k+=r<16?v(E,T,S)+P[0]:r<32?y(E,T,S)+P[1]:r<48?m(E,T,S)+P[2]:r<64?g(E,T,S)+P[3]:f(E,T,S)+P[4],k=(k=_(k|=0,L[r]))+x|0,C=x,x=S,S=_(T,10),T=E,E=k;k=I[1]+h+S|0,I[1]=I[2]+b+x|0,I[2]=I[3]+w+C|0,I[3]=I[4]+o+E|0,I[4]=I[0]+s+T|0,I[0]=k},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),e.sigBytes=4*(t.length+1),this._process();for(var i=this._hash,o=i.words,s=0;s<5;s++){var a=o[s];o[s]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}return i},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function f(e,t,r){return e^t^r}function g(e,t,r){return e&t|~e&r}function m(e,t,r){return(e|~t)^r}function y(e,t,r){return e&r|t&~r}function v(e,t,r){return e^(t|~r)}function _(e,t){return e<>>32-t}t.RIPEMD160=o._createHelper(h),t.HmacRIPEMD160=o._createHmacHelper(h)}(Math),n.RIPEMD160)},31284:function(e,t,r){var n,i,o,s,a,c,l,u;e.exports=(i=(n=u=r(58112)).lib,o=i.WordArray,s=i.Hasher,a=n.algo,c=[],l=a.SHA1=s.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],s=r[3],a=r[4],l=0;l<80;l++){if(l<16)c[l]=0|e[t+l];else{var u=c[l-3]^c[l-8]^c[l-14]^c[l-16];c[l]=u<<1|u>>>31}var d=(n<<5|n>>>27)+a+c[l];d+=l<20?1518500249+(i&o|~i&s):l<40?1859775393+(i^o^s):l<60?(i&o|i&s|o&s)-1894007588:(i^o^s)-899497514,a=s,s=o,o=i<<30|i>>>2,i=n,n=d}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+o|0,r[3]=r[3]+s|0,r[4]=r[4]+a|0},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=Math.floor(r/4294967296),t[15+(n+64>>>9<<4)]=r,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=s.clone.call(this);return e._hash=this._hash.clone(),e}}),n.SHA1=s._createHelper(l),n.HmacSHA1=s._createHmacHelper(l),u.SHA1)},83816:function(e,t,r){var n,i,o,s,a,c;e.exports=(c=r(58112),r(92232),i=(n=c).lib.WordArray,o=n.algo,s=o.SHA256,a=o.SHA224=s.extend({_doReset:function(){this._hash=new i.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=s._doFinalize.call(this);return e.sigBytes-=4,e}}),n.SHA224=s._createHelper(a),n.HmacSHA224=s._createHmacHelper(a),c.SHA224)},92232:function(e,t,r){var n;e.exports=(n=r(58112),function(e){var t=n,r=t.lib,i=r.WordArray,o=r.Hasher,s=t.algo,a=[],c=[];!function(){function t(t){for(var r=e.sqrt(t),n=2;n<=r;n++)if(!(t%n))return!1;return!0}function r(e){return 4294967296*(e-(0|e))|0}for(var n=2,i=0;i<64;)t(n)&&(i<8&&(a[i]=r(e.pow(n,.5))),c[i]=r(e.pow(n,1/3)),i++),n++}();var l=[],u=s.SHA256=o.extend({_doReset:function(){this._hash=new i.init(a.slice(0))},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],s=r[3],a=r[4],u=r[5],d=r[6],p=r[7],h=0;h<64;h++){if(h<16)l[h]=0|e[t+h];else{var f=l[h-15],g=(f<<25|f>>>7)^(f<<14|f>>>18)^f>>>3,m=l[h-2],y=(m<<15|m>>>17)^(m<<13|m>>>19)^m>>>10;l[h]=g+l[h-7]+y+l[h-16]}var v=n&i^n&o^i&o,_=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),b=p+((a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25))+(a&u^~a&d)+c[h]+l[h];p=d,d=u,u=a,a=s+b|0,s=o,o=i,i=n,n=b+(_+v)|0}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+o|0,r[3]=r[3]+s|0,r[4]=r[4]+a|0,r[5]=r[5]+u|0,r[6]=r[6]+d|0,r[7]=r[7]+p|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;return r[i>>>5]|=128<<24-i%32,r[14+(i+64>>>9<<4)]=e.floor(n/4294967296),r[15+(i+64>>>9<<4)]=n,t.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=o._createHelper(u),t.HmacSHA256=o._createHmacHelper(u)}(Math),n.SHA256)},71455:function(e,t,r){var n;e.exports=(n=r(58112),r(88400),function(e){var t=n,r=t.lib,i=r.WordArray,o=r.Hasher,s=t.x64.Word,a=t.algo,c=[],l=[],u=[];!function(){for(var e=1,t=0,r=0;r<24;r++){c[e+5*t]=(r+1)*(r+2)/2%64;var n=(2*e+3*t)%5;e=t%5,t=n}for(e=0;e<5;e++)for(t=0;t<5;t++)l[e+5*t]=t+(2*e+3*t)%5*5;for(var i=1,o=0;o<24;o++){for(var a=0,d=0,p=0;p<7;p++){if(1&i){var h=(1<>>24)|4278255360&(o<<24|o>>>8),s=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),(I=r[i]).high^=s,I.low^=o}for(var a=0;a<24;a++){for(var p=0;p<5;p++){for(var h=0,f=0,g=0;g<5;g++)h^=(I=r[p+5*g]).high,f^=I.low;var m=d[p];m.high=h,m.low=f}for(p=0;p<5;p++){var y=d[(p+4)%5],v=d[(p+1)%5],_=v.high,b=v.low;for(h=y.high^(_<<1|b>>>31),f=y.low^(b<<1|_>>>31),g=0;g<5;g++)(I=r[p+5*g]).high^=h,I.low^=f}for(var w=1;w<25;w++){var C=(I=r[w]).high,E=I.low,T=c[w];T<32?(h=C<>>32-T,f=E<>>32-T):(h=E<>>64-T,f=C<>>64-T);var S=d[l[w]];S.high=h,S.low=f}var x=d[0],k=r[0];for(x.high=k.high,x.low=k.low,p=0;p<5;p++)for(g=0;g<5;g++){var I=r[w=p+5*g],A=d[w],P=d[(p+1)%5+5*g],R=d[(p+2)%5+5*g];I.high=A.high^~P.high&R.high,I.low=A.low^~P.low&R.low}I=r[0];var N=u[a];I.high^=N.high,I.low^=N.low}},_doFinalize:function(){var t=this._data,r=t.words,n=(this._nDataBytes,8*t.sigBytes),o=32*this.blockSize;r[n>>>5]|=1<<24-n%32,r[(e.ceil((n+1)/o)*o>>>5)-1]|=128,t.sigBytes=4*r.length,this._process();for(var s=this._state,a=this.cfg.outputLength/8,c=a/8,l=[],u=0;u>>24)|4278255360&(p<<24|p>>>8),h=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8),l.push(h),l.push(p)}return new i.init(l,a)},clone:function(){for(var e=o.clone.call(this),t=e._state=this._state.slice(0),r=0;r<25;r++)t[r]=t[r].clone();return e}});t.SHA3=o._createHelper(p),t.HmacSHA3=o._createHmacHelper(p)}(Math),n.SHA3)},1007:function(e,t,r){var n,i,o,s,a,c,l,u;e.exports=(u=r(58112),r(88400),r(89039),i=(n=u).x64,o=i.Word,s=i.WordArray,a=n.algo,c=a.SHA512,l=a.SHA384=c.extend({_doReset:function(){this._hash=new s.init([new o.init(3418070365,3238371032),new o.init(1654270250,914150663),new o.init(2438529370,812702999),new o.init(355462360,4144912697),new o.init(1731405415,4290775857),new o.init(2394180231,1750603025),new o.init(3675008525,1694076839),new o.init(1203062813,3204075428)])},_doFinalize:function(){var e=c._doFinalize.call(this);return e.sigBytes-=16,e}}),n.SHA384=c._createHelper(l),n.HmacSHA384=c._createHmacHelper(l),u.SHA384)},89039:function(e,t,r){var n;e.exports=(n=r(58112),r(88400),function(){var e=n,t=e.lib.Hasher,r=e.x64,i=r.Word,o=r.WordArray,s=e.algo;function a(){return i.create.apply(i,arguments)}var c=[a(1116352408,3609767458),a(1899447441,602891725),a(3049323471,3964484399),a(3921009573,2173295548),a(961987163,4081628472),a(1508970993,3053834265),a(2453635748,2937671579),a(2870763221,3664609560),a(3624381080,2734883394),a(310598401,1164996542),a(607225278,1323610764),a(1426881987,3590304994),a(1925078388,4068182383),a(2162078206,991336113),a(2614888103,633803317),a(3248222580,3479774868),a(3835390401,2666613458),a(4022224774,944711139),a(264347078,2341262773),a(604807628,2007800933),a(770255983,1495990901),a(1249150122,1856431235),a(1555081692,3175218132),a(1996064986,2198950837),a(2554220882,3999719339),a(2821834349,766784016),a(2952996808,2566594879),a(3210313671,3203337956),a(3336571891,1034457026),a(3584528711,2466948901),a(113926993,3758326383),a(338241895,168717936),a(666307205,1188179964),a(773529912,1546045734),a(1294757372,1522805485),a(1396182291,2643833823),a(1695183700,2343527390),a(1986661051,1014477480),a(2177026350,1206759142),a(2456956037,344077627),a(2730485921,1290863460),a(2820302411,3158454273),a(3259730800,3505952657),a(3345764771,106217008),a(3516065817,3606008344),a(3600352804,1432725776),a(4094571909,1467031594),a(275423344,851169720),a(430227734,3100823752),a(506948616,1363258195),a(659060556,3750685593),a(883997877,3785050280),a(958139571,3318307427),a(1322822218,3812723403),a(1537002063,2003034995),a(1747873779,3602036899),a(1955562222,1575990012),a(2024104815,1125592928),a(2227730452,2716904306),a(2361852424,442776044),a(2428436474,593698344),a(2756734187,3733110249),a(3204031479,2999351573),a(3329325298,3815920427),a(3391569614,3928383900),a(3515267271,566280711),a(3940187606,3454069534),a(4118630271,4000239992),a(116418474,1914138554),a(174292421,2731055270),a(289380356,3203993006),a(460393269,320620315),a(685471733,587496836),a(852142971,1086792851),a(1017036298,365543100),a(1126000580,2618297676),a(1288033470,3409855158),a(1501505948,4234509866),a(1607167915,987167468),a(1816402316,1246189591)],l=[];!function(){for(var e=0;e<80;e++)l[e]=a()}();var u=s.SHA512=t.extend({_doReset:function(){this._hash=new o.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],s=r[3],a=r[4],u=r[5],d=r[6],p=r[7],h=n.high,f=n.low,g=i.high,m=i.low,y=o.high,v=o.low,_=s.high,b=s.low,w=a.high,C=a.low,E=u.high,T=u.low,S=d.high,x=d.low,k=p.high,I=p.low,A=h,P=f,R=g,N=m,O=y,L=v,D=_,M=b,B=w,F=C,j=E,U=T,$=S,q=x,H=k,V=I,z=0;z<80;z++){var K,W,G=l[z];if(z<16)W=G.high=0|e[t+2*z],K=G.low=0|e[t+2*z+1];else{var Q=l[z-15],J=Q.high,Y=Q.low,X=(J>>>1|Y<<31)^(J>>>8|Y<<24)^J>>>7,Z=(Y>>>1|J<<31)^(Y>>>8|J<<24)^(Y>>>7|J<<25),ee=l[z-2],te=ee.high,re=ee.low,ne=(te>>>19|re<<13)^(te<<3|re>>>29)^te>>>6,ie=(re>>>19|te<<13)^(re<<3|te>>>29)^(re>>>6|te<<26),oe=l[z-7],se=oe.high,ae=oe.low,ce=l[z-16],le=ce.high,ue=ce.low;W=(W=(W=X+se+((K=Z+ae)>>>0>>0?1:0))+ne+((K+=ie)>>>0>>0?1:0))+le+((K+=ue)>>>0>>0?1:0),G.high=W,G.low=K}var de,pe=B&j^~B&$,he=F&U^~F&q,fe=A&R^A&O^R&O,ge=P&N^P&L^N&L,me=(A>>>28|P<<4)^(A<<30|P>>>2)^(A<<25|P>>>7),ye=(P>>>28|A<<4)^(P<<30|A>>>2)^(P<<25|A>>>7),ve=(B>>>14|F<<18)^(B>>>18|F<<14)^(B<<23|F>>>9),_e=(F>>>14|B<<18)^(F>>>18|B<<14)^(F<<23|B>>>9),be=c[z],we=be.high,Ce=be.low,Ee=H+ve+((de=V+_e)>>>0>>0?1:0),Te=ye+ge;H=$,V=q,$=j,q=U,j=B,U=F,B=D+(Ee=(Ee=(Ee=Ee+pe+((de+=he)>>>0>>0?1:0))+we+((de+=Ce)>>>0>>0?1:0))+W+((de+=K)>>>0>>0?1:0))+((F=M+de|0)>>>0>>0?1:0)|0,D=O,M=L,O=R,L=N,R=A,N=P,A=Ee+(me+fe+(Te>>>0>>0?1:0))+((P=de+Te|0)>>>0>>0?1:0)|0}f=n.low=f+P,n.high=h+A+(f>>>0

>>0?1:0),m=i.low=m+N,i.high=g+R+(m>>>0>>0?1:0),v=o.low=v+L,o.high=y+O+(v>>>0>>0?1:0),b=s.low=b+M,s.high=_+D+(b>>>0>>0?1:0),C=a.low=C+F,a.high=w+B+(C>>>0>>0?1:0),T=u.low=T+U,u.high=E+j+(T>>>0>>0?1:0),x=d.low=x+q,d.high=S+$+(x>>>0>>0?1:0),I=p.low=I+V,p.high=k+H+(I>>>0>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[30+(n+128>>>10<<5)]=Math.floor(r/4294967296),t[31+(n+128>>>10<<5)]=r,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=t.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});e.SHA512=t._createHelper(u),e.HmacSHA512=t._createHmacHelper(u)}(),n.SHA512)},69708:function(e,t,r){var n;e.exports=(n=r(58112),r(58885),r(74678),r(6165),r(78976),function(){var e=n,t=e.lib,r=t.WordArray,i=t.BlockCipher,o=e.algo,s=[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],a=[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],l=[{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}],u=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],d=o.DES=i.extend({_doReset:function(){for(var e=this._key.words,t=[],r=0;r<56;r++){var n=s[r]-1;t[r]=e[n>>>5]>>>31-n%32&1}for(var i=this._subKeys=[],o=0;o<16;o++){var l=i[o]=[],u=c[o];for(r=0;r<24;r++)l[r/6|0]|=t[(a[r]-1+u)%28]<<31-r%6,l[4+(r/6|0)]|=t[28+(a[r+24]-1+u)%28]<<31-r%6;for(l[0]=l[0]<<1|l[0]>>>31,r=1;r<7;r++)l[r]=l[r]>>>4*(r-1)+3;l[7]=l[7]<<5|l[7]>>>27}var d=this._invSubKeys=[];for(r=0;r<16;r++)d[r]=i[15-r]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,r){this._lBlock=e[t],this._rBlock=e[t+1],p.call(this,4,252645135),p.call(this,16,65535),h.call(this,2,858993459),h.call(this,8,16711935),p.call(this,1,1431655765);for(var n=0;n<16;n++){for(var i=r[n],o=this._lBlock,s=this._rBlock,a=0,c=0;c<8;c++)a|=l[c][((s^i[c])&u[c])>>>0];this._lBlock=s,this._rBlock=o^a}var d=this._lBlock;this._lBlock=this._rBlock,this._rBlock=d,p.call(this,1,1431655765),h.call(this,8,16711935),h.call(this,2,858993459),p.call(this,16,65535),p.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function p(e,t){var r=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=r,this._lBlock^=r<>>e^this._lBlock)&t;this._lBlock^=r,this._rBlock^=r<192.");var t=e.slice(0,2),n=e.length<4?e.slice(0,2):e.slice(2,4),i=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=d.createEncryptor(r.create(t)),this._des2=d.createEncryptor(r.create(n)),this._des3=d.createEncryptor(r.create(i))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2});e.TripleDES=i._createHelper(f)}(),n.TripleDES)},88400:function(e,t,r){var n,i,o,s,a,c;e.exports=(n=r(58112),o=(i=n).lib,s=o.Base,a=o.WordArray,(c=i.x64={}).Word=s.extend({init:function(e,t){this.high=e,this.low=t}}),c.WordArray=s.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:8*e.length},toX32:function(){for(var e=this.words,t=e.length,r=[],n=0;n{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(i=n))})),t.splice(i,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.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`."))}})(),t.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"],t.log=console.debug||console.log||(()=>{}),e.exports=r(29374)(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},29374:(e,t,r)=>{e.exports=function(e){function t(e){let r,i,o,s=null;function a(...e){if(!a.enabled)return;const n=a,i=Number(new Date),o=i-(r||i);n.diff=o,n.prev=r,n.curr=i,r=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,i)=>{if("%%"===r)return"%";s++;const o=t.formatters[i];if("function"==typeof o){const t=e[s];r=o.call(n,t),e.splice(s,1),s--}return r})),t.formatArgs.call(n,e),(n.log||t.log).apply(n,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=n,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(i!==t.namespaces&&(i=t.namespaces,o=t.enabled(e)),o),set:e=>{s=e}}),"function"==typeof t.init&&t.init(a),a}function n(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function i(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(i),...t.skips.map(i).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),i=n.length;for(r=0;r{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t{"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?e.exports=r(96292):e.exports=r(4428)},4428:(e,t,r)=>{const n=r(76224),i=r(73837);t.init=function(e){e.inspectOpts={};const r=Object.keys(t.inspectOpts);for(let n=0;n{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=r(56974);e&&(e.stderr||e).level>=2&&(t.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(e){}t.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const r=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let n=process.env[t];return n=!!/^(yes|on|true|enabled)$/i.test(n)||!/^(no|off|false|disabled)$/i.test(n)&&("null"===n?null:Number(n)),e[r]=n,e}),{}),e.exports=r(29374)(t);const{formatters:o}=e.exports;o.o=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},o.O=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts)}},71321:e=>{"use strict";e.exports=(e,t,r)=>{const n=r=>Object.defineProperty(e,t,{value:r,enumerable:!0,writable:!0});return Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get(){const e=r();return n(e),e},set(e){n(e)}}),e}},72784:function(e,t,r){"use strict";var n=this&&this.__assign||Object.assign||function(e){for(var t,r=1,n=arguments.length;r= 1.0.0 < 2.0.0",patch:function(e){try{var s=new(0,r(28028).BasicTracer)(i.channel.spanContextPropagator?{scopeManager:i.channel.spanContextPropagator}:void 0),a=s.startSpan;s.startSpan=function(e,t){if(!t||!t.parent){var r=s.getCurrentSpan();r&&r.operation&&r.operation.traceparent&&(t=n({},t,{parent:{traceId:r.operation.traceparent.traceId,spanId:r.operation.traceparent.spanId}}))}var i=a.call(this,e,t);return i.addEvent("Application Insights Integration enabled"),i},s.addSpanProcessor(new o),s[t.AzureMonitorSymbol]=!0,e.setTracer(s)}catch(e){}return e}},t.enable=function(){i.channel.registerMonkeyPatch("@azure/core-tracing",t.azureCoreTracing)}},70248:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(66932);t.bunyan={versionSpecifier:">= 1.0.0 < 2.0.0",patch:function(e){var t=e.prototype._emit;return e.prototype._emit=function(e,r){var i=t.apply(this,arguments);if(!r){var o=i;o||(o=t.call(this,e,!0)),n.channel.publish("bunyan",{level:e.level,result:o})}return i},e}},t.enable=function(){n.channel.registerMonkeyPatch("bunyan",t.bunyan)}},8159:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(66932),i=r(12781);t.console={versionSpecifier:">= 4.0.0",patch:function(e){var t=new i.Writable,r=new i.Writable;t.write=function(e){if(!e)return!0;var t=e.toString();return n.channel.publish("console",{message:t}),!0},r.write=function(e){if(!e)return!0;var t=e.toString();return n.channel.publish("console",{message:t,stderr:!0}),!0};for(var o=new e.Console(t,r),s=function(t){var r=e[t];r&&(e[t]=function(){if(o[t])try{o[t].apply(o,arguments)}catch(e){}return r.apply(e,arguments)})},a=0,c=["log","info","warn","error","dir","time","timeEnd","trace","assert"];a{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(72784);t.azuresdk=n;var i=r(70248);t.bunyan=i;var o=r(8159);t.console=o;var s=r(7834);t.mongodbCore=s;var a=r(44826);t.mongodb=a;var c=r(55856);t.mysql=c;var l=r(68345);t.pgPool=l;var u=r(67726);t.pg=u;var d=r(4765);t.redis=d;var p=r(61624);t.tedious=p;var h=r(88041);t.winston=h,t.enable=function(){i.enable(),o.enable(),s.enable(),a.enable(),c.enable(),u.enable(),l.enable(),d.enable(),h.enable(),n.enable(),p.enable()}},7834:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(66932);t.mongoCore={versionSpecifier:">= 2.0.0 < 4.0.0",patch:function(e){var t=e.Server.prototype.connect;return e.Server.prototype.connect=function(){var e=t.apply(this,arguments),r=this.s.pool.write;this.s.pool.write=function(){var e="function"==typeof arguments[1]?1:2;return"function"==typeof arguments[e]&&(arguments[e]=n.channel.bindToContext(arguments[e])),r.apply(this,arguments)};var i=this.s.pool.logout;return this.s.pool.logout=function(){return"function"==typeof arguments[1]&&(arguments[1]=n.channel.bindToContext(arguments[1])),i.apply(this,arguments)},e},e}},t.enable=function(){n.channel.registerMonkeyPatch("mongodb-core",t.mongoCore)}},44826:function(e,t,r){"use strict";var n=this&&this.__assign||Object.assign||function(e){for(var t,r=1,n=arguments.length;r= 2.0.0 <= 3.0.5",patch:function(e){var t=e.instrument({operationIdGenerator:{next:function(){return i.channel.bindToContext((function(e){return e()}))}}}),r={};return t.on("started",(function(e){r[e.requestId]||(r[e.requestId]=n({},e,{time:new Date}))})),t.on("succeeded",(function(e){var t=r[e.requestId];t&&delete r[e.requestId],"function"==typeof e.operationId?e.operationId((function(){return i.channel.publish("mongodb",{startedData:t,event:e,succeeded:!0})})):i.channel.publish("mongodb",{startedData:t,event:e,succeeded:!0})})),t.on("failed",(function(e){var t=r[e.requestId];t&&delete r[e.requestId],"function"==typeof e.operationId?e.operationId((function(){return i.channel.publish("mongodb",{startedData:t,event:e,succeeded:!1})})):i.channel.publish("mongodb",{startedData:t,event:e,succeeded:!1})})),e}},t.mongo3={versionSpecifier:"> 3.0.5 < 3.3.0",patch:function(e){var t=e.instrument(),r={},o={};return t.on("started",(function(e){r[e.requestId]||(o[e.requestId]=i.channel.bindToContext((function(e){return e()})),r[e.requestId]=n({},e,{time:new Date}))})),t.on("succeeded",(function(e){var t=r[e.requestId];t&&delete r[e.requestId],"object"==typeof e&&"function"==typeof o[e.requestId]&&(o[e.requestId]((function(){return i.channel.publish("mongodb",{startedData:t,event:e,succeeded:!0})})),delete o[e.requestId])})),t.on("failed",(function(e){var t=r[e.requestId];t&&delete r[e.requestId],"object"==typeof e&&"function"==typeof o[e.requestId]&&(o[e.requestId]((function(){return i.channel.publish("mongodb",{startedData:t,event:e,succeeded:!1})})),delete o[e.requestId])})),e}},t.mongo330={versionSpecifier:">= 3.3.0 < 4.0.0",patch:function(e){!function(e){var t=e.Server.prototype.connect;e.Server.prototype.connect=function(){var e=t.apply(this,arguments),r=this.s.coreTopology.s.pool.write;this.s.coreTopology.s.pool.write=function(){var e="function"==typeof arguments[1]?1:2;return"function"==typeof arguments[e]&&(arguments[e]=i.channel.bindToContext(arguments[e])),r.apply(this,arguments)};var n=this.s.coreTopology.s.pool.logout;return this.s.coreTopology.s.pool.logout=function(){return"function"==typeof arguments[1]&&(arguments[1]=i.channel.bindToContext(arguments[1])),n.apply(this,arguments)},e}}(e);var t=e.instrument(),r={},n={};return t.on("started",(function(e){r[e.requestId]||(n[e.requestId]=i.channel.bindToContext((function(e){return e()})),r[e.requestId]=e)})),t.on("succeeded",(function(e){var t=r[e.requestId];t&&delete r[e.requestId],"object"==typeof e&&"function"==typeof n[e.requestId]&&(n[e.requestId]((function(){return i.channel.publish("mongodb",{startedData:t,event:e,succeeded:!0})})),delete n[e.requestId])})),t.on("failed",(function(e){var t=r[e.requestId];t&&delete r[e.requestId],"object"==typeof e&&"function"==typeof n[e.requestId]&&(n[e.requestId]((function(){return i.channel.publish("mongodb",{startedData:t,event:e,succeeded:!1})})),delete n[e.requestId])})),e}},t.enable=function(){i.channel.registerMonkeyPatch("mongodb",t.mongo2),i.channel.registerMonkeyPatch("mongodb",t.mongo3),i.channel.registerMonkeyPatch("mongodb",t.mongo330)}},55856:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(66932),i=r(71017);t.mysql={versionSpecifier:">= 2.0.0 < 3.0.0",patch:function(e,t){var o=function(e,t){return function(t,r){var i=e[t];i&&(e[t]=function(){for(var e=arguments.length-1,t=arguments.length-1;t>=0;--t){if("function"==typeof arguments[t]){e=t;break}if(void 0!==arguments[t])break}var o=arguments[e],s={result:null,startTime:null,startDate:null};"function"==typeof o&&(r?(s.startTime=process.hrtime(),s.startDate=new Date,arguments[e]=n.channel.bindToContext(r(s,o))):arguments[e]=n.channel.bindToContext(o));var a=i.apply(this,arguments);return s.result=a,a})}},s=function(e,t){return o(e.prototype)},a=r(1055)(i.dirname(t)+"/lib/Connection");["connect","changeUser","ping","statistics","end"].forEach((function(e){return s(a)(e)})),o(a)("createQuery",(function(e,t){return function(r){var i=process.hrtime(e.startTime),o=1e3*i[0]+i[1]/1e6|0;n.channel.publish("mysql",{query:e.result,callbackArgs:arguments,err:r,duration:o,time:e.startDate}),t.apply(this,arguments)}}));var c=r(76990)(i.dirname(t)+"/lib/Pool");return["_enqueueCallback"].forEach((function(e){return s(c)(e)})),e}},t.enable=function(){n.channel.registerMonkeyPatch("mysql",t.mysql)}},68345:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(66932);t.postgresPool1={versionSpecifier:">= 1.0.0 < 3.0.0",patch:function(e){var t=e.prototype.connect;return e.prototype.connect=function(e){return e&&(arguments[0]=n.channel.bindToContext(e)),t.apply(this,arguments)},e}},t.enable=function(){n.channel.registerMonkeyPatch("pg-pool",t.postgresPool1)}},67726:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(66932),i=r(82361);t.postgres6={versionSpecifier:"6.*",patch:function(e,t){var r=e.Client.prototype.query,o="__diagnosticOriginalFunc";return e.Client.prototype.query=function(e,t,s){var a,c={query:{},database:{host:this.connectionParameters.host,port:this.connectionParameters.port},result:null,error:null,duration:0,time:new Date},l=process.hrtime();function u(e){e&&e[o]&&(e=e[o]);var t=n.channel.bindToContext((function(t,r){var o=process.hrtime(l);if(c.result=r&&{rowCount:r.rowCount,command:r.command},c.error=t,c.duration=Math.ceil(1e3*o[0]+o[1]/1e6),n.channel.publish("postgres",c),t){if(e)return e.apply(this,arguments);a&&a instanceof i.EventEmitter&&a.emit("error",t)}else e&&e.apply(this,arguments)}));try{return Object.defineProperty(t,o,{value:e}),t}catch(t){return e}}try{"string"==typeof e?t instanceof Array?(c.query.preparable={text:e,args:t},s=u(s)):(c.query.text=e,s?s=u(s):t=u(t)):("string"==typeof e.name?c.query.plan=e.name:e.values instanceof Array?c.query.preparable={text:e.text,args:e.values}:c.query.text=e.text,s?s=u(s):t?t=u(t):e.callback=u(e.callback))}catch(e){return r.apply(this,arguments)}return arguments[0]=e,arguments[1]=t,arguments[2]=s,arguments.length=arguments.length>3?arguments.length:3,a=r.apply(this,arguments)},e}},t.postgres7={versionSpecifier:">=7.* <=8.*",patch:function(e,t){var r=e.Client.prototype.query,o="__diagnosticOriginalFunc";return e.Client.prototype.query=function(e,t,s){var a,c=this,l=!!s,u={query:{},database:{host:this.connectionParameters.host,port:this.connectionParameters.port},result:null,error:null,duration:0,time:new Date},d=process.hrtime();function p(e){e&&e[o]&&(e=e[o]);var t=n.channel.bindToContext((function(t,r){var o=process.hrtime(d);if(u.result=r&&{rowCount:r.rowCount,command:r.command},u.error=t,u.duration=Math.ceil(1e3*o[0]+o[1]/1e6),n.channel.publish("postgres",u),t){if(e)return e.apply(this,arguments);a&&a instanceof i.EventEmitter&&a.emit("error",t)}else e&&e.apply(this,arguments)}));try{return Object.defineProperty(t,o,{value:e}),t}catch(t){return e}}try{"string"==typeof e?t instanceof Array?(u.query.preparable={text:e,args:t},s=(l="function"==typeof s)?p(s):s):(u.query.text=e,s?s=(l="function"==typeof s)?p(s):s:t=(l="function"==typeof t)?p(t):t):("string"==typeof e.name?u.query.plan=e.name:e.values instanceof Array?u.query.preparable={text:e.text,args:e.values}:u.query.text=e.text,s?(l="function"==typeof s,s=p(s)):t?t=(l="function"==typeof t)?p(t):t:(l="function"==typeof e.callback,e.callback=l?p(e.callback):e.callback))}catch(e){return r.apply(this,arguments)}return arguments[0]=e,arguments[1]=t,arguments[2]=s,arguments.length=arguments.length>3?arguments.length:3,a=r.apply(this,arguments),l?a:a.then((function(e){return p()(void 0,e),new c._Promise((function(t,r){t(e)}))})).catch((function(e){return p()(e,void 0),new c._Promise((function(t,r){r(e)}))}))},e}},t.enable=function(){n.channel.registerMonkeyPatch("pg",t.postgres6),n.channel.registerMonkeyPatch("pg",t.postgres7)}},4765:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(66932);t.redis={versionSpecifier:">= 2.0.0 < 4.0.0",patch:function(e){var t=e.RedisClient.prototype.internal_send_command;return e.RedisClient.prototype.internal_send_command=function(e){if(e){var r=e.callback;if(!r||!r.pubsubBound){var i=this.address,o=process.hrtime(),s=new Date;e.callback=n.channel.bindToContext((function(t,a){var c=process.hrtime(o),l=1e3*c[0]+c[1]/1e6|0;n.channel.publish("redis",{duration:l,address:i,commandObj:e,err:t,result:a,time:s}),"function"==typeof r&&r.apply(this,arguments)})),e.callback.pubsubBound=!0}}return t.call(this,e)},e}},t.enable=function(){n.channel.registerMonkeyPatch("redis",t.redis)}},61624:function(e,t,r){"use strict";var n=this&&this.__assign||Object.assign||function(e){for(var t,r=1,n=arguments.length;r= 6.0.0 < 9.0.0",patch:function(e){var t=e.Connection.prototype.makeRequest;return e.Connection.prototype.makeRequest=function(){function e(e){var t=process.hrtime(),r={query:{},database:{host:null,port:null},result:null,error:null,duration:0};return i.channel.bindToContext((function(o,s,a){var c=process.hrtime(t);r=n({},r,{database:{host:this.connection.config.server,port:this.connection.config.options.port},result:!o&&{rowCount:s,rows:a},query:{text:this.parametersByName.statement.value},error:o,duration:Math.ceil(1e3*c[0]+c[1]/1e6)}),i.channel.publish("tedious",r),e.call(this,o,s,a)}))}var r=arguments[0];arguments[0].callback=e(r.callback),t.apply(this,arguments)},e}},t.enable=function(){i.channel.registerMonkeyPatch("tedious",t.tedious)}},88041:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);in[r]?i:r);this.add(new t(e,{level:r}))}var n=e.createLogger;e.createLogger=function(){var i,o=arguments[0].levels||e.config.npm.levels;for(var s in o)o.hasOwnProperty(s)&&(i=void 0===i||o[s]>o[i]?s:i);var a=n.apply(this,arguments);a.add(new t(e,{level:i}));var c=a.configure;return a.configure=function(){c.apply(this,arguments),r.apply(this,arguments)},a};var a=e.createLogger;return e.configure=function(){a.apply(this,arguments),r.apply(this,arguments)},e.add(new t(e)),e}},t.winston2={versionSpecifier:"2.x",patch:function(e){var t,r=e.Logger.prototype.log,n=function(r,n,i){var o;return o=t===e.config.npm.levels?"npm":t===e.config.syslog.levels?"syslog":"unknown",s.channel.publish("winston",{level:r,message:n,meta:i,levelKind:o}),n};return e.Logger.prototype.log=function(){return t=this.levels,this.filters&&0!==this.filters.length?this.filters[this.filters.length-1]!==n&&(this.filters=this.filters.filter((function(e){return e!==n})),this.filters.push(n)):this.filters=[n],r.apply(this,arguments)},e}},t.enable=function(){s.channel.registerMonkeyPatch("winston",t.winston2),s.channel.registerMonkeyPatch("winston",t.winston3)}},1055:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=1055,e.exports=t},76990:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=76990,e.exports=t},66932:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(8497),i=r(8497);t.makePatchingRequire=i.makePatchingRequire;var o=function(e){return!0},s=function(){function e(){this.version=r(99674).i8,this.subscribers={},this.contextPreservationFunction=function(e){return e},this.knownPatches={},this.currentlyPublishing=!1}return e.prototype.shouldPublish=function(e){var t=this.subscribers[e];return!!t&&t.some((function(e){var t=e.filter;return!t||t(!1)}))},e.prototype.publish=function(e,t){if(!this.currentlyPublishing){var r=this.subscribers[e];if(r){var n={timestamp:Date.now(),data:t};this.currentlyPublishing=!0,r.forEach((function(e){var t=e.listener,r=e.filter;try{r&&r(!0)&&t(n)}catch(e){}})),this.currentlyPublishing=!1}}},e.prototype.subscribe=function(e,t,r){void 0===r&&(r=o),this.subscribers[e]||(this.subscribers[e]=[]),this.subscribers[e].push({listener:t,filter:r})},e.prototype.unsubscribe=function(e,t,r){void 0===r&&(r=o);var n=this.subscribers[e];if(n)for(var i=0;i{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(71017),i=r(56190),o=r(98188),s=Object.keys(process.binding("natives")),a=o.prototype.require;t.makePatchingRequire=function(e){var t={};return function(r){var c=a.apply(this,arguments);if(e[r]){var l=o._resolveFilename(r,this);if(t.hasOwnProperty(l))return t[l];var u=void 0;if(s.indexOf(r)<0)try{u=a.call(this,n.join(r,"package.json")).version}catch(e){return c}else u=process.version.substring(1);var d=u.indexOf("-");d>=0&&(u=u.substring(0,d));for(var p=c,h=0,f=e[r];h{var r;t=e.exports=K,r="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},t.SEMVER_SPEC_VERSION="2.0.0";var n=Number.MAX_SAFE_INTEGER||9007199254740991,i=t.re=[],o=t.src=[],s=0,a=s++;o[a]="0|[1-9]\\d*";var c=s++;o[c]="[0-9]+";var l=s++;o[l]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var u=s++;o[u]="("+o[a]+")\\.("+o[a]+")\\.("+o[a]+")";var d=s++;o[d]="("+o[c]+")\\.("+o[c]+")\\.("+o[c]+")";var p=s++;o[p]="(?:"+o[a]+"|"+o[l]+")";var h=s++;o[h]="(?:"+o[c]+"|"+o[l]+")";var f=s++;o[f]="(?:-("+o[p]+"(?:\\."+o[p]+")*))";var g=s++;o[g]="(?:-?("+o[h]+"(?:\\."+o[h]+")*))";var m=s++;o[m]="[0-9A-Za-z-]+";var y=s++;o[y]="(?:\\+("+o[m]+"(?:\\."+o[m]+")*))";var v=s++,_="v?"+o[u]+o[f]+"?"+o[y]+"?";o[v]="^"+_+"$";var b="[v=\\s]*"+o[d]+o[g]+"?"+o[y]+"?",w=s++;o[w]="^"+b+"$";var C=s++;o[C]="((?:<|>)?=?)";var E=s++;o[E]=o[c]+"|x|X|\\*";var T=s++;o[T]=o[a]+"|x|X|\\*";var S=s++;o[S]="[v=\\s]*("+o[T]+")(?:\\.("+o[T]+")(?:\\.("+o[T]+")(?:"+o[f]+")?"+o[y]+"?)?)?";var x=s++;o[x]="[v=\\s]*("+o[E]+")(?:\\.("+o[E]+")(?:\\.("+o[E]+")(?:"+o[g]+")?"+o[y]+"?)?)?";var k=s++;o[k]="^"+o[C]+"\\s*"+o[S]+"$";var I=s++;o[I]="^"+o[C]+"\\s*"+o[x]+"$";var A=s++;o[A]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var P=s++;o[P]="(?:~>?)";var R=s++;o[R]="(\\s*)"+o[P]+"\\s+",i[R]=new RegExp(o[R],"g");var N=s++;o[N]="^"+o[P]+o[S]+"$";var O=s++;o[O]="^"+o[P]+o[x]+"$";var L=s++;o[L]="(?:\\^)";var D=s++;o[D]="(\\s*)"+o[L]+"\\s+",i[D]=new RegExp(o[D],"g");var M=s++;o[M]="^"+o[L]+o[S]+"$";var B=s++;o[B]="^"+o[L]+o[x]+"$";var F=s++;o[F]="^"+o[C]+"\\s*("+b+")$|^$";var j=s++;o[j]="^"+o[C]+"\\s*("+_+")$|^$";var U=s++;o[U]="(\\s*)"+o[C]+"\\s*("+b+"|"+o[S]+")",i[U]=new RegExp(o[U],"g");var $=s++;o[$]="^\\s*("+o[S]+")\\s+-\\s+("+o[S]+")\\s*$";var q=s++;o[q]="^\\s*("+o[x]+")\\s+-\\s+("+o[x]+")\\s*$";var H=s++;o[H]="(<|>)?=?\\s*\\*";for(var V=0;V<35;V++)r(V,o[V]),i[V]||(i[V]=new RegExp(o[V]));function z(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof K)return e;if("string"!=typeof e)return null;if(e.length>256)return null;if(!(t.loose?i[w]:i[v]).test(e))return null;try{return new K(e,t)}catch(e){return null}}function K(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof K){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>256)throw new TypeError("version is longer than 256 characters");if(!(this instanceof K))return new K(e,t);r("SemVer",e,t),this.options=t,this.loose=!!t.loose;var o=e.trim().match(t.loose?i[w]:i[v]);if(!o)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);-1===r&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},t.inc=function(e,t,r,n){"string"==typeof r&&(n=r,r=void 0);try{return new K(e,r).inc(t,n).version}catch(e){return null}},t.diff=function(e,t){if(X(e,t))return null;var r=z(e),n=z(t),i="";if(r.prerelease.length||n.prerelease.length){i="pre";var o="prerelease"}for(var s in r)if(("major"===s||"minor"===s||"patch"===s)&&r[s]!==n[s])return i+s;return o},t.compareIdentifiers=G;var W=/^[0-9]+$/;function G(e,t){var r=W.test(e),n=W.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:e0}function Y(e,t,r){return Q(e,t,r)<0}function X(e,t,r){return 0===Q(e,t,r)}function Z(e,t,r){return 0!==Q(e,t,r)}function ee(e,t,r){return Q(e,t,r)>=0}function te(e,t,r){return Q(e,t,r)<=0}function re(e,t,r,n){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return X(e,r,n);case"!=":return Z(e,r,n);case">":return J(e,r,n);case">=":return ee(e,r,n);case"<":return Y(e,r,n);case"<=":return te(e,r,n);default:throw new TypeError("Invalid operator: "+t)}}function ne(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof ne){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof ne))return new ne(e,t);r("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===ie?this.value="":this.value=this.operator+this.semver.version,r("comp",this)}t.rcompareIdentifiers=function(e,t){return G(t,e)},t.major=function(e,t){return new K(e,t).major},t.minor=function(e,t){return new K(e,t).minor},t.patch=function(e,t){return new K(e,t).patch},t.compare=Q,t.compareLoose=function(e,t){return Q(e,t,!0)},t.rcompare=function(e,t,r){return Q(t,e,r)},t.sort=function(e,r){return e.sort((function(e,n){return t.compare(e,n,r)}))},t.rsort=function(e,r){return e.sort((function(e,n){return t.rcompare(e,n,r)}))},t.gt=J,t.lt=Y,t.eq=X,t.neq=Z,t.gte=ee,t.lte=te,t.cmp=re,t.Comparator=ne;var ie={};function oe(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof oe)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new oe(e.raw,t);if(e instanceof ne)return new oe(e.value,t);if(!(this instanceof oe))return new oe(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function se(e){return!e||"x"===e.toLowerCase()||"*"===e}function ae(e,t,r,n,i,o,s,a,c,l,u,d,p){return((t=se(r)?"":se(n)?">="+r+".0.0":se(i)?">="+r+"."+n+".0":">="+t)+" "+(a=se(c)?"":se(l)?"<"+(+c+1)+".0.0":se(u)?"<"+c+"."+(+l+1)+".0":d?"<="+c+"."+l+"."+u+"-"+d:"<="+a)).trim()}function ce(e,t,n){for(var i=0;i0){var o=e[i].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch)return!0}return!1}return!0}function le(e,t,r){try{t=new oe(t,r)}catch(e){return!1}return t.test(e)}function ue(e,t,r,n){var i,o,s,a,c;switch(e=new K(e,n),t=new oe(t,n),r){case">":i=J,o=te,s=Y,a=">",c=">=";break;case"<":i=Y,o=ee,s=J,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(le(e,t,n))return!1;for(var l=0;l=0.0.0")),d=d||e,p=p||e,i(e.semver,d.semver,n)?d=e:s(e.semver,p.semver,n)&&(p=e)})),d.operator===a||d.operator===c)return!1;if((!p.operator||p.operator===a)&&o(e,p.semver))return!1;if(p.operator===c&&s(e,p.semver))return!1}return!0}ne.prototype.parse=function(e){var t=this.options.loose?i[F]:i[j],r=e.match(t);if(!r)throw new TypeError("Invalid comparator: "+e);this.operator=r[1],"="===this.operator&&(this.operator=""),r[2]?this.semver=new K(r[2],this.options.loose):this.semver=ie},ne.prototype.toString=function(){return this.value},ne.prototype.test=function(e){return r("Comparator.test",e,this.options.loose),this.semver===ie||("string"==typeof e&&(e=new K(e,this.options)),re(e,this.operator,this.semver,this.options))},ne.prototype.intersects=function(e,t){if(!(e instanceof ne))throw new TypeError("a Comparator is required");var r;if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return r=new oe(e.value,t),le(this.value,r,t);if(""===e.operator)return r=new oe(this.value,t),le(e.semver,r,t);var n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),o=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=re(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=re(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||i||o&&s||a||c},t.Range=oe,oe.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},oe.prototype.toString=function(){return this.range},oe.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var n=t?i[q]:i[$];e=e.replace(n,ae),r("hyphen replace",e),e=e.replace(i[U],"$1$2$3"),r("comparator trim",e,i[U]),e=(e=(e=e.replace(i[R],"$1~")).replace(i[D],"$1^")).split(/\s+/).join(" ");var o=t?i[F]:i[j],s=e.split(" ").map((function(e){return function(e,t){return r("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){r("caret",e,t);var n=t.loose?i[B]:i[M];return e.replace(n,(function(t,n,i,o,s){var a;return r("caret",e,t,n,i,o,s),se(n)?a="":se(i)?a=">="+n+".0.0 <"+(+n+1)+".0.0":se(o)?a="0"===n?">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0":">="+n+"."+i+".0 <"+(+n+1)+".0.0":s?(r("replaceCaret pr",s),a="0"===n?"0"===i?">="+n+"."+i+"."+o+"-"+s+" <"+n+"."+i+"."+(+o+1):">="+n+"."+i+"."+o+"-"+s+" <"+n+"."+(+i+1)+".0":">="+n+"."+i+"."+o+"-"+s+" <"+(+n+1)+".0.0"):(r("no pr"),a="0"===n?"0"===i?">="+n+"."+i+"."+o+" <"+n+"."+i+"."+(+o+1):">="+n+"."+i+"."+o+" <"+n+"."+(+i+1)+".0":">="+n+"."+i+"."+o+" <"+(+n+1)+".0.0"),r("caret return",a),a}))}(e,t)})).join(" ")}(e,t),r("caret",e),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){var n=t.loose?i[O]:i[N];return e.replace(n,(function(t,n,i,o,s){var a;return r("tilde",e,t,n,i,o,s),se(n)?a="":se(i)?a=">="+n+".0.0 <"+(+n+1)+".0.0":se(o)?a=">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0":s?(r("replaceTilde pr",s),a=">="+n+"."+i+"."+o+"-"+s+" <"+n+"."+(+i+1)+".0"):a=">="+n+"."+i+"."+o+" <"+n+"."+(+i+1)+".0",r("tilde return",a),a}))}(e,t)})).join(" ")}(e,t),r("tildes",e),e=function(e,t){return r("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return function(e,t){e=e.trim();var n=t.loose?i[I]:i[k];return e.replace(n,(function(t,n,i,o,s,a){r("xRange",e,t,n,i,o,s,a);var c=se(i),l=c||se(o),u=l||se(s);return"="===n&&u&&(n=""),c?t=">"===n||"<"===n?"<0.0.0":"*":n&&u?(l&&(o=0),s=0,">"===n?(n=">=",l?(i=+i+1,o=0,s=0):(o=+o+1,s=0)):"<="===n&&(n="<",l?i=+i+1:o=+o+1),t=n+i+"."+o+"."+s):l?t=">="+i+".0.0 <"+(+i+1)+".0.0":u&&(t=">="+i+"."+o+".0 <"+i+"."+(+o+1)+".0"),r("xRange return",t),t}))}(e,t)})).join(" ")}(e,t),r("xrange",e),e=function(e,t){return r("replaceStars",e,t),e.trim().replace(i[H],"")}(e,t),r("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(s=s.filter((function(e){return!!e.match(o)}))),s.map((function(e){return new ne(e,this.options)}),this)},oe.prototype.intersects=function(e,t){if(!(e instanceof oe))throw new TypeError("a Range is required");return this.set.some((function(r){return r.every((function(r){return e.set.some((function(e){return e.every((function(e){return r.intersects(e,t)}))}))}))}))},t.toComparators=function(e,t){return new oe(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},oe.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new K(e,this.options));for(var t=0;t":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":r&&!J(r,t)||(r=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}));return r&&e.test(r)?r:null},t.validRange=function(e,t){try{return new oe(e,t).range||"*"}catch(e){return null}},t.ltr=function(e,t,r){return ue(e,t,"<",r)},t.gtr=function(e,t,r){return ue(e,t,">",r)},t.outside=ue,t.prerelease=function(e,t){var r=z(e,t);return r&&r.prerelease.length?r.prerelease:null},t.intersects=function(e,t,r){return e=new oe(e,r),t=new oe(t,r),e.intersects(t)},t.coerce=function(e){if(e instanceof K)return e;if("string"!=typeof e)return null;var t=e.match(i[A]);return null==t?null:z(t[1]+"."+(t[2]||"0")+"."+(t[3]||"0"))}},7267:(e,t,r)=>{"use strict";var n=r(94403),i=n.wrap,o=n.unwrap,s="wrap@before";function a(e,t,r){var n=!!e[t]&&e.propertyIsEnumerable(t);Object.defineProperty(e,t,{configurable:!0,enumerable:n,writable:!0,value:r})}function c(e,t){var r;return r=e._events&&e._events[t],Array.isArray(r)||(r=r?[r]:[]),r}function l(e,t){if(e){var r=e;if("function"==typeof e)r=t(e);else if(Array.isArray(e)){r=[];for(var n=0;n0&&function(e,t){for(var r=t.length,n=0;n{"use strict";e.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(i=n;0!=i--;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(o=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(i=n;0!=i--;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;0!=i--;){var s=o[i];if(!e(t[s],r[s]))return!1}return!0}return t!=t&&r!=r}},12414:(e,t,r)=>{"use strict";const n=r(41808);class i extends Error{constructor(e){super(`${e} is locked`)}}const o={old:new Set,young:new Set};let s;const a=e=>new Promise(((t,r)=>{const i=n.createServer();i.unref(),i.on("error",r),i.listen(e,(()=>{const{port:e}=i.address();i.close((()=>{t(e)}))}))}));e.exports=async e=>{let t;e&&(t="number"==typeof e.port?[e.port]:e.port),void 0===s&&(s=setInterval((()=>{o.old=o.young,o.young=new Set}),15e3),s.unref&&s.unref());for(const r of function*(e){e&&(yield*e),yield 0}(t))try{let t=await a({...e,port:r});for(;o.old.has(t)||o.young.has(t);){if(0!==r)throw new i(r);t=await a({...e,port:r})}return o.young.add(t),t}catch(e){if(!(["EADDRINUSE","EACCES"].includes(e.code)||e instanceof i))throw e}throw new Error("No available ports found")},e.exports.makeRange=(e,t)=>{if(!Number.isInteger(e)||!Number.isInteger(t))throw new TypeError("`from` and `to` must be integer numbers");if(e<1024||e>65535)throw new RangeError("`from` must be between 1024 and 65535");if(t<1024||t>65536)throw new RangeError("`to` must be between 1024 and 65536");if(t{"use strict";var n=r(91320),i=r(68049);e.exports=function(e){var t=n(e);return t.token="","x-oauth-basic"===t.password?t.token=t.user:"x-token-auth"===t.user&&(t.token=t.password),i(t.protocols)||0===t.protocols.length&&i(e)?t.protocol="ssh":t.protocols.length?t.protocol=t.protocols[0]:(t.protocol="file",t.protocols=["file"]),t.href=t.href.replace(/\/$/,""),t}},36314:(e,t,r)=>{"use strict";var n=r(57418);function i(e){if("string"!=typeof e)throw new Error("The url must be a string.");/^([a-z\d-]{1,39})\/([-\.\w]{1,100})$/i.test(e)&&(e="https://github.com/"+e);var t=n(e),r=t.resource.split("."),o=null;switch(t.toString=function(e){return i.stringify(this,e)},t.source=r.length>2?r.slice(1-r.length).join("."):t.source=t.resource,t.git_suffix=/\.git$/.test(t.pathname),t.name=decodeURIComponent((t.pathname||t.href).replace(/(^\/)|(\/$)/g,"").replace(/\.git$/,"")),t.owner=decodeURIComponent(t.user),t.source){case"git.cloudforge.com":t.owner=t.user,t.organization=r[0],t.source="cloudforge.com";break;case"visualstudio.com":if("vs-ssh.visualstudio.com"===t.resource){4===(o=t.name.split("/")).length&&(t.organization=o[1],t.owner=o[2],t.name=o[3],t.full_name=o[2]+"/"+o[3]);break}2===(o=t.name.split("/")).length?(t.owner=o[1],t.name=o[1],t.full_name="_git/"+t.name):3===o.length?(t.name=o[2],"DefaultCollection"===o[0]?(t.owner=o[2],t.organization=o[0],t.full_name=t.organization+"/_git/"+t.name):(t.owner=o[0],t.full_name=t.owner+"/_git/"+t.name)):4===o.length&&(t.organization=o[0],t.owner=o[1],t.name=o[3],t.full_name=t.organization+"/"+t.owner+"/_git/"+t.name);break;case"dev.azure.com":case"azure.com":if("ssh.dev.azure.com"===t.resource){4===(o=t.name.split("/")).length&&(t.organization=o[1],t.owner=o[2],t.name=o[3]);break}5===(o=t.name.split("/")).length?(t.organization=o[0],t.owner=o[1],t.name=o[4],t.full_name="_git/"+t.name):3===o.length?(t.name=o[2],"DefaultCollection"===o[0]?(t.owner=o[2],t.organization=o[0],t.full_name=t.organization+"/_git/"+t.name):(t.owner=o[0],t.full_name=t.owner+"/_git/"+t.name)):4===o.length&&(t.organization=o[0],t.owner=o[1],t.name=o[3],t.full_name=t.organization+"/"+t.owner+"/_git/"+t.name),t.query&&t.query.path&&(t.filepath=t.query.path.replace(/^\/+/g,"")),t.query&&t.query.version&&(t.ref=t.query.version.replace(/^GB/,""));break;default:var s=(o=t.name.split("/")).length-1;if(o.length>=2){var a=o.indexOf("-",2),c=o.indexOf("blob",2),l=o.indexOf("tree",2),u=o.indexOf("commit",2),d=o.indexOf("src",2),p=o.indexOf("raw",2),h=o.indexOf("edit",2);s=a>0?a-1:c>0?c-1:l>0?l-1:u>0?u-1:d>0?d-1:p>0?p-1:h>0?h-1:s,t.owner=o.slice(0,s).join("/"),t.name=o[s],u&&(t.commit=o[s+2])}t.ref="",t.filepathtype="",t.filepath="";var f=o.length>s&&"-"===o[s+1]?s+1:s;o.length>f+2&&["raw","src","blob","tree","edit"].indexOf(o[f+1])>=0&&(t.filepathtype=o[f+1],t.ref=o[f+2],o.length>f+3&&(t.filepath=o.slice(f+3).join("/"))),t.organization=t.owner}t.full_name||(t.full_name=t.owner,t.name&&(t.full_name&&(t.full_name+="/"),t.full_name+=t.name)),t.owner.startsWith("scm/")&&(t.source="bitbucket-server",t.owner=t.owner.replace("scm/",""),t.organization=t.owner,t.full_name=t.owner+"/"+t.name);var g=/(projects|users)\/(.*?)\/repos\/(.*?)((\/.*$)|$)/.exec(t.pathname);return null!=g&&(t.source="bitbucket-server","users"===g[1]?t.owner="~"+g[2]:t.owner=g[2],t.organization=t.owner,t.name=g[3],(o=g[4].split("/")).length>1&&(["raw","browse"].indexOf(o[1])>=0?(t.filepathtype=o[1],o.length>2&&(t.filepath=o.slice(2).join("/"))):"commits"===o[1]&&o.length>2&&(t.commit=o[2])),t.full_name=t.owner+"/"+t.name,t.query.at?t.ref=t.query.at:t.ref=""),t}i.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":return t+"://"+(e.token?function(e){return"bitbucket.org"===e.source?"x-token-auth:"+e.token+"@":e.token+"@"}(e):e.user&&(e.protocols.includes("http")||e.protocols.includes("https"))?e.user+"@":"")+e.resource+r+"/"+function(e){return"bitbucket-server"===e.source?"scm/"+e.full_name:""+e.full_name}(e)+i;default:return e.href}},e.exports=i},41875:e=>{"use strict";e.exports=(e,t)=>{t=t||process.argv;const r=e.startsWith("-")?"":1===e.length?"-":"--",n=t.indexOf(r+e),i=t.indexOf("--");return-1!==n&&(-1===i||n{"use strict";const t=new Set([200,203,204,206,300,301,404,405,410,414,501]),r=new Set([200,203,204,300,301,302,303,307,308,404,405,410,414,501]),n=new Set([500,502,503,504]),i={date:!0,connection:!0,"keep-alive":!0,"proxy-authenticate":!0,"proxy-authorization":!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0},o={"content-length":!0,"content-encoding":!0,"transfer-encoding":!0,"content-range":!0};function s(e){const t=parseInt(e,10);return isFinite(t)?t:0}function a(e){const t={};if(!e)return t;const r=e.trim().split(/\s*,\s*/);for(const e of r){const[r,n]=e.split(/\s*=\s*/,2);t[r]=void 0===n||n.replace(/^"|"$/g,"")}return t}function c(e){let t=[];for(const r in e){const n=e[r];t.push(!0===n?r:r+"="+n)}if(t.length)return t.join(", ")}e.exports=class{constructor(e,t,{shared:r,cacheHeuristic:n,immutableMinTimeToLive:i,ignoreCargoCult:o,_fromObject:s}={}){if(s)this._fromObject(s);else{if(!t||!t.headers)throw Error("Response headers missing");this._assertRequestHasHeaders(e),this._responseTime=this.now(),this._isShared=!1!==r,this._cacheHeuristic=void 0!==n?n:.1,this._immutableMinTtl=void 0!==i?i:864e5,this._status="status"in t?t.status:200,this._resHeaders=t.headers,this._rescc=a(t.headers["cache-control"]),this._method="method"in e?e.method:"GET",this._url=e.url,this._host=e.headers.host,this._noAuthorization=!e.headers.authorization,this._reqHeaders=t.headers.vary?e.headers:null,this._reqcc=a(e.headers["cache-control"]),o&&"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":c(this._rescc)}),delete this._resHeaders.expires,delete this._resHeaders.pragma),null==t.headers["cache-control"]&&/no-cache/.test(t.headers.pragma)&&(this._rescc["no-cache"]=!0)}}now(){return Date.now()}storable(){return!(this._reqcc["no-store"]||!("GET"===this._method||"HEAD"===this._method||"POST"===this._method&&this._hasExplicitExpiration())||!r.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||t.has(this._status)))}_hasExplicitExpiration(){return this._isShared&&this._rescc["s-maxage"]||this._rescc["max-age"]||this._resHeaders.expires}_assertRequestHasHeaders(e){if(!e||!e.headers)throw Error("Request headers missing")}satisfiesWithoutRevalidation(e){this._assertRequestHasHeaders(e);const t=a(e.headers["cache-control"]);return!t["no-cache"]&&!/no-cache/.test(e.headers.pragma)&&(!(t["max-age"]&&this.age()>t["max-age"])&&(!(t["min-fresh"]&&this.timeToLive()<1e3*t["min-fresh"])&&(!(this.stale()&&(!t["max-stale"]||this._rescc["must-revalidate"]||!(!0===t["max-stale"]||t["max-stale"]>this.age()-this.maxAge())))&&this._requestMatches(e,!1))))}_requestMatches(e,t){return(!this._url||this._url===e.url)&&this._host===e.headers.host&&(!e.method||this._method===e.method||t&&"HEAD"===e.method)&&this._varyMatches(e)}_allowsStoringAuthenticated(){return this._rescc["must-revalidate"]||this._rescc.public||this._rescc["s-maxage"]}_varyMatches(e){if(!this._resHeaders.vary)return!0;if("*"===this._resHeaders.vary)return!1;const t=this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/);for(const r of t)if(e.headers[r]!==this._reqHeaders[r])return!1;return!0}_copyWithoutHopByHopHeaders(e){const t={};for(const r in e)i[r]||(t[r]=e[r]);if(e.connection){const r=e.connection.trim().split(/\s*,\s*/);for(const e of r)delete t[e]}if(t.warning){const e=t.warning.split(/,/).filter((e=>!/^\s*1[0-9][0-9]/.test(e)));e.length?t.warning=e.join(",").trim():delete t.warning}return t}responseHeaders(){const e=this._copyWithoutHopByHopHeaders(this._resHeaders),t=this.age();return t>86400&&!this._hasExplicitExpiration()&&this.maxAge()>86400&&(e.warning=(e.warning?`${e.warning}, `:"")+'113 - "rfc7234 5.5.4"'),e.age=`${Math.round(t)}`,e.date=new Date(this.now()).toUTCString(),e}date(){const e=Date.parse(this._resHeaders.date);return isFinite(e)?e:this._responseTime}age(){return this._ageValue()+(this.now()-this._responseTime)/1e3}_ageValue(){return s(this._resHeaders.age)}maxAge(){if(!this.storable()||this._rescc["no-cache"])return 0;if(this._isShared&&this._resHeaders["set-cookie"]&&!this._rescc.public&&!this._rescc.immutable)return 0;if("*"===this._resHeaders.vary)return 0;if(this._isShared){if(this._rescc["proxy-revalidate"])return 0;if(this._rescc["s-maxage"])return s(this._rescc["s-maxage"])}if(this._rescc["max-age"])return s(this._rescc["max-age"]);const e=this._rescc.immutable?this._immutableMinTtl:0,t=this.date();if(this._resHeaders.expires){const r=Date.parse(this._resHeaders.expires);return Number.isNaN(r)||rr)return Math.max(e,(t-r)/1e3*this._cacheHeuristic)}return e}timeToLive(){const e=this.maxAge()-this.age(),t=e+s(this._rescc["stale-if-error"]),r=e+s(this._rescc["stale-while-revalidate"]);return 1e3*Math.max(0,e,t,r)}stale(){return this.maxAge()<=this.age()}_useStaleIfError(){return this.maxAge()+s(this._rescc["stale-if-error"])>this.age()}useStaleWhileRevalidate(){return this.maxAge()+s(this._rescc["stale-while-revalidate"])>this.age()}static fromObject(e){return new this(void 0,void 0,{_fromObject:e})}_fromObject(e){if(this._responseTime)throw Error("Reinitialized");if(!e||1!==e.v)throw Error("Invalid serialization");this._responseTime=e.t,this._isShared=e.sh,this._cacheHeuristic=e.ch,this._immutableMinTtl=void 0!==e.imm?e.imm:864e5,this._status=e.st,this._resHeaders=e.resh,this._rescc=e.rescc,this._method=e.m,this._url=e.u,this._host=e.h,this._noAuthorization=e.a,this._reqHeaders=e.reqh,this._reqcc=e.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(e){this._assertRequestHasHeaders(e);const t=this._copyWithoutHopByHopHeaders(e.headers);if(delete t["if-range"],!this._requestMatches(e,!0)||!this.storable())return delete t["if-none-match"],delete t["if-modified-since"],t;if(this._resHeaders.etag&&(t["if-none-match"]=t["if-none-match"]?`${t["if-none-match"]}, ${this._resHeaders.etag}`:this._resHeaders.etag),t["accept-ranges"]||t["if-match"]||t["if-unmodified-since"]||this._method&&"GET"!=this._method){if(delete t["if-modified-since"],t["if-none-match"]){const e=t["if-none-match"].split(/,/).filter((e=>!/^\s*W\//.test(e)));e.length?t["if-none-match"]=e.join(",").trim():delete t["if-none-match"]}}else this._resHeaders["last-modified"]&&!t["if-modified-since"]&&(t["if-modified-since"]=this._resHeaders["last-modified"]);return t}revalidatedPolicy(e,t){if(this._assertRequestHasHeaders(e),this._useStaleIfError()&&function(e){return!e||n.has(e.status)}(t))return{modified:!1,matches:!1,policy:this};if(!t||!t.headers)throw Error("Response headers missing");let r=!1;if(void 0!==t.status&&304!=t.status?r=!1:t.headers.etag&&!/^\s*W\//.test(t.headers.etag)?r=this._resHeaders.etag&&this._resHeaders.etag.replace(/^\s*W\//,"")===t.headers.etag:this._resHeaders.etag&&t.headers.etag?r=this._resHeaders.etag.replace(/^\s*W\//,"")===t.headers.etag.replace(/^\s*W\//,""):this._resHeaders["last-modified"]?r=this._resHeaders["last-modified"]===t.headers["last-modified"]:this._resHeaders.etag||this._resHeaders["last-modified"]||t.headers.etag||t.headers["last-modified"]||(r=!0),!r)return{policy:new this.constructor(e,t),modified:304!=t.status,matches:!1};const i={};for(const e in this._resHeaders)i[e]=e in t.headers&&!o[e]?t.headers[e]:this._resHeaders[e];const s=Object.assign({},t,{status:this._status,method:this._method,headers:i});return{policy:new this.constructor(e,s,{shared:this._isShared,cacheHeuristic:this._cacheHeuristic,immutableMinTimeToLive:this._immutableMinTtl}),modified:!1,matches:!0}}}},60660:()=>{},91225:()=>{},67546:(e,t,r)=>{"use strict";const n=r(57147);let i;e.exports=()=>(void 0===i&&(i=function(){try{return n.statSync("/.dockerenv"),!0}catch(e){return!1}}()||function(){try{return n.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch(e){return!1}}()),i)},53571:e=>{e.exports=function(){return"undefined"!=typeof window&&"object"==typeof window.process&&"renderer"===window.process.type||!("undefined"==typeof process||"object"!=typeof process.versions||!process.versions.electron)||"object"==typeof navigator&&"string"==typeof navigator.userAgent&&navigator.userAgent.indexOf("Electron")>=0}},68049:(e,t,r)=>{"use strict";var n=r(38173);e.exports=function e(t){if(Array.isArray(t))return-1!==t.indexOf("ssh")||-1!==t.indexOf("rsync");if("string"!=typeof t)return!1;var r=n(t);if(t=t.substring(t.indexOf("://")+3),e(r))return!0;var i=new RegExp(".([a-zA-Z\\d]+):(\\d+)/");return!t.match(i)&&t.indexOf("@"){"use strict";const n=r(22037),i=r(57147),o=r(67546),s=()=>{if("linux"!==process.platform)return!1;if(n.release().toLowerCase().includes("microsoft"))return!o();try{return!!i.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")&&!o()}catch(e){return!1}};process.env.__IS_WSL_TEST__?e.exports=s:e.exports=s()},25127:e=>{"use strict";var t=e.exports=function(e,t,n){"function"==typeof t&&(n=t,t={}),r(t,"function"==typeof(n=t.cb||n)?n:n.pre||function(){},n.post||function(){},e,"",e)};function r(e,n,i,o,s,a,c,l,u,d){if(o&&"object"==typeof o&&!Array.isArray(o)){for(var p in n(o,s,a,c,l,u,d),o){var h=o[p];if(Array.isArray(h)){if(p in t.arrayKeywords)for(var f=0;f{var t=1e3,r=60*t,n=60*r,i=24*n;function o(e,t,r,n){var i=t>=1.5*r;return Math.round(e/r)+" "+n+(i?"s":"")}e.exports=function(e,s){s=s||{};var a,c,l=typeof e;if("string"===l&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var o=/^(-?(?:\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(o){var s=parseFloat(o[1]);switch((o[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return 6048e5*s;case"days":case"day":case"d":return s*i;case"hours":case"hour":case"hrs":case"hr":case"h":return s*n;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(e);if("number"===l&&isFinite(e))return s.long?(a=e,(c=Math.abs(a))>=i?o(a,c,i,"day"):c>=n?o(a,c,n,"hour"):c>=r?o(a,c,r,"minute"):c>=t?o(a,c,t,"second"):a+" ms"):function(e){var o=Math.abs(e);return o>=i?Math.round(e/i)+"d":o>=n?Math.round(e/n)+"h":o>=r?Math.round(e/r)+"m":o>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},60070:(e,t,r)=>{var n=r(56105);function i(e,t){n.cipher.registerAlgorithm(e,(function(){return new n.aes.Algorithm(e,t)}))}r(27140),r(30445),r(56827),e.exports=n.aes=n.aes||{},n.aes.startEncrypting=function(e,t,r,n){var i=f({key:e,output:r,decrypt:!1,mode:n});return i.start(t),i},n.aes.createEncryptionCipher=function(e,t){return f({key:e,output:null,decrypt:!1,mode:t})},n.aes.startDecrypting=function(e,t,r,n){var i=f({key:e,output:r,decrypt:!0,mode:n});return i.start(t),i},n.aes.createDecryptionCipher=function(e,t){return f({key:e,output:null,decrypt:!0,mode:t})},n.aes.Algorithm=function(e,t){u||d();var r=this;r.name=e,r.mode=new t({blockSize:16,cipher:{encrypt:function(e,t){return h(r._w,e,t,!1)},decrypt:function(e,t){return h(r._w,e,t,!0)}}}),r._init=!1},n.aes.Algorithm.prototype.initialize=function(e){if(!this._init){var t,r=e.key;if("string"!=typeof r||16!==r.length&&24!==r.length&&32!==r.length){if(n.util.isArray(r)&&(16===r.length||24===r.length||32===r.length)){t=r,r=n.util.createBuffer();for(var i=0;i>>=2,i=0;i>8^255&d^99,o[g]=d,s[d]=g,h=(p=e[d])<<24^d<<16^d<<8^d^p,f=((r=e[g])^(n=e[r])^(i=e[n]))<<24^(g^i)<<16^(g^n^i)<<8^g^r^i;for(var y=0;y<4;++y)c[y][g]=h,l[y][d]=f,h=h<<24|h>>>8,f=f<<24|f>>>8;0===g?g=m=1:(g=r^e[e[e[r^i]]],m^=e[e[m]])}}function p(e,t){for(var r,n=e.slice(0),i=1,s=n.length,c=4*(s+6+1),u=s;u>>16&255]<<24^o[r>>>8&255]<<16^o[255&r]<<8^o[r>>>24]^a[i]<<24,i++):s>6&&u%s==4&&(r=o[r>>>24]<<24^o[r>>>16&255]<<16^o[r>>>8&255]<<8^o[255&r]),n[u]=n[u-s]^r;if(t){for(var d,p=l[0],h=l[1],f=l[2],g=l[3],m=n.slice(0),y=(u=0,(c=n.length)-4);u>>24]]^h[o[d>>>16&255]]^f[o[d>>>8&255]]^g[o[255&d]];n=m}return n}function h(e,t,r,n){var i,a,u,d,p,h,f,g,m,y,v,_,b=e.length/4-1;n?(i=l[0],a=l[1],u=l[2],d=l[3],p=s):(i=c[0],a=c[1],u=c[2],d=c[3],p=o),h=t[0]^e[0],f=t[n?3:1]^e[1],g=t[2]^e[2],m=t[n?1:3]^e[3];for(var w=3,C=1;C>>24]^a[f>>>16&255]^u[g>>>8&255]^d[255&m]^e[++w],v=i[f>>>24]^a[g>>>16&255]^u[m>>>8&255]^d[255&h]^e[++w],_=i[g>>>24]^a[m>>>16&255]^u[h>>>8&255]^d[255&f]^e[++w],m=i[m>>>24]^a[h>>>16&255]^u[f>>>8&255]^d[255&g]^e[++w],h=y,f=v,g=_;r[0]=p[h>>>24]<<24^p[f>>>16&255]<<16^p[g>>>8&255]<<8^p[255&m]^e[++w],r[n?3:1]=p[f>>>24]<<24^p[g>>>16&255]<<16^p[m>>>8&255]<<8^p[255&h]^e[++w],r[2]=p[g>>>24]<<24^p[m>>>16&255]<<16^p[h>>>8&255]<<8^p[255&f]^e[++w],r[n?1:3]=p[m>>>24]<<24^p[h>>>16&255]<<16^p[f>>>8&255]<<8^p[255&g]^e[++w]}function f(e){var t,r="AES-"+((e=e||{}).mode||"CBC").toUpperCase(),i=(t=e.decrypt?n.cipher.createDecipher(r,e.key):n.cipher.createCipher(r,e.key)).start;return t.start=function(e,r){var o=null;r instanceof n.util.ByteBuffer&&(o=r,r={}),(r=r||{}).output=o,r.iv=e,i.call(t,r)},t}},63063:(e,t,r)=>{var n=r(56105);r(60070),r(78653);var i=e.exports=n.tls;function o(e,t,r){var o=t.entity===n.tls.ConnectionEnd.client;e.read.cipherState={init:!1,cipher:n.cipher.createDecipher("AES-CBC",o?r.keys.server_write_key:r.keys.client_write_key),iv:o?r.keys.server_write_IV:r.keys.client_write_IV},e.write.cipherState={init:!1,cipher:n.cipher.createCipher("AES-CBC",o?r.keys.client_write_key:r.keys.server_write_key),iv:o?r.keys.client_write_IV:r.keys.server_write_IV},e.read.cipherFunction=l,e.write.cipherFunction=s,e.read.macLength=e.write.macLength=r.mac_length,e.read.macFunction=e.write.macFunction=i.hmac_sha1}function s(e,t){var r,o=!1,s=t.macFunction(t.macKey,t.sequenceNumber,e);e.fragment.putBytes(s),t.updateSequenceNumber(),r=e.version.minor===i.Versions.TLS_1_0.minor?t.cipherState.init?null:t.cipherState.iv:n.random.getBytesSync(16),t.cipherState.init=!0;var c=t.cipherState.cipher;return c.start({iv:r}),e.version.minor>=i.Versions.TLS_1_1.minor&&c.output.putBytes(r),c.update(e.fragment),c.finish(a)&&(e.fragment=c.output,e.length=e.fragment.length(),o=!0),o}function a(e,t,r){if(!r){var n=e-t.length()%e;t.fillWithByte(n-1,n)}return!0}function c(e,t,r){var n=!0;if(r){for(var i=t.length(),o=t.last(),s=i-1-o;s=a?(e.fragment=s.output.getBytes(u-a),l=s.output.getBytes(a)):e.fragment=s.output.getBytes(),e.fragment=n.util.createBuffer(e.fragment),e.length=e.fragment.length();var d=t.macFunction(t.macKey,t.sequenceNumber,e);return t.updateSequenceNumber(),o=function(e,t,r){var i=n.hmac.create();return i.start("SHA1",e),i.update(t),t=i.digest().getBytes(),i.start(null,null),i.update(r),t===(r=i.digest().getBytes())}(t.macKey,l,d)&&o,o}i.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:function(e){e.bulk_cipher_algorithm=i.BulkCipherAlgorithm.aes,e.cipher_type=i.CipherType.block,e.enc_key_length=16,e.block_length=16,e.fixed_iv_length=16,e.record_iv_length=16,e.mac_algorithm=i.MACAlgorithm.hmac_sha1,e.mac_length=20,e.mac_key_length=20},initConnectionState:o},i.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA={id:[0,53],name:"TLS_RSA_WITH_AES_256_CBC_SHA",initSecurityParameters:function(e){e.bulk_cipher_algorithm=i.BulkCipherAlgorithm.aes,e.cipher_type=i.CipherType.block,e.enc_key_length=32,e.block_length=16,e.fixed_iv_length=16,e.record_iv_length=16,e.mac_algorithm=i.MACAlgorithm.hmac_sha1,e.mac_length=20,e.mac_key_length=20},initConnectionState:o}},89796:(e,t,r)=>{var n=r(56105);r(61057);var i=n.asn1;t.privateKeyValidator={name:"PrivateKeyInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},t.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{tagClass:i.Class.UNIVERSAL,type:i.Type.BITSTRING,constructed:!1,composed:!0,captureBitStringValue:"ed25519PublicKey"}]}},61057:(e,t,r)=>{var n=r(56105);r(56827),r(81877);var i=e.exports=n.asn1=n.asn1||{};function o(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}}function s(e,t,r,n){var a;o(e,t,2);var c=e.getByte();t--;var l=192&c,u=31&c;a=e.length();var d,p,h=function(e,t){var r=e.getByte();if(t--,128!==r){var n;if(128&r){var i=127&r;o(e,t,i),n=e.getInt(i<<3)}else n=r;if(n<0)throw new Error("Negative length: "+n);return n}}(e,t);if(t-=a-e.length(),void 0!==h&&h>t){if(n.strict){var f=new Error("Too few bytes to read ASN.1 value.");throw f.available=e.length(),f.remaining=t,f.requested=h,f}h=t}var g=32==(32&c);if(g)if(d=[],void 0===h)for(;;){if(o(e,t,2),e.bytes(2)===String.fromCharCode(0,0)){e.getBytes(2),t-=2;break}a=e.length(),d.push(s(e,t,r+1,n)),t-=a-e.length()}else for(;h>0;)a=e.length(),d.push(s(e,h,r+1,n)),t-=a-e.length(),h-=a-e.length();if(void 0===d&&l===i.Class.UNIVERSAL&&u===i.Type.BITSTRING&&(p=e.bytes(h)),void 0===d&&n.decodeBitStrings&&l===i.Class.UNIVERSAL&&u===i.Type.BITSTRING&&h>1){var m=e.read,y=t,v=0;if(u===i.Type.BITSTRING&&(o(e,t,1),v=e.getByte(),t--),0===v)try{a=e.length();var _=s(e,t,r+1,{strict:!0,decodeBitStrings:!0}),b=a-e.length();t-=b,u==i.Type.BITSTRING&&b++;var w=_.tagClass;b!==h||w!==i.Class.UNIVERSAL&&w!==i.Class.CONTEXT_SPECIFIC||(d=[_])}catch(e){}void 0===d&&(e.read=m,t=y)}if(void 0===d){if(void 0===h){if(n.strict)throw new Error("Non-constructed ASN.1 object of indefinite length.");h=t}if(u===i.Type.BMPSTRING)for(d="";h>0;h-=2)o(e,t,2),d+=String.fromCharCode(e.getInt16()),t-=2;else d=e.getBytes(h),t-=h}var C=void 0===p?null:{bitStringContents:p};return i.create(l,u,g,d,C)}i.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192},i.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},i.create=function(e,t,r,o,s){if(n.util.isArray(o)){for(var a=[],c=0;c1&&(0===e.value.charCodeAt(0)&&0==(128&e.value.charCodeAt(1))||255===e.value.charCodeAt(0)&&128==(128&e.value.charCodeAt(1)))?o.putBytes(e.value.substr(1)):o.putBytes(e.value);if(t.putByte(r),o.length()<=127)t.putByte(127&o.length());else{var c=o.length(),l="";do{l+=String.fromCharCode(255&c),c>>>=8}while(c>0);for(t.putByte(128|l.length),a=l.length-1;a>=0;--a)t.putByte(l.charCodeAt(a))}return t.putBuffer(o),t},i.oidToDer=function(e){var t,r,i,o,s=e.split("."),a=n.util.createBuffer();a.putByte(40*parseInt(s[0],10)+parseInt(s[1],10));for(var c=2;c>>=7,t||(o|=128),r.push(o),t=!1}while(i>0);for(var l=r.length-1;l>=0;--l)a.putByte(r[l])}return a},i.derToOid=function(e){var t;"string"==typeof e&&(e=n.util.createBuffer(e));var r=e.getByte();t=Math.floor(r/40)+"."+r%40;for(var i=0;e.length()>0;)i<<=7,128&(r=e.getByte())?i+=127&r:(t+="."+(i+r),i=0);return t},i.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),s=parseInt(e.substr(8,2),10),a=0;if(e.length>11){var c=e.charAt(10),l=10;"+"!==c&&"-"!==c&&(a=parseInt(e.substr(10,2),10),l+=2)}if(t.setUTCFullYear(r,n,i),t.setUTCHours(o,s,a,0),l&&("+"===(c=e.charAt(l))||"-"===c)){var u=60*parseInt(e.substr(l+1,2),10)+parseInt(e.substr(l+4,2),10);u*=6e4,"+"===c?t.setTime(+t-u):t.setTime(+t+u)}return t},i.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),s=parseInt(e.substr(10,2),10),a=parseInt(e.substr(12,2),10),c=0,l=0,u=!1;"Z"===e.charAt(e.length-1)&&(u=!0);var d=e.length-5,p=e.charAt(d);return"+"!==p&&"-"!==p||(l=60*parseInt(e.substr(d+1,2),10)+parseInt(e.substr(d+4,2),10),l*=6e4,"+"===p&&(l*=-1),u=!0),"."===e.charAt(14)&&(c=1e3*parseFloat(e.substr(14),10)),u?(t.setUTCFullYear(r,n,i),t.setUTCHours(o,s,a,c),t.setTime(+t+l)):(t.setFullYear(r,n,i),t.setHours(o,s,a,c)),t},i.dateToUtcTime=function(e){if("string"==typeof e)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=-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},i.derToInteger=function(e){"string"==typeof e&&(e=n.util.createBuffer(e));var t=8*e.length();if(t>32)throw new Error("Integer too large; max is 32-bits.");return e.getSignedInt(t)},i.validate=function(e,t,r,o){var s=!1;if(e.tagClass!==t.tagClass&&void 0!==t.tagClass||e.type!==t.type&&void 0!==t.type)o&&(e.tagClass!==t.tagClass&&o.push("["+t.name+'] Expected tag class "'+t.tagClass+'", got "'+e.tagClass+'"'),e.type!==t.type&&o.push("["+t.name+'] Expected type "'+t.type+'", got "'+e.type+'"'));else if(e.constructed===t.constructed||void 0===t.constructed){if(s=!0,t.value&&n.util.isArray(t.value))for(var a=0,c=0;s&&c0&&(o+="\n");for(var s="",c=0;c1?o+="0x"+n.util.bytesToHex(e.value.slice(1)):o+="(none)",e.value.length>0){var p=e.value.charCodeAt(0);1==p?o+=" (1 unused bit shown)":p>1&&(o+=" ("+p+" unused bits shown)")}}else if(e.type===i.Type.OCTETSTRING)a.test(e.value)||(o+="("+e.value+") "),o+="0x"+n.util.bytesToHex(e.value);else if(e.type===i.Type.UTF8)try{o+=n.util.decodeUtf8(e.value)}catch(t){if("URI malformed"!==t.message)throw t;o+="0x"+n.util.bytesToHex(e.value)+" (malformed UTF8)"}else e.type===i.Type.PRINTABLESTRING||e.type===i.Type.IA5String?o+=e.value:a.test(e.value)?o+="0x"+n.util.bytesToHex(e.value):0===e.value.length?o+="[null]":o+=e.value}return o}},36147:e=>{var t={};e.exports=t;var r={};t.encode=function(e,t,r){if("string"!=typeof t)throw new TypeError('"alphabet" must be a string.');if(void 0!==r&&"number"!=typeof r)throw new TypeError('"maxline" must be a number.');var n="";if(e instanceof Uint8Array){var i=0,o=t.length,s=t.charAt(0),a=[0];for(i=0;i0;)a.push(l%o),l=l/o|0}for(i=0;0===e[i]&&i=0;--i)n+=t[a[i]]}else n=function(e,t){var r=0,n=t.length,i=t.charAt(0),o=[0];for(r=0;r0;)o.push(a%n),a=a/n|0}var c="";for(r=0;0===e.at(r)&&r=0;--r)c+=t[o[r]];return c}(e,t);if(r){var u=new RegExp(".{1,"+r+"}","g");n=n.match(u).join("\r\n")}return n},t.decode=function(e,t){if("string"!=typeof e)throw new TypeError('"input" must be a string.');if("string"!=typeof t)throw new TypeError('"alphabet" must be a string.');var n=r[t];if(!n){n=r[t]=[];for(var i=0;i>=8;for(;u>0;)a.push(255&u),u>>=8}for(var d=0;e[d]===s&&d{var n=r(56105);r(56827),e.exports=n.cipher=n.cipher||{},n.cipher.algorithms=n.cipher.algorithms||{},n.cipher.createCipher=function(e,t){var r=e;if("string"==typeof r&&(r=n.cipher.getAlgorithm(r))&&(r=r()),!r)throw new Error("Unsupported algorithm: "+e);return new n.cipher.BlockCipher({algorithm:r,key:t,decrypt:!1})},n.cipher.createDecipher=function(e,t){var r=e;if("string"==typeof r&&(r=n.cipher.getAlgorithm(r))&&(r=r()),!r)throw new Error("Unsupported algorithm: "+e);return new n.cipher.BlockCipher({algorithm:r,key:t,decrypt:!0})},n.cipher.registerAlgorithm=function(e,t){e=e.toUpperCase(),n.cipher.algorithms[e]=t},n.cipher.getAlgorithm=function(e){return(e=e.toUpperCase())in n.cipher.algorithms?n.cipher.algorithms[e]:null};var i=n.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)};i.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=n.util.createBuffer(),this.output=e.output||n.util.createBuffer(),this.mode.start(t)},i.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()},i.prototype.finish=function(e){!e||"ECB"!==this.mode.name&&"CBC"!==this.mode.name||(this.mode.pad=function(t){return e(this.blockSize,t,!1)},this.mode.unpad=function(t){return e(this.blockSize,t,!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)))}},30445:(e,t,r)=>{var n=r(56105);r(56827),n.cipher=n.cipher||{};var i=e.exports=n.cipher.modes=n.cipher.modes||{};function o(e,t){if("string"==typeof e&&(e=n.util.createBuffer(e)),n.util.isArray(e)&&e.length>4){var r=e;e=n.util.createBuffer();for(var i=0;i0))return!0;for(var n=0;n0))return!0;for(var n=0;n0)return!1;var r=e.length(),n=e.at(r-1);return!(n>this.blockSize<<2||(e.truncate(n),0))},i.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)},i.cbc.prototype.start=function(e){if(null===e.iv){if(!this._prev)throw new Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else{if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=o(e.iv,this.blockSize),this._prev=this._iv.slice(0)}},i.cbc.prototype.encrypt=function(e,t,r){if(e.length()0))return!0;for(var n=0;n0))return!0;for(var n=0;n0)return!1;var r=e.length(),n=e.at(r-1);return!(n>this.blockSize<<2||(e.truncate(n),0))},i.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=n.util.createBuffer(),this._partialBytes=0},i.cfb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=o(e.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.cfb.prototype.encrypt=function(e,t,r){var n=e.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i0&&(o=this.blockSize-o),this._partialOutput.clear(),i=0;i0)e.read-=this.blockSize;else for(i=0;i0&&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}},i.cfb.prototype.decrypt=function(e,t,r){var n=e.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i0&&(o=this.blockSize-o),this._partialOutput.clear(),i=0;i0)e.read-=this.blockSize;else for(i=0;i0&&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}},i.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=n.util.createBuffer(),this._partialBytes=0},i.ofb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=o(e.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.ofb.prototype.encrypt=function(e,t,r){var n=e.length();if(0===e.length())return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i0&&(o=this.blockSize-o),this._partialOutput.clear(),i=0;i0)e.read-=this.blockSize;else for(i=0;i0&&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}},i.ofb.prototype.decrypt=i.ofb.prototype.encrypt,i.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=n.util.createBuffer(),this._partialBytes=0},i.ctr.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=o(e.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.ctr.prototype.encrypt=function(e,t,r){var n=e.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i0&&(o=this.blockSize-o),this._partialOutput.clear(),i=0;i0&&(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}s(this._inBlock)},i.ctr.prototype.decrypt=i.ctr.prototype.encrypt,i.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=n.util.createBuffer(),this._partialBytes=0,this._R=3774873600},i.gcm.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");var t,r=n.util.createBuffer(e.iv);if(this._cipherLength=0,t="additionalData"in e?n.util.createBuffer(e.additionalData):n.util.createBuffer(),this._tagLength="tagLength"in e?e.tagLength:128,this._tag=null,e.decrypt&&(this._tag=n.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 i=r.length();if(12===i)this._j0=[r.getInt32(),r.getInt32(),r.getInt32(),1];else{for(this._j0=[0,0,0,0];r.length()>0;)this._j0=this.ghash(this._hashSubkey,this._j0,[r.getInt32(),r.getInt32(),r.getInt32(),r.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(a(8*i)))}this._inBlock=this._j0.slice(0),s(this._inBlock),this._partialBytes=0,t=n.util.createBuffer(t),this._aDataLength=a(8*t.length());var o=t.length()%this.blockSize;for(o&&t.fillWithByte(0,this.blockSize-o),this._s=[0,0,0,0];t.length()>0;)this._s=this.ghash(this._hashSubkey,this._s,[t.getInt32(),t.getInt32(),t.getInt32(),t.getInt32()])},i.gcm.prototype.encrypt=function(e,t,r){var n=e.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize){for(var i=0;i0&&(o=this.blockSize-o),this._partialOutput.clear(),i=0;i0&&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),s(this._inBlock)},i.gcm.prototype.decrypt=function(e,t,r){var n=e.length();if(n0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),s(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;i0;--n)t[n]=e[n]>>>1|(1&e[n-1])<<31;t[0]=e[0]>>>1,r&&(t[0]^=this._R)},i.gcm.prototype.tableMultiply=function(e){for(var t=[0,0,0,0],r=0;r<32;++r){var n=e[r/8|0]>>>4*(7-r%8)&15,i=this._m[r][n];t[0]^=i[0],t[1]^=i[1],t[2]^=i[2],t[3]^=i[3]}return t},i.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)},i.gcm.prototype.generateHashTable=function(e,t){for(var r=8/t,n=4*r,i=16*r,o=new Array(i),s=0;s>>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{var n=r(56105);function i(e,t){n.cipher.registerAlgorithm(e,(function(){return new n.des.Algorithm(e,t)}))}r(27140),r(30445),r(56827),e.exports=n.des=n.des||{},n.des.startEncrypting=function(e,t,r,n){var i=f({key:e,output:r,decrypt:!1,mode:n||(null===t?"ECB":"CBC")});return i.start(t),i},n.des.createEncryptionCipher=function(e,t){return f({key:e,output:null,decrypt:!1,mode:t})},n.des.startDecrypting=function(e,t,r,n){var i=f({key:e,output:r,decrypt:!0,mode:n||(null===t?"ECB":"CBC")});return i.start(t),i},n.des.createDecryptionCipher=function(e,t){return f({key:e,output:null,decrypt:!0,mode:t})},n.des.Algorithm=function(e,t){var r=this;r.name=e,r.mode=new t({blockSize:8,cipher:{encrypt:function(e,t){return h(r._keys,e,t,!1)},decrypt:function(e,t){return h(r._keys,e,t,!0)}}}),r._init=!1},n.des.Algorithm.prototype.initialize=function(e){if(!this._init){var t=n.util.createBuffer(e.key);if(0===this.name.indexOf("3DES")&&24!==t.length())throw new Error("Invalid Triple-DES key size: "+8*t.length());this._keys=function(e){for(var t,r=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],n=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],i=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],o=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],s=[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],c=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],l=[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],d=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],p=[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],f=[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],m=e.length()>8?3:1,y=[],v=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],_=0,b=0;b>>4^C))<<4,w^=t=65535&((C^=t)>>>-16^w),w^=(t=858993459&(w>>>2^(C^=t<<-16)))<<2,w^=t=65535&((C^=t)>>>-16^w),w^=(t=1431655765&(w>>>1^(C^=t<<-16)))<<1,w^=t=16711935&((C^=t)>>>8^w),t=(w^=(t=1431655765&(w>>>1^(C^=t<<8)))<<1)<<8|(C^=t)>>>20&240,w=C<<24|C<<8&16711680|C>>>8&65280|C>>>24&240,C=t;for(var E=0;E>>26,C=C<<2|C>>>26):(w=w<<1|w>>>27,C=C<<1|C>>>27);var T=r[(w&=-15)>>>28]|n[w>>>24&15]|i[w>>>20&15]|o[w>>>16&15]|s[w>>>12&15]|a[w>>>8&15]|c[w>>>4&15],S=l[(C&=-15)>>>28]|u[C>>>24&15]|d[C>>>20&15]|p[C>>>16&15]|h[C>>>12&15]|f[C>>>8&15]|g[C>>>4&15];t=65535&(S>>>16^T),y[_++]=T^t,y[_++]=S^t<<16}}return y}(t),this._init=!0}},i("DES-ECB",n.cipher.modes.ecb),i("DES-CBC",n.cipher.modes.cbc),i("DES-CFB",n.cipher.modes.cfb),i("DES-OFB",n.cipher.modes.ofb),i("DES-CTR",n.cipher.modes.ctr),i("3DES-ECB",n.cipher.modes.ecb),i("3DES-CBC",n.cipher.modes.cbc),i("3DES-CFB",n.cipher.modes.cfb),i("3DES-OFB",n.cipher.modes.ofb),i("3DES-CTR",n.cipher.modes.ctr);var o=[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],s=[-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],a=[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],c=[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],l=[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],u=[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],d=[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],p=[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 h(e,t,r,n){var i,h,f=32===e.length?3:9;i=3===f?n?[30,-2,-2]:[0,32,2]:n?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var g=t[0],m=t[1];g^=(h=252645135&(g>>>4^m))<<4,g^=(h=65535&(g>>>16^(m^=h)))<<16,g^=h=858993459&((m^=h)>>>2^g),g^=h=16711935&((m^=h<<2)>>>8^g),g=(g^=(h=1431655765&(g>>>1^(m^=h<<8)))<<1)<<1|g>>>31,m=(m^=h)<<1|m>>>31;for(var y=0;y>>4|m<<28)^e[b+1];h=g,g=m,m=h^(s[w>>>24&63]|c[w>>>16&63]|u[w>>>8&63]|p[63&w]|o[C>>>24&63]|a[C>>>16&63]|l[C>>>8&63]|d[63&C])}h=g,g=m,m=h}m=m>>>1|m<<31,m^=h=1431655765&((g=g>>>1|g<<31)>>>1^m),m^=(h=16711935&(m>>>8^(g^=h<<1)))<<8,m^=(h=858993459&(m>>>2^(g^=h)))<<2,m^=h=65535&((g^=h)>>>16^m),m^=h=252645135&((g^=h<<16)>>>4^m),g^=h<<4,r[0]=g,r[1]=m}function f(e){var t,r="DES-"+((e=e||{}).mode||"CBC").toUpperCase(),i=(t=e.decrypt?n.cipher.createDecipher(r,e.key):n.cipher.createCipher(r,e.key)).start;return t.start=function(e,r){var o=null;r instanceof n.util.ByteBuffer&&(o=r,r={}),(r=r||{}).output=o,r.iv=e,i.call(t,r)},t}},48757:(e,t,r)=>{var n=r(56105);r(10017),r(46572),r(593),r(56827);var i=r(89796),o=i.publicKeyValidator,s=i.privateKeyValidator;if(void 0===a)var a=n.jsbn.BigInteger;var c=n.util.ByteBuffer,l="undefined"==typeof Buffer?Uint8Array:Buffer;n.pki=n.pki||{},e.exports=n.pki.ed25519=n.ed25519=n.ed25519||{};var u=n.ed25519;function d(e){var t=e.message;if(t instanceof Uint8Array||t instanceof l)return t;var r=e.encoding;if(void 0===t){if(!e.md)throw new TypeError('"options.message" or "options.md" not specified.');t=e.md.digest().getBytes(),r="binary"}if("string"==typeof t&&!r)throw new TypeError('"options.encoding" must be "binary" or "utf8".');if("string"==typeof t){if("undefined"!=typeof Buffer)return Buffer.from(t,r);t=new c(t,r)}else if(!(t instanceof c))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 l(t.length()),i=0;i=0;--r)F(n,n),1!==r&&j(n,n,t);for(r=0;r<16;++r)e[r]=n[r]}(r,r),j(r,r,i),j(r,r,o),j(r,r,o),j(e[0],r,o),F(n,e[0]),j(n,n,o),k(n,i)&&j(e[0],e[0],_),F(n,e[0]),j(n,n,o),k(n,i)?-1:(A(e[0])===t[31]>>7&&B(e[0],p,e[0]),j(e[3],e[0],e[1]),0)}(a,n))return-1;for(i=0;i=0};var p=D(),h=D([1]),f=D([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),g=D([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),m=D([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),y=D([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),v=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]),_=D([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function b(e,t){var r=n.md.sha512.create(),i=new c(e);r.update(i.getBytes(t),"binary");var o=r.digest().getBytes();if("undefined"!=typeof Buffer)return Buffer.from(o,"binary");for(var s=new l(u.constants.HASH_BYTE_LENGTH),a=0;a<64;++a)s[a]=o.charCodeAt(a);return s}function w(e,t){var r,n,i,o;for(n=63;n>=32;--n){for(r=0,i=n-32,o=n-12;i>8,t[i]-=256*r;t[i]+=r,t[n]=0}for(r=0,i=0;i<32;++i)t[i]+=r-(t[31]>>4)*v[i],r=t[i]>>8,t[i]&=255;for(i=0;i<32;++i)t[i]-=r*v[i];for(n=0;n<32;++n)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function C(e){for(var t=new Float64Array(64),r=0;r<64;++r)t[r]=e[r],e[r]=0;w(e,t)}function E(e,t){var r=D(),n=D(),i=D(),o=D(),s=D(),a=D(),c=D(),l=D(),u=D();B(r,e[1],e[0]),B(u,t[1],t[0]),j(r,r,u),M(n,e[0],e[1]),M(u,t[0],t[1]),j(n,n,u),j(i,e[3],t[3]),j(i,i,g),j(o,e[2],t[2]),M(o,o,o),B(s,n,r),B(a,o,i),M(c,o,i),M(l,n,r),j(e[0],s,a),j(e[1],l,c),j(e[2],c,a),j(e[3],s,l)}function T(e,t,r){for(var n=0;n<4;++n)L(e[n],t[n],r)}function S(e,t){var r=D(),n=D(),i=D();!function(e,t){var r,n=D();for(r=0;r<16;++r)n[r]=t[r];for(r=253;r>=0;--r)F(n,n),2!==r&&4!==r&&j(n,n,t);for(r=0;r<16;++r)e[r]=n[r]}(i,t[2]),j(r,t[0],i),j(n,t[1],i),x(e,n),e[31]^=A(r)<<7}function x(e,t){var r,n,i,o=D(),s=D();for(r=0;r<16;++r)s[r]=t[r];for(O(s),O(s),O(s),n=0;n<2;++n){for(o[0]=s[0]-65517,r=1;r<15;++r)o[r]=s[r]-65535-(o[r-1]>>16&1),o[r-1]&=65535;o[15]=s[15]-32767-(o[14]>>16&1),i=o[15]>>16&1,o[14]&=65535,L(s,o,1-i)}for(r=0;r<16;r++)e[2*r]=255&s[r],e[2*r+1]=s[r]>>8}function k(e,t){var r=new l(32),n=new l(32);return x(r,e),x(n,t),I(r,0,n,0)}function I(e,t,r,n){return function(e,t,r,n,i){var o,s=0;for(o=0;o<32;++o)s|=e[t+o]^r[n+o];return(1&s-1>>>8)-1}(e,t,r,n)}function A(e){var t=new l(32);return x(t,e),1&t[0]}function P(e,t,r){var n,i;for(N(e[0],p),N(e[1],h),N(e[2],h),N(e[3],p),i=255;i>=0;--i)T(e,t,n=r[i/8|0]>>(7&i)&1),E(t,e),E(e,e),T(e,t,n)}function R(e,t){var r=[D(),D(),D(),D()];N(r[0],m),N(r[1],y),N(r[2],h),j(r[3],m,y),P(e,r,t)}function N(e,t){var r;for(r=0;r<16;r++)e[r]=0|t[r]}function O(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-65536*n;e[0]+=n-1+37*(n-1)}function L(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}function D(e){var t,r=new Float64Array(16);if(e)for(t=0;t{e.exports={options:{usePureJavaScript:!1}}},5945:(e,t,r)=>{var n=r(56105);r(91183),r(56827),(e.exports=n.hmac=n.hmac||{}).create=function(){var e=null,t=null,r=null,i=null,o={start:function(o,s){if(null!==o)if("string"==typeof o){if(!((o=o.toLowerCase())in n.md.algorithms))throw new Error('Unknown hash algorithm "'+o+'"');t=n.md.algorithms[o].create()}else t=o;if(null===s)s=e;else{if("string"==typeof s)s=n.util.createBuffer(s);else if(n.util.isArray(s)){var a=s;s=n.util.createBuffer();for(var c=0;ct.blockLength&&(t.start(),t.update(s.bytes()),s=t.digest()),r=n.util.createBuffer(),i=n.util.createBuffer(),l=s.length(),c=0;c{e.exports=r(56105),r(60070),r(63063),r(61057),r(27140),r(62148),r(48757),r(5945),r(29908),r(84401),r(63585),r(91003),r(72299),r(25661),r(30585),r(88577),r(45067),r(23245),r(77466),r(26759),r(51242),r(46572),r(50514),r(21431),r(78653),r(56827)},10017:(e,t,r)=>{var n,i=r(56105);function o(e,t,r){this.data=[],null!=e&&("number"==typeof e?this.fromNumber(e,t,r):null==t&&"string"!=typeof e?this.fromString(e,256):this.fromString(e,t))}function s(){return new o(null)}function a(e,t,r,n,i,o){for(var s=16383&t,a=t>>14;--o>=0;){var c=16383&this.data[e],l=this.data[e++]>>14,u=a*c+l*s;i=((c=s*c+((16383&u)<<14)+r.data[n]+i)>>28)+(u>>14)+a*l,r.data[n++]=268435455&c}return i}e.exports=i.jsbn=i.jsbn||{},i.jsbn.BigInteger=o,"undefined"==typeof navigator?(o.prototype.am=a,n=28):"Microsoft Internet Explorer"==navigator.appName?(o.prototype.am=function(e,t,r,n,i,o){for(var s=32767&t,a=t>>15;--o>=0;){var c=32767&this.data[e],l=this.data[e++]>>15,u=a*c+l*s;i=((c=s*c+((32767&u)<<15)+r.data[n]+(1073741823&i))>>>30)+(u>>>15)+a*l+(i>>>30),r.data[n++]=1073741823&c}return i},n=30):"Netscape"!=navigator.appName?(o.prototype.am=function(e,t,r,n,i,o){for(;--o>=0;){var s=t*this.data[e++]+r.data[n]+i;i=Math.floor(s/67108864),r.data[n++]=67108863&s}return i},n=26):(o.prototype.am=a,n=28),o.prototype.DB=n,o.prototype.DM=(1<>>16)&&(e=t,r+=16),0!=(t=e>>8)&&(e=t,r+=8),0!=(t=e>>4)&&(e=t,r+=4),0!=(t=e>>2)&&(e=t,r+=2),0!=(t=e>>1)&&(e=t,r+=1),r}function g(e){this.m=e}function m(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<>=16,t+=16),0==(255&e)&&(e>>=8,t+=8),0==(15&e)&&(e>>=4,t+=4),0==(3&e)&&(e>>=2,t+=2),0==(1&e)&&++t,t}function C(e){for(var t=0;0!=e;)e&=e-1,++t;return t}function E(){}function T(e){return e}function S(e){this.r2=s(),this.q3=s(),o.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}g.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},g.prototype.revert=function(e){return e},g.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},g.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},g.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},m.prototype.convert=function(e){var t=s();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(o.ZERO)>0&&this.m.subTo(t,t),t},m.prototype.revert=function(e){var t=s();return e.copyTo(t),this.reduce(t),t},m.prototype.reduce=function(e){for(;e.t<=this.mt2;)e.data[e.t++]=0;for(var t=0;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)},m.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},m.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},o.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e.data[t]=this.data[t];e.t=this.t,e.s=this.s},o.prototype.fromInt=function(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},o.prototype.fromString=function(e,t){var r;if(16==t)r=4;else if(8==t)r=3;else if(256==t)r=8;else if(2==t)r=1;else if(32==t)r=5;else{if(4!=t)return void this.fromRadix(e,t);r=2}this.t=0,this.s=0;for(var n=e.length,i=!1,s=0;--n>=0;){var a=8==r?255&e[n]:p(e,n);a<0?"-"==e.charAt(n)&&(i=!0):(i=!1,0==s?this.data[this.t++]=a:s+r>this.DB?(this.data[this.t-1]|=(a&(1<>this.DB-s):this.data[this.t-1]|=a<=this.DB&&(s-=this.DB))}8==r&&0!=(128&e[0])&&(this.s=-1,s>0&&(this.data[this.t-1]|=(1<0&&this.data[this.t-1]==e;)--this.t},o.prototype.dlShiftTo=function(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},o.prototype.drShiftTo=function(e,t){for(var r=e;r=0;--r)t.data[r+s+1]=this.data[r]>>i|a,a=(this.data[r]&o)<=0;--r)t.data[r]=0;t.data[s]=a,t.t=this.t+s+1,t.s=this.s,t.clamp()},o.prototype.rShiftTo=function(e,t){t.s=this.s;var r=Math.floor(e/this.DB);if(r>=this.t)t.t=0;else{var n=e%this.DB,i=this.DB-n,o=(1<>n;for(var s=r+1;s>n;n>0&&(t.data[this.t-r-1]|=(this.s&o)<>=this.DB;if(e.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=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()},o.prototype.multiplyTo=function(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=0;)e.data[r]=0;for(r=0;r=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()},o.prototype.divRemTo=function(e,t,r){var n=e.abs();if(!(n.t<=0)){var i=this.abs();if(i.t0?(n.lShiftTo(u,a),i.lShiftTo(u,r)):(n.copyTo(a),i.copyTo(r));var d=a.t,p=a.data[d-1];if(0!=p){var h=p*(1<1?a.data[d-2]>>this.F2:0),g=this.FV/h,m=(1<=0&&(r.data[r.t++]=1,r.subTo(b,r)),o.ONE.dlShiftTo(d,b),b.subTo(a,a);a.t=0;){var w=r.data[--v]==p?this.DM:Math.floor(r.data[v]*g+(r.data[v-1]+y)*m);if((r.data[v]+=a.am(0,w,r,_,0,d))0&&r.rShiftTo(u,r),c<0&&o.ZERO.subTo(r,r)}}},o.prototype.invDigit=function(){if(this.t<1)return 0;var e=this.data[0];if(0==(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},o.prototype.isEven=function(){return 0==(this.t>0?1&this.data[0]:this.s)},o.prototype.exp=function(e,t){if(e>4294967295||e<1)return o.ONE;var r=s(),n=s(),i=t.convert(this),a=f(e)-1;for(i.copyTo(r);--a>=0;)if(t.sqrTo(r,n),(e&1<0)t.mulTo(n,i,r);else{var c=r;r=n,n=c}return t.revert(r)},o.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var r,n=(1<0)for(a>a)>0&&(i=!0,o=d(r));s>=0;)a>(a+=this.DB-t)):(r=this.data[s]>>(a-=t)&n,a<=0&&(a+=this.DB,--s)),r>0&&(i=!0),i&&(o+=d(r));return i?o:"0"},o.prototype.negate=function(){var e=s();return o.ZERO.subTo(this,e),e},o.prototype.abs=function(){return this.s<0?this.negate():this},o.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var r=this.t;if(0!=(t=r-e.t))return this.s<0?-t:t;for(;--r>=0;)if(0!=(t=this.data[r]-e.data[r]))return t;return 0},o.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+f(this.data[this.t-1]^this.s&this.DM)},o.prototype.mod=function(e){var t=s();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(o.ZERO)>0&&e.subTo(t,t),t},o.prototype.modPowInt=function(e,t){var r;return r=e<256||t.isEven()?new g(t):new m(t),this.exp(e,r)},o.ZERO=h(0),o.ONE=h(1),E.prototype.convert=T,E.prototype.revert=T,E.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r)},E.prototype.sqrTo=function(e,t){e.squareTo(t)},S.prototype.convert=function(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=s();return e.copyTo(t),this.reduce(t),t},S.prototype.revert=function(e){return e},S.prototype.reduce=function(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.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},S.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)};var x=[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],k=(1<<26)/x[x.length-1];o.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},o.prototype.toRadix=function(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0";var t=this.chunkSize(e),r=Math.pow(e,t),n=h(r),i=s(),o=s(),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},o.prototype.fromRadix=function(e,t){this.fromInt(0),null==t&&(t=10);for(var r=this.chunkSize(t),n=Math.pow(t,r),i=!1,s=0,a=0,c=0;c=r&&(this.dMultiply(n),this.dAddOffset(a,0),s=0,a=0))}s>0&&(this.dMultiply(Math.pow(t,s)),this.dAddOffset(a,0)),i&&o.ZERO.subTo(this,this)},o.prototype.fromNumber=function(e,t,r){if("number"==typeof t)if(e<2)this.fromInt(1);else for(this.fromNumber(e,r),this.testBit(e-1)||this.bitwiseTo(o.ONE.shiftLeft(e-1),v,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(o.ONE.shiftLeft(e-1),this);else{var n=new Array,i=7&e;n.length=1+(e>>3),t.nextBytes(n),i>0?n[0]&=(1<>=this.DB;if(e.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=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()},o.prototype.dMultiply=function(e){this.data[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},o.prototype.dAddOffset=function(e,t){if(0!=e){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]}},o.prototype.multiplyLowerTo=function(e,t,r){var n,i=Math.min(this.t+e.t,t);for(r.s=0,r.t=i;i>0;)r.data[--i]=0;for(n=r.t-this.t;i=0;)r.data[n]=0;for(n=Math.max(t-this.t,0);n0)if(0==t)r=this.data[0]%e;else for(var n=this.t-1;n>=0;--n)r=(t*r+this.data[n])%e;return r},o.prototype.millerRabin=function(e){var t=this.subtract(o.ONE),r=t.getLowestSetBit();if(r<=0)return!1;for(var n,i=t.shiftRight(r),s={nextBytes:function(e){for(var t=0;t=0);var c=n.modPow(i,this);if(0!=c.compareTo(o.ONE)&&0!=c.compareTo(t)){for(var l=1;l++>24},o.prototype.shortValue=function(){return 0==this.t?this.s:this.data[0]<<16>>16},o.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this.data[0]<=0?0:1},o.prototype.toByteArray=function(){var e=this.t,t=new Array;t[0]=this.s;var r,n=this.DB-e*this.DB%8,i=0;if(e-- >0)for(n>n)!=(this.s&this.DM)>>n&&(t[i++]=r|this.s<=0;)n<8?(r=(this.data[e]&(1<>(n+=this.DB-8)):(r=this.data[e]>>(n-=8)&255,n<=0&&(n+=this.DB,--e)),0!=(128&r)&&(r|=-256),0==i&&(128&this.s)!=(128&r)&&++i,(i>0||r!=this.s)&&(t[i++]=r);return t},o.prototype.equals=function(e){return 0==this.compareTo(e)},o.prototype.min=function(e){return this.compareTo(e)<0?this:e},o.prototype.max=function(e){return this.compareTo(e)>0?this:e},o.prototype.and=function(e){var t=s();return this.bitwiseTo(e,y,t),t},o.prototype.or=function(e){var t=s();return this.bitwiseTo(e,v,t),t},o.prototype.xor=function(e){var t=s();return this.bitwiseTo(e,_,t),t},o.prototype.andNot=function(e){var t=s();return this.bitwiseTo(e,b,t),t},o.prototype.not=function(){for(var e=s(),t=0;t=this.t?0!=this.s:0!=(this.data[t]&1<1){var d=s();for(n.sqrTo(a[1],d);c<=u;)a[c]=s(),n.mulTo(d,a[c-2],a[c]),c+=2}var p,y,v=e.t-1,_=!0,b=s();for(i=f(e.data[v])-1;v>=0;){for(i>=l?p=e.data[v]>>i-l&u:(p=(e.data[v]&(1<0&&(p|=e.data[v-1]>>this.DB+i-l)),c=r;0==(1&p);)p>>=1,--c;if((i-=c)<0&&(i+=this.DB,--v),_)a[p].copyTo(o),_=!1;else{for(;c>1;)n.sqrTo(o,b),n.sqrTo(b,o),c-=2;c>0?n.sqrTo(o,b):(y=o,o=b,b=y),n.mulTo(b,a[p],o)}for(;v>=0&&0==(e.data[v]&1<=0?(r.subTo(n,r),t&&i.subTo(a,i),s.subTo(c,s)):(n.subTo(r,n),t&&a.subTo(i,a),c.subTo(s,c))}return 0!=n.compareTo(o.ONE)?o.ZERO:c.compareTo(e)>=0?c.subtract(e):c.signum()<0?(c.addTo(e,c),c.signum()<0?c.add(e):c):c},o.prototype.pow=function(e){return this.exp(e,new E)},o.prototype.gcd=function(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(i0&&(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},o.prototype.isProbablePrime=function(e){var t,r=this.abs();if(1==r.t&&r.data[0]<=x[x.length-1]){for(t=0;t{var n=r(56105);r(56827),r(46572),r(10017),e.exports=n.kem=n.kem||{};var i=n.jsbn.BigInteger;function o(e,t,r,i){e.generate=function(e,o){for(var s=new n.util.ByteBuffer,a=Math.ceil(o/i)+r,c=new n.util.ByteBuffer,l=r;l0&&(s=n.util.fillString(String.fromCharCode(0),c)+s),{encapsulation:t.encrypt(s,"NONE"),key:e.generate(s,o)}},decrypt:function(t,r,n){var i=t.decrypt(r,"NONE");return e.generate(i,n)}}},n.kem.kdf1=function(e,t){o(this,e,0,t||e.digestLength)},n.kem.kdf2=function(e,t){o(this,e,1,t||e.digestLength)}},84401:(e,t,r)=>{var n=r(56105);r(56827),e.exports=n.log=n.log||{},n.log.levels=["none","error","warning","info","debug","verbose","max"];var i={},o=[],s=null;n.log.LEVEL_LOCKED=2,n.log.NO_LEVEL_CHECK=4,n.log.INTERPOLATE=8;for(var a=0;a{e.exports=r(91183),r(54326),r(98967),r(12262),r(593)},91183:(e,t,r)=>{var n=r(56105);e.exports=n.md=n.md||{},n.md.algorithms=n.md.algorithms||{}},54326:(e,t,r)=>{var n=r(56105);r(91183),r(56827);var i=e.exports=n.md5=n.md5||{};n.md.md5=n.md.algorithms.md5=i,i.create=function(){l||function(){o=String.fromCharCode(128),o+=n.util.fillString(String.fromCharCode(0),64),s=[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],a=[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],c=new Array(64);for(var e=0;e<64;++e)c[e]=Math.floor(4294967296*Math.abs(Math.sin(e+1)));l=!0}();var e=null,t=n.util.createBuffer(),r=new Array(16),i={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){i.messageLength=0,i.fullMessageLength=i.messageLength64=[];for(var r=i.messageLengthSize/4,o=0;o>>0,a>>>0];for(var c=i.fullMessageLength.length-1;c>=0;--c)i.fullMessageLength[c]+=a[1],a[1]=a[0]+(i.fullMessageLength[c]/4294967296>>>0),i.fullMessageLength[c]=i.fullMessageLength[c]>>>0,a[0]=a[1]/4294967296>>>0;return t.putBytes(o),u(e,r,t),(t.read>2048||0===t.length())&&t.compact(),i},i.digest=function(){var s=n.util.createBuffer();s.putBytes(t.bytes());var a=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1;s.putBytes(o.substr(0,i.blockLength-a));for(var c,l=0,d=i.fullMessageLength.length-1;d>=0;--d)l=(c=8*i.fullMessageLength[d]+l)/4294967296>>>0,s.putInt32Le(c>>>0);var p={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3};u(p,r,s);var h=n.util.createBuffer();return h.putInt32Le(p.h0),h.putInt32Le(p.h1),h.putInt32Le(p.h2),h.putInt32Le(p.h3),h},i};var o=null,s=null,a=null,c=null,l=!1;function u(e,t,r){for(var n,i,o,l,u,d,p,h=r.length();h>=64;){for(i=e.h0,o=e.h1,l=e.h2,u=e.h3,p=0;p<16;++p)t[p]=r.getInt32Le(),n=i+(u^o&(l^u))+c[p]+t[p],i=u,u=l,l=o,o+=n<<(d=a[p])|n>>>32-d;for(;p<32;++p)n=i+(l^u&(o^l))+c[p]+t[s[p]],i=u,u=l,l=o,o+=n<<(d=a[p])|n>>>32-d;for(;p<48;++p)n=i+(o^l^u)+c[p]+t[s[p]],i=u,u=l,l=o,o+=n<<(d=a[p])|n>>>32-d;for(;p<64;++p)n=i+(l^(o|~u))+c[p]+t[s[p]],i=u,u=l,l=o,o+=n<<(d=a[p])|n>>>32-d;e.h0=e.h0+i|0,e.h1=e.h1+o|0,e.h2=e.h2+l|0,e.h3=e.h3+u|0,h-=64}}},9370:(e,t,r)=>{var n=r(56105);r(91003),e.exports=n.mgf=n.mgf||{},n.mgf.mgf1=n.mgf1},91003:(e,t,r)=>{var n=r(56105);r(56827),n.mgf=n.mgf||{},(e.exports=n.mgf.mgf1=n.mgf1=n.mgf1||{}).create=function(e){return{generate:function(t,r){for(var i=new n.util.ByteBuffer,o=Math.ceil(r/e.digestLength),s=0;s{var n=r(56105);n.pki=n.pki||{};var i=e.exports=n.pki.oids=n.oids=n.oids||{};function o(e,t){i[e]=t,i[t]=e}function s(e,t){i[e]=t}o("1.2.840.113549.1.1.1","rsaEncryption"),o("1.2.840.113549.1.1.4","md5WithRSAEncryption"),o("1.2.840.113549.1.1.5","sha1WithRSAEncryption"),o("1.2.840.113549.1.1.7","RSAES-OAEP"),o("1.2.840.113549.1.1.8","mgf1"),o("1.2.840.113549.1.1.9","pSpecified"),o("1.2.840.113549.1.1.10","RSASSA-PSS"),o("1.2.840.113549.1.1.11","sha256WithRSAEncryption"),o("1.2.840.113549.1.1.12","sha384WithRSAEncryption"),o("1.2.840.113549.1.1.13","sha512WithRSAEncryption"),o("1.3.101.112","EdDSA25519"),o("1.2.840.10040.4.3","dsa-with-sha1"),o("1.3.14.3.2.7","desCBC"),o("1.3.14.3.2.26","sha1"),o("1.3.14.3.2.29","sha1WithRSASignature"),o("2.16.840.1.101.3.4.2.1","sha256"),o("2.16.840.1.101.3.4.2.2","sha384"),o("2.16.840.1.101.3.4.2.3","sha512"),o("2.16.840.1.101.3.4.2.4","sha224"),o("2.16.840.1.101.3.4.2.5","sha512-224"),o("2.16.840.1.101.3.4.2.6","sha512-256"),o("1.2.840.113549.2.2","md2"),o("1.2.840.113549.2.5","md5"),o("1.2.840.113549.1.7.1","data"),o("1.2.840.113549.1.7.2","signedData"),o("1.2.840.113549.1.7.3","envelopedData"),o("1.2.840.113549.1.7.4","signedAndEnvelopedData"),o("1.2.840.113549.1.7.5","digestedData"),o("1.2.840.113549.1.7.6","encryptedData"),o("1.2.840.113549.1.9.1","emailAddress"),o("1.2.840.113549.1.9.2","unstructuredName"),o("1.2.840.113549.1.9.3","contentType"),o("1.2.840.113549.1.9.4","messageDigest"),o("1.2.840.113549.1.9.5","signingTime"),o("1.2.840.113549.1.9.6","counterSignature"),o("1.2.840.113549.1.9.7","challengePassword"),o("1.2.840.113549.1.9.8","unstructuredAddress"),o("1.2.840.113549.1.9.14","extensionRequest"),o("1.2.840.113549.1.9.20","friendlyName"),o("1.2.840.113549.1.9.21","localKeyId"),o("1.2.840.113549.1.9.22.1","x509Certificate"),o("1.2.840.113549.1.12.10.1.1","keyBag"),o("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag"),o("1.2.840.113549.1.12.10.1.3","certBag"),o("1.2.840.113549.1.12.10.1.4","crlBag"),o("1.2.840.113549.1.12.10.1.5","secretBag"),o("1.2.840.113549.1.12.10.1.6","safeContentsBag"),o("1.2.840.113549.1.5.13","pkcs5PBES2"),o("1.2.840.113549.1.5.12","pkcs5PBKDF2"),o("1.2.840.113549.1.12.1.1","pbeWithSHAAnd128BitRC4"),o("1.2.840.113549.1.12.1.2","pbeWithSHAAnd40BitRC4"),o("1.2.840.113549.1.12.1.3","pbeWithSHAAnd3-KeyTripleDES-CBC"),o("1.2.840.113549.1.12.1.4","pbeWithSHAAnd2-KeyTripleDES-CBC"),o("1.2.840.113549.1.12.1.5","pbeWithSHAAnd128BitRC2-CBC"),o("1.2.840.113549.1.12.1.6","pbewithSHAAnd40BitRC2-CBC"),o("1.2.840.113549.2.7","hmacWithSHA1"),o("1.2.840.113549.2.8","hmacWithSHA224"),o("1.2.840.113549.2.9","hmacWithSHA256"),o("1.2.840.113549.2.10","hmacWithSHA384"),o("1.2.840.113549.2.11","hmacWithSHA512"),o("1.2.840.113549.3.7","des-EDE3-CBC"),o("2.16.840.1.101.3.4.1.2","aes128-CBC"),o("2.16.840.1.101.3.4.1.22","aes192-CBC"),o("2.16.840.1.101.3.4.1.42","aes256-CBC"),o("2.5.4.3","commonName"),o("2.5.4.4","surname"),o("2.5.4.5","serialNumber"),o("2.5.4.6","countryName"),o("2.5.4.7","localityName"),o("2.5.4.8","stateOrProvinceName"),o("2.5.4.9","streetAddress"),o("2.5.4.10","organizationName"),o("2.5.4.11","organizationalUnitName"),o("2.5.4.12","title"),o("2.5.4.13","description"),o("2.5.4.15","businessCategory"),o("2.5.4.17","postalCode"),o("2.5.4.42","givenName"),o("1.3.6.1.4.1.311.60.2.1.2","jurisdictionOfIncorporationStateOrProvinceName"),o("1.3.6.1.4.1.311.60.2.1.3","jurisdictionOfIncorporationCountryName"),o("2.16.840.1.113730.1.1","nsCertType"),o("2.16.840.1.113730.1.13","nsComment"),s("2.5.29.1","authorityKeyIdentifier"),s("2.5.29.2","keyAttributes"),s("2.5.29.3","certificatePolicies"),s("2.5.29.4","keyUsageRestriction"),s("2.5.29.5","policyMapping"),s("2.5.29.6","subtreesConstraint"),s("2.5.29.7","subjectAltName"),s("2.5.29.8","issuerAltName"),s("2.5.29.9","subjectDirectoryAttributes"),s("2.5.29.10","basicConstraints"),s("2.5.29.11","nameConstraints"),s("2.5.29.12","policyConstraints"),s("2.5.29.13","basicConstraints"),o("2.5.29.14","subjectKeyIdentifier"),o("2.5.29.15","keyUsage"),s("2.5.29.16","privateKeyUsagePeriod"),o("2.5.29.17","subjectAltName"),o("2.5.29.18","issuerAltName"),o("2.5.29.19","basicConstraints"),s("2.5.29.20","cRLNumber"),s("2.5.29.21","cRLReason"),s("2.5.29.22","expirationDate"),s("2.5.29.23","instructionCode"),s("2.5.29.24","invalidityDate"),s("2.5.29.25","cRLDistributionPoints"),s("2.5.29.26","issuingDistributionPoint"),s("2.5.29.27","deltaCRLIndicator"),s("2.5.29.28","issuingDistributionPoint"),s("2.5.29.29","certificateIssuer"),s("2.5.29.30","nameConstraints"),o("2.5.29.31","cRLDistributionPoints"),o("2.5.29.32","certificatePolicies"),s("2.5.29.33","policyMappings"),s("2.5.29.34","policyConstraints"),o("2.5.29.35","authorityKeyIdentifier"),s("2.5.29.36","policyConstraints"),o("2.5.29.37","extKeyUsage"),s("2.5.29.46","freshestCRL"),s("2.5.29.54","inhibitAnyPolicy"),o("1.3.6.1.4.1.11129.2.4.2","timestampList"),o("1.3.6.1.5.5.7.1.1","authorityInfoAccess"),o("1.3.6.1.5.5.7.3.1","serverAuth"),o("1.3.6.1.5.5.7.3.2","clientAuth"),o("1.3.6.1.5.5.7.3.3","codeSigning"),o("1.3.6.1.5.5.7.3.4","emailProtection"),o("1.3.6.1.5.5.7.3.8","timeStamping")},4173:(e,t,r)=>{var n=r(56105);if(r(60070),r(61057),r(62148),r(91183),r(81877),r(72299),r(25661),r(46572),r(50514),r(69597),r(56827),void 0===i)var i=n.jsbn.BigInteger;var o=n.asn1,s=n.pki=n.pki||{};e.exports=s.pbe=n.pbe=n.pbe||{};var a=s.oids,c={name:"EncryptedPrivateKeyInfo",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"encryptionOid"},{name:"AlgorithmIdentifier.parameters",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:o.Class.UNIVERSAL,type:o.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},l={name:"PBES2Algorithms",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:o.Class.UNIVERSAL,type:o.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"kdfIterationCount"},{name:"PBES2Algorithms.params.keyLength",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,optional:!0,capture:"keyLength"},{name:"PBES2Algorithms.params.prf",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,optional:!0,value:[{name:"PBES2Algorithms.params.prf.algorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"prfOid"}]}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:o.Class.UNIVERSAL,type:o.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},u={name:"pkcs-12PbeParams",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:o.Class.UNIVERSAL,type:o.Type.OCTETSTRING,constructed:!1,capture:"salt"},{name:"pkcs-12PbeParams.iterations",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"iterations"}]};function d(e,t){return e.start().update(t).digest().getBytes()}function p(e){var t;if(e){if(!(t=s.oids[o.derToOid(e)])){var r=new Error("Unsupported PRF OID.");throw r.oid=e,r.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],r}}else t="hmacWithSHA1";return h(t)}function h(e){var t=n.md;switch(e){case"hmacWithSHA224":t=n.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.encryptPrivateKeyInfo=function(e,t,r){(r=r||{}).saltSize=r.saltSize||8,r.count=r.count||2048,r.algorithm=r.algorithm||"aes128",r.prfAlgorithm=r.prfAlgorithm||"sha1";var i,c,l,u=n.random.getBytesSync(r.saltSize),d=r.count,p=o.integerToDer(d);if(0===r.algorithm.indexOf("aes")||"des"===r.algorithm){var f,g,m;switch(r.algorithm){case"aes128":i=16,f=16,g=a["aes128-CBC"],m=n.aes.createEncryptionCipher;break;case"aes192":i=24,f=16,g=a["aes192-CBC"],m=n.aes.createEncryptionCipher;break;case"aes256":i=32,f=16,g=a["aes256-CBC"],m=n.aes.createEncryptionCipher;break;case"des":i=8,f=8,g=a.desCBC,m=n.des.createEncryptionCipher;break;default:throw(C=new Error("Cannot encrypt private key. Unknown encryption algorithm.")).algorithm=r.algorithm,C}var y="hmacWith"+r.prfAlgorithm.toUpperCase(),v=h(y),_=n.pkcs5.pbkdf2(t,u,d,i,v),b=n.random.getBytesSync(f);(E=m(_)).start(b),E.update(o.toDer(e)),E.finish(),l=E.output.getBytes();var w=function(e,t,r,i){var a=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,e),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,t.getBytes())]);return"hmacWithSHA1"!==i&&a.value.push(o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,n.util.hexToBytes(r.toString(16))),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(s.oids[i]).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.NULL,!1,"")])),a}(u,p,i,y);c=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(a.pkcs5PBES2).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(a.pkcs5PBKDF2).getBytes()),w]),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(g).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,b)])])])}else{var C;if("3des"!==r.algorithm)throw(C=new Error("Cannot encrypt private key. Unknown encryption algorithm.")).algorithm=r.algorithm,C;i=24;var E,T=new n.util.ByteBuffer(u);_=s.pbe.generatePkcs12Key(t,T,1,d,i),b=s.pbe.generatePkcs12Key(t,T,2,d,i),(E=n.des.createEncryptionCipher(_)).start(b),E.update(o.toDer(e)),E.finish(),l=E.output.getBytes(),c=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(a["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,u),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,p.getBytes())])])}return o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[c,o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,l)])},s.decryptPrivateKeyInfo=function(e,t){var r=null,i={},a=[];if(!o.validate(e,c,i,a)){var l=new Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw l.errors=a,l}var u=o.derToOid(i.encryptionOid),d=s.pbe.getCipher(u,i.encryptionParams,t),p=n.util.createBuffer(i.encryptedData);return d.update(p),d.finish()&&(r=o.fromDer(d.output)),r},s.encryptedPrivateKeyToPem=function(e,t){var r={type:"ENCRYPTED PRIVATE KEY",body:o.toDer(e).getBytes()};return n.pem.encode(r,{maxline:t})},s.encryptedPrivateKeyFromPem=function(e){var t=n.pem.decode(e)[0];if("ENCRYPTED PRIVATE KEY"!==t.type){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&&"ENCRYPTED"===t.procType.type)throw new Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return o.fromDer(t.body)},s.encryptRsaPrivateKey=function(e,t,r){if(!(r=r||{}).legacy){var i=s.wrapRsaPrivateKey(s.privateKeyToAsn1(e));return i=s.encryptPrivateKeyInfo(i,t,r),s.encryptedPrivateKeyToPem(i)}var a,c,l,u;switch(r.algorithm){case"aes128":a="AES-128-CBC",l=16,c=n.random.getBytesSync(16),u=n.aes.createEncryptionCipher;break;case"aes192":a="AES-192-CBC",l=24,c=n.random.getBytesSync(16),u=n.aes.createEncryptionCipher;break;case"aes256":a="AES-256-CBC",l=32,c=n.random.getBytesSync(16),u=n.aes.createEncryptionCipher;break;case"3des":a="DES-EDE3-CBC",l=24,c=n.random.getBytesSync(8),u=n.des.createEncryptionCipher;break;case"des":a="DES-CBC",l=8,c=n.random.getBytesSync(8),u=n.des.createEncryptionCipher;break;default:var d=new Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+r.algorithm+'".');throw d.algorithm=r.algorithm,d}var p=u(n.pbe.opensslDeriveBytes(t,c.substr(0,8),l));p.start(c),p.update(o.toDer(s.privateKeyToAsn1(e))),p.finish();var h={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:a,parameters:n.util.bytesToHex(c).toUpperCase()},body:p.output.getBytes()};return n.pem.encode(h)},s.decryptRsaPrivateKey=function(e,t){var r=null,i=n.pem.decode(e)[0];if("ENCRYPTED PRIVATE KEY"!==i.type&&"PRIVATE KEY"!==i.type&&"RSA PRIVATE KEY"!==i.type)throw(l=new Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".')).headerType=l,l;if(i.procType&&"ENCRYPTED"===i.procType.type){var a,c;switch(i.dekInfo.algorithm){case"DES-CBC":a=8,c=n.des.createDecryptionCipher;break;case"DES-EDE3-CBC":a=24,c=n.des.createDecryptionCipher;break;case"AES-128-CBC":a=16,c=n.aes.createDecryptionCipher;break;case"AES-192-CBC":a=24,c=n.aes.createDecryptionCipher;break;case"AES-256-CBC":a=32,c=n.aes.createDecryptionCipher;break;case"RC2-40-CBC":a=5,c=function(e){return n.rc2.createDecryptionCipher(e,40)};break;case"RC2-64-CBC":a=8,c=function(e){return n.rc2.createDecryptionCipher(e,64)};break;case"RC2-128-CBC":a=16,c=function(e){return n.rc2.createDecryptionCipher(e,128)};break;default:var l;throw(l=new Error('Could not decrypt private key; unsupported encryption algorithm "'+i.dekInfo.algorithm+'".')).algorithm=i.dekInfo.algorithm,l}var u=n.util.hexToBytes(i.dekInfo.parameters),d=c(n.pbe.opensslDeriveBytes(t,u.substr(0,8),a));if(d.start(u),d.update(n.util.createBuffer(i.body)),!d.finish())return r;r=d.output.getBytes()}else r=i.body;return null!==(r="ENCRYPTED PRIVATE KEY"===i.type?s.decryptPrivateKeyInfo(o.fromDer(r),t):o.fromDer(r))&&(r=s.privateKeyFromAsn1(r)),r},s.pbe.generatePkcs12Key=function(e,t,r,i,o,s){var a,c;if(null==s){if(!("sha1"in n.md))throw new Error('"sha1" hash algorithm unavailable.');s=n.md.sha1.create()}var l=s.digestLength,u=s.blockLength,d=new n.util.ByteBuffer,p=new n.util.ByteBuffer;if(null!=e){for(c=0;c=0;c--)A>>=8,A+=S.at(c)+I.at(c),I.setAt(c,255&A);k.putBuffer(I)}b=k,d.putBuffer(E)}return d.truncate(d.length()-o),d},s.pbe.getCipher=function(e,t,r){switch(e){case s.oids.pkcs5PBES2:return s.pbe.getCipherForPBES2(e,t,r);case s.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case s.oids["pbewithSHAAnd40BitRC2-CBC"]:return s.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}},s.pbe.getCipherForPBES2=function(e,t,r){var i,a={},c=[];if(!o.validate(t,l,a,c))throw(i=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.")).errors=c,i;if((e=o.derToOid(a.kdfOid))!==s.oids.pkcs5PBKDF2)throw(i=new Error("Cannot read encrypted private key. Unsupported key derivation function OID.")).oid=e,i.supportedOids=["pkcs5PBKDF2"],i;if((e=o.derToOid(a.encOid))!==s.oids["aes128-CBC"]&&e!==s.oids["aes192-CBC"]&&e!==s.oids["aes256-CBC"]&&e!==s.oids["des-EDE3-CBC"]&&e!==s.oids.desCBC)throw(i=new Error("Cannot read encrypted private key. Unsupported encryption scheme OID.")).oid=e,i.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],i;var u,d,h=a.kdfSalt,f=n.util.createBuffer(a.kdfIterationCount);switch(f=f.getInt(f.length()<<3),s.oids[e]){case"aes128-CBC":u=16,d=n.aes.createDecryptionCipher;break;case"aes192-CBC":u=24,d=n.aes.createDecryptionCipher;break;case"aes256-CBC":u=32,d=n.aes.createDecryptionCipher;break;case"des-EDE3-CBC":u=24,d=n.des.createDecryptionCipher;break;case"desCBC":u=8,d=n.des.createDecryptionCipher}var g=p(a.prfOid),m=n.pkcs5.pbkdf2(r,h,f,u,g),y=a.encIv,v=d(m);return v.start(y),v},s.pbe.getCipherForPKCS12PBE=function(e,t,r){var i={},a=[];if(!o.validate(t,u,i,a))throw(g=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.")).errors=a,g;var c,l,d,h=n.util.createBuffer(i.salt),f=n.util.createBuffer(i.iterations);switch(f=f.getInt(f.length()<<3),e){case s.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:c=24,l=8,d=n.des.startDecrypting;break;case s.oids["pbewithSHAAnd40BitRC2-CBC"]:c=5,l=8,d=function(e,t){var r=n.rc2.createDecryptionCipher(e,40);return r.start(t,null),r};break;default:var g;throw(g=new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.")).oid=e,g}var m=p(i.prfOid),y=s.pbe.generatePkcs12Key(r,h,1,f,c,m);return m.start(),d(y,s.pbe.generatePkcs12Key(r,h,2,f,l,m))},s.pbe.opensslDeriveBytes=function(e,t,r,i){if(null==i){if(!("md5"in n.md))throw new Error('"md5" hash algorithm unavailable.');i=n.md.md5.create()}null===t&&(t="");for(var o=[d(i,e+t)],s=16,a=1;s{var n=r(56105);r(5945),r(91183),r(56827);var i,o=n.pkcs5=n.pkcs5||{};n.util.isNodejs&&!n.options.usePureJavaScript&&(i=r(6113)),e.exports=n.pbkdf2=o.pbkdf2=function(e,t,r,o,s,a){if("function"==typeof s&&(a=s,s=null),n.util.isNodejs&&!n.options.usePureJavaScript&&i.pbkdf2&&(null===s||"object"!=typeof s)&&(i.pbkdf2Sync.length>4||!s||"sha1"===s))return"string"!=typeof s&&(s="sha1"),e=Buffer.from(e,"binary"),t=Buffer.from(t,"binary"),a?4===i.pbkdf2Sync.length?i.pbkdf2(e,t,r,o,(function(e,t){if(e)return a(e);a(null,t.toString("binary"))})):i.pbkdf2(e,t,r,o,s,(function(e,t){if(e)return a(e);a(null,t.toString("binary"))})):4===i.pbkdf2Sync.length?i.pbkdf2Sync(e,t,r,o).toString("binary"):i.pbkdf2Sync(e,t,r,o,s).toString("binary");if(null==s&&(s="sha1"),"string"==typeof s){if(!(s in n.md.algorithms))throw new Error("Unknown hash algorithm: "+s);s=n.md[s].create()}var c=s.digestLength;if(o>4294967295*c){var l=new Error("Derived key is too long.");if(a)return a(l);throw l}var u=Math.ceil(o/c),d=o-(u-1)*c,p=n.hmac.create();p.start(s,e);var h,f,g,m="";if(!a){for(var y=1;y<=u;++y){p.start(null,null),p.update(t),p.update(n.util.int32ToBytes(y)),h=g=p.digest().getBytes();for(var v=2;v<=r;++v)p.start(null,null),p.update(g),f=p.digest().getBytes(),h=n.util.xorBytes(h,f,c),g=f;m+=yu)return a(null,m);p.start(null,null),p.update(t),p.update(n.util.int32ToBytes(y)),h=g=p.digest().getBytes(),v=2,b()}function b(){if(v<=r)return p.start(null,null),p.update(g),f=p.digest().getBytes(),h=n.util.xorBytes(h,f,c),g=f,++v,n.util.setImmediate(b);m+=y{var n=r(56105);r(56827);var i=e.exports=n.pem=n.pem||{};function o(e){for(var t=e.name+": ",r=[],n=function(e,t){return" "+t},i=0;i65&&-1!==s){var a=t[s];","===a?(++s,t=t.substr(0,s)+"\r\n "+t.substr(s)):t=t.substr(0,s)+"\r\n"+a+t.substr(s+1),o=i-s-1,s=-1,++i}else" "!==t[i]&&"\t"!==t[i]&&","!==t[i]||(s=i);return t}function s(e){return e.replace(/^\s+/,"")}i.encode=function(e,t){t=t||{};var r,i="-----BEGIN "+e.type+"-----\r\n";if(e.procType&&(i+=o(r={name:"Proc-Type",values:[String(e.procType.version),e.procType.type]})),e.contentDomain&&(i+=o(r={name:"Content-Domain",values:[e.contentDomain]})),e.dekInfo&&(r={name:"DEK-Info",values:[e.dekInfo.algorithm]},e.dekInfo.parameters&&r.values.push(e.dekInfo.parameters),i+=o(r)),e.headers)for(var s=0;s{var n=r(56105);r(56827),r(46572),r(98967);var i=e.exports=n.pkcs1=n.pkcs1||{};function o(e,t,r){r||(r=n.md.sha1.create());for(var i="",o=Math.ceil(t/r.digestLength),s=0;s>24&255,s>>16&255,s>>8&255,255&s);r.start(),r.update(e+a),i+=r.digest().getBytes()}return i.substring(0,t)}i.encode_rsa_oaep=function(e,t,r){var i,s,a,c;"string"==typeof r?(i=r,s=arguments[3]||void 0,a=arguments[4]||void 0):r&&(i=r.label||void 0,s=r.seed||void 0,a=r.md||void 0,r.mgf1&&r.mgf1.md&&(c=r.mgf1.md)),a?a.start():a=n.md.sha1.create(),c||(c=a);var l=Math.ceil(e.n.bitLength()/8),u=l-2*a.digestLength-2;if(t.length>u)throw(m=new Error("RSAES-OAEP input message length is too long.")).length=t.length,m.maxLength=u,m;i||(i=""),a.update(i,"raw");for(var d=a.digest(),p="",h=u-t.length,f=0;f{var n=r(56105);r(61057),r(5945),r(81877),r(44207),r(4173),r(46572),r(69597),r(98967),r(56827),r(46461);var i=n.asn1,o=n.pki,s=e.exports=n.pkcs12=n.pkcs12||{},a={name:"ContentInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:i.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},c={name:"PFX",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},a,{name:"PFX.macData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",tagClass:i.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},l={name:"SafeBag",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SafeBag.bagId",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:i.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},u={name:"Attribute",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"oid"},{name:"Attribute.attrValues",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0,capture:"values"}]},d={name:"CertBag",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:i.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:i.Class.UNIVERSAL,type:i.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};function p(e,t,r,n){for(var i=[],o=0;o=0&&i.push(a):i.push(a))}return i}function h(e){if(e.composed||e.constructed){for(var t=n.util.createBuffer(),r=0;r0&&(c=i.create(i.Class.UNIVERSAL,i.Type.SET,!0,d));var p=[],h=[];null!==t&&(h=n.util.isArray(t)?t:[t]);for(var f=[],g=0;g0){var _=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,f),b=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.oids.data).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,i.toDer(_).getBytes())])]);p.push(b)}var w=null;if(null!==e){var C=o.wrapRsaPrivateKey(o.privateKeyToAsn1(e));w=null===r?i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.oids.keyBag).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[C]),c]):i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.oids.pkcs8ShroudedKeyBag).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[o.encryptPrivateKeyInfo(C,r,a)]),c]);var E=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[w]),T=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.oids.data).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,i.toDer(E).getBytes())])]);p.push(T)}var S,x=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,p);if(a.useMac){var k=n.md.sha1.create(),I=new n.util.ByteBuffer(n.random.getBytes(a.saltSize)),A=a.count,P=(e=s.generateKey(r,I,3,A,20),n.hmac.create());P.start(k,e),P.update(i.toDer(x).getBytes());var R=P.getMac();S=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.oids.sha1).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.NULL,!1,"")]),i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,R.getBytes())]),i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,I.getBytes()),i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(A).getBytes())])}return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(3).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.oids.data).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,i.toDer(x).getBytes())])]),S])},s.generateKey=n.pbe.generatePkcs12Key},45067:(e,t,r)=>{var n=r(56105);r(60070),r(61057),r(62148),r(81877),r(25661),r(44207),r(46572),r(56827),r(46461);var i=n.asn1,o=e.exports=n.pkcs7=n.pkcs7||{};function s(e){var t={},r=[];if(!i.validate(e,o.asn1.recipientInfoValidator,t,r)){var s=new Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo.");throw s.errors=r,s}return{version:t.version.charCodeAt(0),issuer:n.pki.RDNAttributesAsArray(t.issuer),serialNumber:n.util.createBuffer(t.serial).toHex(),encryptedContent:{algorithm:i.derToOid(t.encAlgorithm),parameter:t.encParameter?t.encParameter.value:void 0,content:t.encKey}}}function a(e){for(var t,r=[],o=0;o0){for(var r=i.create(i.Class.CONTEXT_SPECIFIC,1,!0,[]),o=0;o=r&&s0&&s.value[0].value.push(i.create(i.Class.CONTEXT_SPECIFIC,0,!0,t)),o.length>0&&s.value[0].value.push(i.create(i.Class.CONTEXT_SPECIFIC,1,!0,o)),s.value[0].value.push(i.create(i.Class.UNIVERSAL,i.Type.SET,!0,e.signerInfos)),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.type).getBytes()),s])},addSigner:function(t){var r=t.issuer,i=t.serialNumber;if(t.certificate){var o=t.certificate;"string"==typeof o&&(o=n.pki.certificateFromPem(o)),r=o.issuer.attributes,i=o.serialNumber}var s=t.key;if(!s)throw new Error("Could not add PKCS#7 signer; no private key specified.");"string"==typeof s&&(s=n.pki.privateKeyFromPem(s));var a=t.digestAlgorithm||n.pki.oids.sha1;switch(a){case n.pki.oids.sha1:case n.pki.oids.sha256:case n.pki.oids.sha384:case n.pki.oids.sha512:case n.pki.oids.md5:break;default:throw new Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+a)}var c=t.authenticatedAttributes||[];if(c.length>0){for(var l=!1,u=!1,d=0;d{var n=r(56105);r(61057),r(56827);var i=n.asn1,o=e.exports=n.pkcs7asn1=n.pkcs7asn1||{};n.pkcs7=n.pkcs7||{},n.pkcs7.asn1=o;var s={name:"ContentInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};o.contentInfoValidator=s;var a={name:"EncryptedContentInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:i.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};o.envelopedDataValidator={name:"EnvelopedData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(a)},o.encryptedDataValidator={name:"EncryptedData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"}].concat(a)};var c={name:"SignerInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:i.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:i.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]};o.signedDataValidator={name:"SignedData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0,captureAsn1:"digestAlgorithms"},s,{name:"SignedData.Certificates",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:i.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,capture:"signerInfos",optional:!0,value:[c]}]},o.recipientInfoValidator={name:"RecipientInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:i.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter",optional:!0}]},{name:"RecipientInfo.encryptedKey",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}},23245:(e,t,r)=>{var n=r(56105);r(61057),r(81877),r(4173),r(25661),r(72299),r(88577),r(51242),r(69597),r(56827),r(46461);var i=n.asn1,o=e.exports=n.pki=n.pki||{};o.pemToDer=function(e){var t=n.pem.decode(e)[0];if(t.procType&&"ENCRYPTED"===t.procType.type)throw new Error("Could not convert PEM to DER; PEM is encrypted.");return n.util.createBuffer(t.body)},o.privateKeyFromPem=function(e){var t=n.pem.decode(e)[0];if("PRIVATE KEY"!==t.type&&"RSA PRIVATE KEY"!==t.type){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&&"ENCRYPTED"===t.procType.type)throw new Error("Could not convert private key from PEM; PEM is encrypted.");var s=i.fromDer(t.body);return o.privateKeyFromAsn1(s)},o.privateKeyToPem=function(e,t){var r={type:"RSA PRIVATE KEY",body:i.toDer(o.privateKeyToAsn1(e)).getBytes()};return n.pem.encode(r,{maxline:t})},o.privateKeyInfoToPem=function(e,t){var r={type:"PRIVATE KEY",body:i.toDer(e).getBytes()};return n.pem.encode(r,{maxline:t})}},77466:(e,t,r)=>{var n=r(56105);r(56827),r(10017),r(46572),function(){if(n.prime)e.exports=n.prime;else{var t=e.exports=n.prime=n.prime||{},r=n.jsbn.BigInteger,i=[6,4,2,4,2,4,6,2],o=new r(null);o.fromInt(30);var s=function(e,t){return e|t};t.generateProbablePrime=function(e,t,i){"function"==typeof t&&(i=t,t={});var o=(t=t||{}).algorithm||"PRIMEINC";"string"==typeof o&&(o={name:o}),o.options=o.options||{};var s=t.prng||n.random,c={nextBytes:function(e){for(var t=s.getBytesSync(e.length),r=0;re&&(s=l(e,t));var h=s.toString(16);i.target.postMessage({hex:h,workLoad:u}),s.dAddOffset(d,0)}}}h()}(e,t,i,o):a(e,t,i,o)}(e,c,o.options,i);throw new Error("Invalid prime generation algorithm: "+o.name)}}function a(e,t,r,n){var i=l(e,t),o=function(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}(i.bitLength());"millerRabinTests"in r&&(o=r.millerRabinTests);var s=10;"maxBlockTime"in r&&(s=r.maxBlockTime),c(i,e,t,0,o,s,n)}function c(e,t,r,o,s,a,u){var d=+new Date;do{if(e.bitLength()>t&&(e=l(t,r)),e.isProbablePrime(s))return u(null,e);e.dAddOffset(i[o++%8],0)}while(a<0||+new Date-d{var n=r(56105);r(56827);var i=null;!n.util.isNodejs||n.options.usePureJavaScript||process.versions["node-webkit"]||(i=r(6113)),(e.exports=n.prng=n.prng||{}).create=function(e){for(var t={plugin:e,key:null,seed:null,time:null,reseeds:0,generated:0,keyBytes:""},r=e.md,o=new Array(32),s=0;s<32;++s)o[s]=r.create();function a(){if(t.pools[0].messageLength>=32)return c();var e=32-t.pools[0].messageLength<<5;t.collect(t.seedFileSync(e)),c()}function c(){t.reseeds=4294967295===t.reseeds?0:t.reseeds+1;var e=t.plugin.md.create();e.update(t.keyBytes);for(var r=1,n=0;n<32;++n)t.reseeds%r==0&&(e.update(t.pools[n].digest().getBytes()),t.pools[n].start()),r<<=1;t.keyBytes=e.digest().getBytes(),e.start(),e.update(t.keyBytes);var i=e.digest().getBytes();t.key=t.plugin.formatKey(t.keyBytes),t.seed=t.plugin.formatSeed(i),t.generated=0}function l(e){var t=null,r=n.util.globalScope,i=r.crypto||r.msCrypto;i&&i.getRandomValues&&(t=function(e){return i.getRandomValues(e)});var o=n.util.createBuffer();if(t)for(;o.length()>16)))<<16,p=4294967295&(u=(2147483647&(u+=l>>15))+(u>>31)),c=0;c<3;++c)d=p>>>(c<<3),d^=Math.floor(256*Math.random()),o.putByte(255&d);return o.getBytes(e)}return t.pools=o,t.pool=0,t.generate=function(e,r){if(!r)return t.generateSync(e);var i=t.plugin.cipher,o=t.plugin.increment,s=t.plugin.formatKey,a=t.plugin.formatSeed,l=n.util.createBuffer();t.key=null,function u(d){if(d)return r(d);if(l.length()>=e)return r(null,l.getBytes(e));if(t.generated>1048575&&(t.key=null),null===t.key)return n.util.nextTick((function(){!function(e){if(t.pools[0].messageLength>=32)return c(),e();var r=32-t.pools[0].messageLength<<5;t.seedFile(r,(function(r,n){if(r)return e(r);t.collect(n),c(),e()}))}(u)}));var p=i(t.key,t.seed);t.generated+=p.length,l.putBytes(p),t.key=s(i(t.key,o(t.seed))),t.seed=a(i(t.key,t.seed)),n.util.setImmediate(u)}()},t.generateSync=function(e){var r=t.plugin.cipher,i=t.plugin.increment,o=t.plugin.formatKey,s=t.plugin.formatSeed;t.key=null;for(var c=n.util.createBuffer();c.length()1048575&&(t.key=null),null===t.key&&a();var l=r(t.key,t.seed);t.generated+=l.length,c.putBytes(l),t.key=o(r(t.key,i(t.seed))),t.seed=s(r(t.key,t.seed))}return c.getBytes(e)},i?(t.seedFile=function(e,t){i.randomBytes(e,(function(e,r){if(e)return t(e);t(null,r.toString())}))},t.seedFileSync=function(e){return i.randomBytes(e).toString()}):(t.seedFile=function(e,t){try{t(null,l(e))}catch(e){t(e)}},t.seedFileSync=l),t.collect=function(e){for(var r=e.length,n=0;n>i&255);t.collect(n)},t.registerWorker=function(e){e===self?t.seedFile=function(e,t){self.addEventListener("message",(function e(r){var n=r.data;n.forge&&n.forge.prng&&(self.removeEventListener("message",e),t(n.forge.prng.err,n.forge.prng.bytes))})),self.postMessage({forge:{prng:{needed:e}}})}:e.addEventListener("message",(function(r){var n=r.data;n.forge&&n.forge.prng&&t.seedFile(n.forge.prng.needed,(function(t,r){e.postMessage({forge:{prng:{err:t,bytes:r}}})}))}))},t}},51242:(e,t,r)=>{var n=r(56105);r(46572),r(56827),(e.exports=n.pss=n.pss||{}).create=function(e){3===arguments.length&&(e={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var t,r=e.md,i=e.mgf,o=r.digestLength,s=e.salt||null;if("string"==typeof s&&(s=n.util.createBuffer(s)),"saltLength"in e)t=e.saltLength;else{if(null===s)throw new Error("Salt length not specified or specific salt not given.");t=s.length()}if(null!==s&&s.length()!==t)throw new Error("Given salt length does not match length of given salt.");var a=e.prng||n.random,c={encode:function(e,c){var l,u,d=c-1,p=Math.ceil(d/8),h=e.digest().getBytes();if(p>8*p-d&255;return(b=String.fromCharCode(b.charCodeAt(0)&~w)+b.substr(1))+g+String.fromCharCode(188)},verify:function(e,s,a){var c,l=a-1,u=Math.ceil(l/8);if(s=s.substr(-u),u>8*u-l&255;if(0!=(p.charCodeAt(0)&f))throw new Error("Bits beyond keysize not zero as expected.");var g=i.generate(h,d),m="";for(c=0;c{var n=r(56105);r(60070),r(12262),r(26759),r(56827),n.random&&n.random.getBytes?e.exports=n.random:function(t){var r={},i=new Array(4),o=n.util.createBuffer();function s(){var e=n.prng.create(r);return e.getBytes=function(t,r){return e.generate(t,r)},e.getBytesSync=function(t){return e.generate(t)},e}r.formatKey=function(e){var t=n.util.createBuffer(e);return(e=new Array(4))[0]=t.getInt32(),e[1]=t.getInt32(),e[2]=t.getInt32(),e[3]=t.getInt32(),n.aes._expandKey(e,!1)},r.formatSeed=function(e){var t=n.util.createBuffer(e);return(e=new Array(4))[0]=t.getInt32(),e[1]=t.getInt32(),e[2]=t.getInt32(),e[3]=t.getInt32(),e},r.cipher=function(e,t){return n.aes._updateBlock(e,t,i,!1),o.putInt32(i[0]),o.putInt32(i[1]),o.putInt32(i[2]),o.putInt32(i[3]),o.getBytes()},r.increment=function(e){return++e[3],e},r.md=n.md.sha256;var a=s(),c=null,l=n.util.globalScope,u=l.crypto||l.msCrypto;if(u&&u.getRandomValues&&(c=function(e){return u.getRandomValues(e)}),n.options.usePureJavaScript||!n.util.isNodejs&&!c){if("undefined"==typeof window||window.document,a.collectInt(+new Date,32),"undefined"!=typeof navigator){var d="";for(var p in navigator)try{"string"==typeof navigator[p]&&(d+=navigator[p])}catch(e){}a.collect(d),d=null}t&&(t().mousemove((function(e){a.collectInt(e.clientX,16),a.collectInt(e.clientY,16)})),t().keypress((function(e){a.collectInt(e.charCode,8)})))}if(n.random)for(var p in a)n.random[p]=a[p];else n.random=a;n.random.createInstance=s,e.exports=n.random}("undefined"!=typeof jQuery?jQuery:null)},50514:(e,t,r)=>{var n=r(56105);r(56827);var i=[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],o=[1,2,3,5],s=function(e,t){return e<>16-t},a=function(e,t){return(65535&e)>>t|e<<16-t&65535};e.exports=n.rc2=n.rc2||{},n.rc2.expandKey=function(e,t){"string"==typeof e&&(e=n.util.createBuffer(e)),t=t||128;var r,o=e,s=e.length(),a=t,c=Math.ceil(a/8),l=255>>(7&a);for(r=s;r<128;r++)o.putByte(i[o.at(r-1)+o.at(r-s)&255]);for(o.setAt(128-c,i[o.at(128-c)&l]),r=127-c;r>=0;r--)o.setAt(r,i[o.at(r+1)^o.at(r+c)]);return o};var c=function(e,t,r){var i,c,l,u,d=!1,p=null,h=null,f=null,g=[];for(e=n.rc2.expandKey(e,t),l=0;l<64;l++)g.push(e.getInt16Le());r?(i=function(e){for(l=0;l<4;l++)e[l]+=g[u]+(e[(l+3)%4]&e[(l+2)%4])+(~e[(l+3)%4]&e[(l+1)%4]),e[l]=s(e[l],o[l]),u++},c=function(e){for(l=0;l<4;l++)e[l]+=g[63&e[(l+3)%4]]}):(i=function(e){for(l=3;l>=0;l--)e[l]=a(e[l],o[l]),e[l]-=g[u]+(e[(l+3)%4]&e[(l+2)%4])+(~e[(l+3)%4]&e[(l+1)%4]),u--},c=function(e){for(l=3;l>=0;l--)e[l]-=g[63&e[(l+3)%4]]});var m=function(e){var t=[];for(l=0;l<4;l++){var n=p.getInt16Le();null!==f&&(r?n^=f.getInt16Le():f.putInt16Le(n)),t.push(65535&n)}u=r?0:63;for(var i=0;i=8;)m([[5,i],[1,c],[6,i],[1,c],[5,i]])},finish:function(e){var t=!0;if(r)if(e)t=e(8,p,!r);else{var n=8===p.length()?8:8-p.length();p.fillWithByte(n,n)}if(t&&(d=!0,y.update()),!r&&(t=0===p.length()))if(e)t=e(8,h,!r);else{var i=h.length(),o=h.at(i-1);o>i?t=!1:h.truncate(o)}return t}}};n.rc2.startEncrypting=function(e,t,r){var i=n.rc2.createEncryptionCipher(e,128);return i.start(t,r),i},n.rc2.createEncryptionCipher=function(e,t){return c(e,t,!0)},n.rc2.startDecrypting=function(e,t,r){var i=n.rc2.createDecryptionCipher(e,128);return i.start(t,r),i},n.rc2.createDecryptionCipher=function(e,t){return c(e,t,!1)}},69597:(e,t,r)=>{var n=r(56105);if(r(61057),r(10017),r(81877),r(30585),r(77466),r(46572),r(56827),void 0===i)var i=n.jsbn.BigInteger;var o=n.util.isNodejs?r(6113):null,s=n.asn1,a=n.util;n.pki=n.pki||{},e.exports=n.pki.rsa=n.rsa=n.rsa||{};var c=n.pki,l=[6,4,2,4,2,4,6,2],u={name:"PrivateKeyInfo",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:s.Class.UNIVERSAL,type:s.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},d={name:"RSAPrivateKey",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},p={name:"RSAPublicKey",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},h=n.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:s.Class.UNIVERSAL,type:s.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},f={name:"DigestInfo",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm.algorithmIdentifier",tagClass:s.Class.UNIVERSAL,type:s.Type.OID,constructed:!1,capture:"algorithmIdentifier"},{name:"DigestInfo.DigestAlgorithm.parameters",tagClass:s.Class.UNIVERSAL,type:s.Type.NULL,capture:"parameters",optional:!0,constructed:!1}]},{name:"DigestInfo.digest",tagClass:s.Class.UNIVERSAL,type:s.Type.OCTETSTRING,constructed:!1,capture:"digest"}]},g=function(e){var t;if(!(e.algorithm in c.oids)){var r=new Error("Unknown message digest algorithm.");throw r.algorithm=e.algorithm,r}t=c.oids[e.algorithm];var n=s.oidToDer(t).getBytes(),i=s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[]),o=s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[]);o.value.push(s.create(s.Class.UNIVERSAL,s.Type.OID,!1,n)),o.value.push(s.create(s.Class.UNIVERSAL,s.Type.NULL,!1,""));var a=s.create(s.Class.UNIVERSAL,s.Type.OCTETSTRING,!1,e.digest().getBytes());return i.value.push(o),i.value.push(a),s.toDer(i).getBytes()},m=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);var o;t.dP||(t.dP=t.d.mod(t.p.subtract(i.ONE))),t.dQ||(t.dQ=t.d.mod(t.q.subtract(i.ONE))),t.qInv||(t.qInv=t.q.modInverse(t.p));do{o=new i(n.util.bytesToHex(n.random.getBytes(t.n.bitLength()/8)),16)}while(o.compareTo(t.n)>=0||!o.gcd(t.n).equals(i.ONE));for(var s=(e=e.multiply(o.modPow(t.e,t.n)).mod(t.n)).mod(t.p).modPow(t.dP,t.p),a=e.mod(t.q).modPow(t.dQ,t.q);s.compareTo(a)<0;)s=s.add(t.p);var c=s.subtract(a).multiply(t.qInv).mod(t.p).multiply(t.q).add(a);return c.multiply(o.modInverse(t.n)).mod(t.n)};function y(e,t,r){var i=n.util.createBuffer(),o=Math.ceil(t.n.bitLength()/8);if(e.length>o-11){var s=new Error("Message is too long for PKCS#1 v1.5 padding.");throw s.length=e.length,s.max=o-11,s}i.putByte(0),i.putByte(r);var a,c=o-3-e.length;if(0===r||1===r){a=0===r?0:255;for(var l=0;l0;){var u=0,d=n.random.getBytes(c);for(l=0;l1;){if(255!==s.getByte()){--s.read;break}++l}else if(2===c)for(l=0;s.length()>1;){if(0===s.getByte()){--s.read;break}++l}if(0!==s.getByte()||l!==o-3-s.length())throw new Error("Encryption block is invalid.");return s.getBytes()}function _(e,t,r){"function"==typeof t&&(r=t,t={});var o={algorithm:{name:(t=t||{}).algorithm||"PRIMEINC",options:{workers:t.workers||2,workLoad:t.workLoad||100,workerScript:t.workerScript}}};function s(){a(e.pBits,(function(t,n){return t?r(t):(e.p=n,null!==e.q?l(t,e.q):void a(e.qBits,l))}))}function a(e,t){n.prime.generateProbablePrime(e,o,t)}function l(t,n){if(t)return r(t);if(e.q=n,e.p.compareTo(e.q)<0){var o=e.p;e.p=e.q,e.q=o}if(0!==e.p.subtract(i.ONE).gcd(e.e).compareTo(i.ONE))return e.p=null,void s();if(0!==e.q.subtract(i.ONE).gcd(e.e).compareTo(i.ONE))return e.q=null,void a(e.qBits,l);if(e.p1=e.p.subtract(i.ONE),e.q1=e.q.subtract(i.ONE),e.phi=e.p1.multiply(e.q1),0!==e.phi.gcd(e.e).compareTo(i.ONE))return e.p=e.q=null,void s();if(e.n=e.p.multiply(e.q),e.n.bitLength()!==e.bits)return e.q=null,void a(e.qBits,l);var u=e.e.modInverse(e.phi);e.keys={privateKey:c.rsa.setPrivateKey(e.n,e.e,u,e.p,e.q,u.mod(e.p1),u.mod(e.q1),e.q.modInverse(e.p)),publicKey:c.rsa.setPublicKey(e.n,e.e)},r(null,e.keys)}"prng"in t&&(o.prng=t.prng),s()}function b(e){var t=e.toString(16);t[0]>="8"&&(t="00"+t);var r=n.util.hexToBytes(t);return r.length>1&&(0===r.charCodeAt(0)&&0==(128&r.charCodeAt(1))||255===r.charCodeAt(0)&&128==(128&r.charCodeAt(1)))?r.substr(1):r}function w(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}function C(e){return n.util.isNodejs&&"function"==typeof o[e]}function E(e){return void 0!==a.globalScope&&"object"==typeof a.globalScope.crypto&&"object"==typeof a.globalScope.crypto.subtle&&"function"==typeof a.globalScope.crypto.subtle[e]}function T(e){return void 0!==a.globalScope&&"object"==typeof a.globalScope.msCrypto&&"object"==typeof a.globalScope.msCrypto.subtle&&"function"==typeof a.globalScope.msCrypto.subtle[e]}function S(e){for(var t=n.util.hexToBytes(e.toString(16)),r=new Uint8Array(t.length),i=0;i0;)u.putByte(0),--d;return u.putBytes(n.util.hexToBytes(l)),u.getBytes()},c.rsa.decrypt=function(e,t,r,o){var s=Math.ceil(t.n.bitLength()/8);if(e.length!==s){var a=new Error("Encrypted message length is invalid.");throw a.length=e.length,a.expected=s,a}var c=new i(n.util.createBuffer(e).toHex(),16);if(c.compareTo(t.n)>=0)throw new Error("Encrypted message is invalid.");for(var l=m(c,t,r).toString(16),u=n.util.createBuffer(),d=s-Math.ceil(l.length/2);d>0;)u.putByte(0),--d;return u.putBytes(n.util.hexToBytes(l)),!1!==o?v(u.getBytes(),t,r):u.getBytes()},c.rsa.createKeyPairGenerationState=function(e,t,r){"string"==typeof e&&(e=parseInt(e,10)),e=e||2048;var o,s=(r=r||{}).prng||n.random,a={nextBytes:function(e){for(var t=s.getBytesSync(e.length),r=0;r>1,pBits:e-(e>>1),pqState:0,num:null,keys:null}).e.fromInt(o.eInt),o},c.rsa.stepKeyPairGenerationState=function(e,t){"algorithm"in e||(e.algorithm="PRIMEINC");var r=new i(null);r.fromInt(30);for(var n,o=0,s=function(e,t){return e|t},a=+new Date,u=0;null===e.keys&&(t<=0||ud?e.pqState=0:e.num.isProbablePrime(w(e.num.bitLength()))?++e.pqState:e.num.dAddOffset(l[o++%8],0):2===e.pqState?e.pqState=0===e.num.subtract(i.ONE).gcd(e.e).compareTo(i.ONE)?3:0:3===e.pqState&&(e.pqState=0,null===e.p?e.p=e.num:e.q=e.num,null!==e.p&&null!==e.q&&++e.state,e.num=null)}else if(1===e.state)e.p.compareTo(e.q)<0&&(e.num=e.p,e.p=e.q,e.q=e.num),++e.state;else if(2===e.state)e.p1=e.p.subtract(i.ONE),e.q1=e.q.subtract(i.ONE),e.phi=e.p1.multiply(e.q1),++e.state;else if(3===e.state)0===e.phi.gcd(e.e).compareTo(i.ONE)?++e.state:(e.p=null,e.q=null,e.state=0);else if(4===e.state)e.n=e.p.multiply(e.q),e.n.bitLength()===e.bits?++e.state:(e.q=null,e.state=0);else if(5===e.state){var h=e.e.modInverse(e.phi);e.keys={privateKey:c.rsa.setPrivateKey(e.n,e.e,h,e.p,e.q,h.mod(e.p1),h.mod(e.q1),e.q.modInverse(e.p)),publicKey:c.rsa.setPublicKey(e.n,e.e)}}u+=(n=+new Date)-a,a=n}return null!==e.keys},c.rsa.generateKeyPair=function(e,t,r,i){if(1===arguments.length?"object"==typeof e?(r=e,e=void 0):"function"==typeof e&&(i=e,e=void 0):2===arguments.length?"number"==typeof e?"function"==typeof t?(i=t,t=void 0):"number"!=typeof t&&(r=t,t=void 0):(r=e,i=t,e=void 0,t=void 0):3===arguments.length&&("number"==typeof t?"function"==typeof r&&(i=r,r=void 0):(i=r,r=t,t=void 0)),r=r||{},void 0===e&&(e=r.bits||2048),void 0===t&&(t=r.e||65537),!n.options.usePureJavaScript&&!r.prng&&e>=256&&e<=16384&&(65537===t||3===t))if(i){if(C("generateKeyPair"))return o.generateKeyPair("rsa",{modulusLength:e,publicExponent:t,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}},(function(e,t,r){if(e)return i(e);i(null,{privateKey:c.privateKeyFromPem(r),publicKey:c.publicKeyFromPem(t)})}));if(E("generateKey")&&E("exportKey"))return a.globalScope.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:S(t),hash:{name:"SHA-256"}},!0,["sign","verify"]).then((function(e){return a.globalScope.crypto.subtle.exportKey("pkcs8",e.privateKey)})).then(void 0,(function(e){i(e)})).then((function(e){if(e){var t=c.privateKeyFromAsn1(s.fromDer(n.util.createBuffer(e)));i(null,{privateKey:t,publicKey:c.setRsaPublicKey(t.n,t.e)})}}));if(T("generateKey")&&T("exportKey")){var l=a.globalScope.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:S(t),hash:{name:"SHA-256"}},!0,["sign","verify"]);return l.oncomplete=function(e){var t=e.target.result,r=a.globalScope.msCrypto.subtle.exportKey("pkcs8",t.privateKey);r.oncomplete=function(e){var t=e.target.result,r=c.privateKeyFromAsn1(s.fromDer(n.util.createBuffer(t)));i(null,{privateKey:r,publicKey:c.setRsaPublicKey(r.n,r.e)})},r.onerror=function(e){i(e)}},void(l.onerror=function(e){i(e)})}}else if(C("generateKeyPairSync")){var u=o.generateKeyPairSync("rsa",{modulusLength:e,publicExponent:t,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}});return{privateKey:c.privateKeyFromPem(u.privateKey),publicKey:c.publicKeyFromPem(u.publicKey)}}var d=c.rsa.createKeyPairGenerationState(e,t,r);if(!i)return c.rsa.stepKeyPairGenerationState(d,0),d.keys;_(d,r,i)},c.setRsaPublicKey=c.rsa.setPublicKey=function(e,t){var r={n:e,e:t,encrypt:function(e,t,i){if("string"==typeof t?t=t.toUpperCase():void 0===t&&(t="RSAES-PKCS1-V1_5"),"RSAES-PKCS1-V1_5"===t)t={encode:function(e,t,r){return y(e,t,2).getBytes()}};else if("RSA-OAEP"===t||"RSAES-OAEP"===t)t={encode:function(e,t){return n.pkcs1.encode_rsa_oaep(t,e,i)}};else if(-1!==["RAW","NONE","NULL",null].indexOf(t))t={encode:function(e){return e}};else if("string"==typeof t)throw new Error('Unsupported encryption scheme: "'+t+'".');var o=t.encode(e,r,!0);return c.rsa.encrypt(o,r,!0)},verify:function(e,t,i,o){"string"==typeof i?i=i.toUpperCase():void 0===i&&(i="RSASSA-PKCS1-V1_5"),void 0===o&&(o={_parseAllDigestBytes:!0}),"_parseAllDigestBytes"in o||(o._parseAllDigestBytes=!0),"RSASSA-PKCS1-V1_5"===i?i={verify:function(e,t){t=v(t,r,!0);var i=s.fromDer(t,{parseAllBytes:o._parseAllDigestBytes}),a={},c=[];if(!s.validate(i,f,a,c))throw(l=new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value.")).errors=c,l;var l,u=s.derToOid(a.algorithmIdentifier);if(u!==n.oids.md2&&u!==n.oids.md5&&u!==n.oids.sha1&&u!==n.oids.sha224&&u!==n.oids.sha256&&u!==n.oids.sha384&&u!==n.oids.sha512&&u!==n.oids["sha512-224"]&&u!==n.oids["sha512-256"])throw(l=new Error("Unknown RSASSA-PKCS1-v1_5 DigestAlgorithm identifier.")).oid=u,l;if((u===n.oids.md2||u===n.oids.md5)&&!("parameters"in a))throw new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value. Missing algorithm identifer NULL parameters.");return e===a.digest}}:"NONE"!==i&&"NULL"!==i&&null!==i||(i={verify:function(e,t){return e===v(t,r,!0)}});var a=c.rsa.decrypt(t,r,!0,!1);return i.verify(e,a,r.n.bitLength())}};return r},c.setRsaPrivateKey=c.rsa.setPrivateKey=function(e,t,r,i,o,s,a,l){var u={n:e,e:t,d:r,p:i,q:o,dP:s,dQ:a,qInv:l,decrypt:function(e,t,r){"string"==typeof t?t=t.toUpperCase():void 0===t&&(t="RSAES-PKCS1-V1_5");var i=c.rsa.decrypt(e,u,!1,!1);if("RSAES-PKCS1-V1_5"===t)t={decode:v};else if("RSA-OAEP"===t||"RSAES-OAEP"===t)t={decode:function(e,t){return n.pkcs1.decode_rsa_oaep(t,e,r)}};else{if(-1===["RAW","NONE","NULL",null].indexOf(t))throw new Error('Unsupported encryption scheme: "'+t+'".');t={decode:function(e){return e}}}return t.decode(i,u,!1)},sign:function(e,t){var r=!1;"string"==typeof t&&(t=t.toUpperCase()),void 0===t||"RSASSA-PKCS1-V1_5"===t?(t={encode:g},r=1):"NONE"!==t&&"NULL"!==t&&null!==t||(t={encode:function(){return e}},r=1);var n=t.encode(e,u.n.bitLength());return c.rsa.encrypt(n,u,r)}};return u},c.wrapRsaPrivateKey=function(e){return s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,s.integerToDer(0).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.OID,!1,s.oidToDer(c.oids.rsaEncryption).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.NULL,!1,"")]),s.create(s.Class.UNIVERSAL,s.Type.OCTETSTRING,!1,s.toDer(e).getBytes())])},c.privateKeyFromAsn1=function(e){var t,r,o,a,l,p,h,f,g={},m=[];if(s.validate(e,u,g,m)&&(e=s.fromDer(n.util.createBuffer(g.privateKey))),g={},m=[],!s.validate(e,d,g,m)){var y=new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");throw y.errors=m,y}return t=n.util.createBuffer(g.privateKeyModulus).toHex(),r=n.util.createBuffer(g.privateKeyPublicExponent).toHex(),o=n.util.createBuffer(g.privateKeyPrivateExponent).toHex(),a=n.util.createBuffer(g.privateKeyPrime1).toHex(),l=n.util.createBuffer(g.privateKeyPrime2).toHex(),p=n.util.createBuffer(g.privateKeyExponent1).toHex(),h=n.util.createBuffer(g.privateKeyExponent2).toHex(),f=n.util.createBuffer(g.privateKeyCoefficient).toHex(),c.setRsaPrivateKey(new i(t,16),new i(r,16),new i(o,16),new i(a,16),new i(l,16),new i(p,16),new i(h,16),new i(f,16))},c.privateKeyToAsn1=c.privateKeyToRSAPrivateKey=function(e){return s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,s.integerToDer(0).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,b(e.n)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,b(e.e)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,b(e.d)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,b(e.p)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,b(e.q)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,b(e.dP)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,b(e.dQ)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,b(e.qInv))])},c.publicKeyFromAsn1=function(e){var t={},r=[];if(s.validate(e,h,t,r)){var o,a=s.derToOid(t.publicKeyOid);if(a!==c.oids.rsaEncryption)throw(o=new Error("Cannot read public key. Unknown OID.")).oid=a,o;e=t.rsaPublicKey}if(r=[],!s.validate(e,p,t,r))throw(o=new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.")).errors=r,o;var l=n.util.createBuffer(t.publicKeyModulus).toHex(),u=n.util.createBuffer(t.publicKeyExponent).toHex();return c.setRsaPublicKey(new i(l,16),new i(u,16))},c.publicKeyToAsn1=c.publicKeyToSubjectPublicKeyInfo=function(e){return s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.OID,!1,s.oidToDer(c.oids.rsaEncryption).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.NULL,!1,"")]),s.create(s.Class.UNIVERSAL,s.Type.BITSTRING,!1,[c.publicKeyToRSAPublicKey(e)])])},c.publicKeyToRSAPublicKey=function(e){return s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,b(e.n)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,b(e.e))])}},98967:(e,t,r)=>{var n=r(56105);r(91183),r(56827);var i=e.exports=n.sha1=n.sha1||{};n.md.sha1=n.md.algorithms.sha1=i,i.create=function(){s||(o=String.fromCharCode(128),o+=n.util.fillString(String.fromCharCode(0),64),s=!0);var e=null,t=n.util.createBuffer(),r=new Array(80),i={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){i.messageLength=0,i.fullMessageLength=i.messageLength64=[];for(var r=i.messageLengthSize/4,o=0;o>>0,c>>>0];for(var l=i.fullMessageLength.length-1;l>=0;--l)i.fullMessageLength[l]+=c[1],c[1]=c[0]+(i.fullMessageLength[l]/4294967296>>>0),i.fullMessageLength[l]=i.fullMessageLength[l]>>>0,c[0]=c[1]/4294967296>>>0;return t.putBytes(o),a(e,r,t),(t.read>2048||0===t.length())&&t.compact(),i},i.digest=function(){var s=n.util.createBuffer();s.putBytes(t.bytes());var c,l=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1;s.putBytes(o.substr(0,i.blockLength-l));for(var u=8*i.fullMessageLength[0],d=0;d>>0,s.putInt32(u>>>0),u=c>>>0;s.putInt32(u);var p={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4};a(p,r,s);var h=n.util.createBuffer();return h.putInt32(p.h0),h.putInt32(p.h1),h.putInt32(p.h2),h.putInt32(p.h3),h.putInt32(p.h4),h},i};var o=null,s=!1;function a(e,t,r){for(var n,i,o,s,a,c,l,u=r.length();u>=64;){for(i=e.h0,o=e.h1,s=e.h2,a=e.h3,c=e.h4,l=0;l<16;++l)n=r.getInt32(),t[l]=n,n=(i<<5|i>>>27)+(a^o&(s^a))+c+1518500249+n,c=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;for(;l<20;++l)n=(n=t[l-3]^t[l-8]^t[l-14]^t[l-16])<<1|n>>>31,t[l]=n,n=(i<<5|i>>>27)+(a^o&(s^a))+c+1518500249+n,c=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;for(;l<32;++l)n=(n=t[l-3]^t[l-8]^t[l-14]^t[l-16])<<1|n>>>31,t[l]=n,n=(i<<5|i>>>27)+(o^s^a)+c+1859775393+n,c=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;for(;l<40;++l)n=(n=t[l-6]^t[l-16]^t[l-28]^t[l-32])<<2|n>>>30,t[l]=n,n=(i<<5|i>>>27)+(o^s^a)+c+1859775393+n,c=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;for(;l<60;++l)n=(n=t[l-6]^t[l-16]^t[l-28]^t[l-32])<<2|n>>>30,t[l]=n,n=(i<<5|i>>>27)+(o&s|a&(o^s))+c+2400959708+n,c=a,a=s,s=(o<<30|o>>>2)>>>0,o=i,i=n;for(;l<80;++l)n=(n=t[l-6]^t[l-16]^t[l-28]^t[l-32])<<2|n>>>30,t[l]=n,n=(i<<5|i>>>27)+(o^s^a)+c+3395469782+n,c=a,a=s,s=(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+s|0,e.h3=e.h3+a|0,e.h4=e.h4+c|0,u-=64}}},12262:(e,t,r)=>{var n=r(56105);r(91183),r(56827);var i=e.exports=n.sha256=n.sha256||{};n.md.sha256=n.md.algorithms.sha256=i,i.create=function(){s||(o=String.fromCharCode(128),o+=n.util.fillString(String.fromCharCode(0),64),a=[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],s=!0);var e=null,t=n.util.createBuffer(),r=new Array(64),i={algorithm:"sha256",blockLength:64,digestLength:32,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){i.messageLength=0,i.fullMessageLength=i.messageLength64=[];for(var r=i.messageLengthSize/4,o=0;o>>0,a>>>0];for(var l=i.fullMessageLength.length-1;l>=0;--l)i.fullMessageLength[l]+=a[1],a[1]=a[0]+(i.fullMessageLength[l]/4294967296>>>0),i.fullMessageLength[l]=i.fullMessageLength[l]>>>0,a[0]=a[1]/4294967296>>>0;return t.putBytes(o),c(e,r,t),(t.read>2048||0===t.length())&&t.compact(),i},i.digest=function(){var s=n.util.createBuffer();s.putBytes(t.bytes());var a,l=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1;s.putBytes(o.substr(0,i.blockLength-l));for(var u=8*i.fullMessageLength[0],d=0;d>>0,s.putInt32(u>>>0),u=a>>>0;s.putInt32(u);var p={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4,h5:e.h5,h6:e.h6,h7:e.h7};c(p,r,s);var h=n.util.createBuffer();return h.putInt32(p.h0),h.putInt32(p.h1),h.putInt32(p.h2),h.putInt32(p.h3),h.putInt32(p.h4),h.putInt32(p.h5),h.putInt32(p.h6),h.putInt32(p.h7),h},i};var o=null,s=!1,a=null;function c(e,t,r){for(var n,i,o,s,c,l,u,d,p,h,f,g,m,y=r.length();y>=64;){for(c=0;c<16;++c)t[c]=r.getInt32();for(;c<64;++c)n=((n=t[c-2])>>>17|n<<15)^(n>>>19|n<<13)^n>>>10,i=((i=t[c-15])>>>7|i<<25)^(i>>>18|i<<14)^i>>>3,t[c]=n+t[c-7]+i+t[c-16]|0;for(l=e.h0,u=e.h1,d=e.h2,p=e.h3,h=e.h4,f=e.h5,g=e.h6,m=e.h7,c=0;c<64;++c)o=(l>>>2|l<<30)^(l>>>13|l<<19)^(l>>>22|l<<10),s=l&u|d&(l^u),n=m+((h>>>6|h<<26)^(h>>>11|h<<21)^(h>>>25|h<<7))+(g^h&(f^g))+a[c]+t[c],m=g,g=f,f=h,h=p+n>>>0,p=d,d=u,u=l,l=n+(i=o+s)>>>0;e.h0=e.h0+l|0,e.h1=e.h1+u|0,e.h2=e.h2+d|0,e.h3=e.h3+p|0,e.h4=e.h4+h|0,e.h5=e.h5+f|0,e.h6=e.h6+g|0,e.h7=e.h7+m|0,y-=64}}},593:(e,t,r)=>{var n=r(56105);r(91183),r(56827);var i=e.exports=n.sha512=n.sha512||{};n.md.sha512=n.md.algorithms.sha512=i;var o=n.sha384=n.sha512.sha384=n.sha512.sha384||{};o.create=function(){return i.create("SHA-384")},n.md.sha384=n.md.algorithms.sha384=o,n.sha512.sha256=n.sha512.sha256||{create:function(){return i.create("SHA-512/256")}},n.md["sha512/256"]=n.md.algorithms["sha512/256"]=n.sha512.sha256,n.sha512.sha224=n.sha512.sha224||{create:function(){return i.create("SHA-512/224")}},n.md["sha512/224"]=n.md.algorithms["sha512/224"]=n.sha512.sha224,i.create=function(e){if(a||(s=String.fromCharCode(128),s+=n.util.fillString(String.fromCharCode(0),128),c=[[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]],(l={})["SHA-512"]=[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],[528734635,4215389547],[1541459225,327033209]],l["SHA-384"]=[[3418070365,3238371032],[1654270250,914150663],[2438529370,812702999],[355462360,4144912697],[1731405415,4290775857],[2394180231,1750603025],[3675008525,1694076839],[1203062813,3204075428]],l["SHA-512/256"]=[[573645204,4230739756],[2673172387,3360449730],[596883563,1867755857],[2520282905,1497426621],[2519219938,2827943907],[3193839141,1401305490],[721525244,746961066],[246885852,2177182882]],l["SHA-512/224"]=[[2352822216,424955298],[1944164710,2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]],a=!0),void 0===e&&(e="SHA-512"),!(e in l))throw new Error("Invalid SHA-512 algorithm: "+e);for(var t=l[e],r=null,i=n.util.createBuffer(),o=new Array(80),d=0;d<80;++d)o[d]=new Array(2);var p=64;switch(e){case"SHA-384":p=48;break;case"SHA-512/256":p=32;break;case"SHA-512/224":p=28}var h={algorithm:e.replace("-","").toLowerCase(),blockLength:128,digestLength:p,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){h.messageLength=0,h.fullMessageLength=h.messageLength128=[];for(var e=h.messageLengthSize/4,o=0;o>>0,s>>>0];for(var a=h.fullMessageLength.length-1;a>=0;--a)h.fullMessageLength[a]+=s[1],s[1]=s[0]+(h.fullMessageLength[a]/4294967296>>>0),h.fullMessageLength[a]=h.fullMessageLength[a]>>>0,s[0]=s[1]/4294967296>>>0;return i.putBytes(e),u(r,o,i),(i.read>2048||0===i.length())&&i.compact(),h},h.digest=function(){var t=n.util.createBuffer();t.putBytes(i.bytes());var a,c=h.fullMessageLength[h.fullMessageLength.length-1]+h.messageLengthSize&h.blockLength-1;t.putBytes(s.substr(0,h.blockLength-c));for(var l=8*h.fullMessageLength[0],d=0;d>>0,t.putInt32(l>>>0),l=a>>>0;t.putInt32(l);var p=new Array(r.length);for(d=0;d=128;){for(P=0;P<16;++P)t[P][0]=r.getInt32()>>>0,t[P][1]=r.getInt32()>>>0;for(;P<80;++P)n=(((R=(O=t[P-2])[0])>>>19|(N=O[1])<<13)^(N>>>29|R<<3)^R>>>6)>>>0,i=((R<<13|N>>>19)^(N<<3|R>>>29)^(R<<26|N>>>6))>>>0,o=(((R=(D=t[P-15])[0])>>>1|(N=D[1])<<31)^(R>>>8|N<<24)^R>>>7)>>>0,s=((R<<31|N>>>1)^(R<<24|N>>>8)^(R<<25|N>>>7))>>>0,L=t[P-7],M=t[P-16],N=i+L[1]+s+M[1],t[P][0]=n+L[0]+o+M[0]+(N/4294967296>>>0)>>>0,t[P][1]=N>>>0;for(f=e[0][0],g=e[0][1],m=e[1][0],y=e[1][1],v=e[2][0],_=e[2][1],b=e[3][0],w=e[3][1],C=e[4][0],E=e[4][1],T=e[5][0],S=e[5][1],x=e[6][0],k=e[6][1],I=e[7][0],A=e[7][1],P=0;P<80;++P)u=((C>>>14|E<<18)^(C>>>18|E<<14)^(E>>>9|C<<23))>>>0,d=(x^C&(T^x))>>>0,a=((f>>>28|g<<4)^(g>>>2|f<<30)^(g>>>7|f<<25))>>>0,l=((f<<4|g>>>28)^(g<<30|f>>>2)^(g<<25|f>>>7))>>>0,p=(f&m|v&(f^m))>>>0,h=(g&y|_&(g^y))>>>0,N=A+(((C<<18|E>>>14)^(C<<14|E>>>18)^(E<<23|C>>>9))>>>0)+((k^E&(S^k))>>>0)+c[P][1]+t[P][1],n=I+u+d+c[P][0]+t[P][0]+(N/4294967296>>>0)>>>0,i=N>>>0,o=a+p+((N=l+h)/4294967296>>>0)>>>0,s=N>>>0,I=x,A=k,x=T,k=S,T=C,S=E,C=b+n+((N=w+i)/4294967296>>>0)>>>0,E=N>>>0,b=v,w=_,v=m,_=y,m=f,y=g,f=n+o+((N=i+s)/4294967296>>>0)>>>0,g=N>>>0;N=e[0][1]+g,e[0][0]=e[0][0]+f+(N/4294967296>>>0)>>>0,e[0][1]=N>>>0,N=e[1][1]+y,e[1][0]=e[1][0]+m+(N/4294967296>>>0)>>>0,e[1][1]=N>>>0,N=e[2][1]+_,e[2][0]=e[2][0]+v+(N/4294967296>>>0)>>>0,e[2][1]=N>>>0,N=e[3][1]+w,e[3][0]=e[3][0]+b+(N/4294967296>>>0)>>>0,e[3][1]=N>>>0,N=e[4][1]+E,e[4][0]=e[4][0]+C+(N/4294967296>>>0)>>>0,e[4][1]=N>>>0,N=e[5][1]+S,e[5][0]=e[5][0]+T+(N/4294967296>>>0)>>>0,e[5][1]=N>>>0,N=e[6][1]+k,e[6][0]=e[6][0]+x+(N/4294967296>>>0)>>>0,e[6][1]=N>>>0,N=e[7][1]+A,e[7][0]=e[7][0]+I+(N/4294967296>>>0)>>>0,e[7][1]=N>>>0,B-=128}}},21431:(e,t,r)=>{var n=r(56105);r(60070),r(5945),r(54326),r(98967),r(56827);var i=e.exports=n.ssh=n.ssh||{};function o(e,t){var r=t.toString(16);r[0]>="8"&&(r="00"+r);var i=n.util.hexToBytes(r);e.putInt32(i.length),e.putBytes(i)}function s(e,t){e.putInt32(t.length),e.putString(t)}function a(){for(var e=n.md.sha1.create(),t=arguments.length,r=0;r{var n=r(56105);r(61057),r(5945),r(54326),r(25661),r(23245),r(46572),r(98967),r(56827);var i=function(e,t,r,i){var o=n.util.createBuffer(),s=e.length>>1,a=s+(1&e.length),c=e.substr(0,a),l=e.substr(s,a),u=n.util.createBuffer(),d=n.hmac.create();r=t+r;var p=Math.ceil(i/16),h=Math.ceil(i/20);d.start("MD5",c);var f=n.util.createBuffer();u.putBytes(r);for(var g=0;g0&&(l.queue(e,l.createAlert(e,{level:l.Alert.Level.warning,description:l.Alert.Description.no_renegotiation})),l.flush(e)),e.process()},l.parseHelloMessage=function(e,t,r){var i=null,o=e.entity===l.ConnectionEnd.client;if(r<38)e.error(e,{message:o?"Invalid ServerHello message. Message too short.":"Invalid ClientHello message. Message too short.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.illegal_parameter}});else{var s=t.fragment,c=s.length();if(i={version:{major:s.getByte(),minor:s.getByte()},random:n.util.createBuffer(s.getBytes(32)),session_id:a(s,1),extensions:[]},o?(i.cipher_suite=s.getBytes(2),i.compression_method=s.getByte()):(i.cipher_suites=a(s,2),i.compression_methods=a(s,1)),(c=r-(c-s.length()))>0){for(var u=a(s,2);u.length()>0;)i.extensions.push({type:[u.getByte(),u.getByte()],data:a(u,2)});if(!o)for(var d=0;d0&&0===h.getByte();)e.session.extensions.server_name.serverNameList.push(a(h,2).getBytes())}}if(e.session.version&&(i.version.major!==e.session.version.major||i.version.minor!==e.session.version.minor))return e.error(e,{message:"TLS version change is disallowed during renegotiation.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.protocol_version}});if(o)e.session.cipherSuite=l.getCipherSuite(i.cipher_suite);else for(var f=n.util.createBuffer(i.cipher_suites.bytes());f.length()>0&&(e.session.cipherSuite=l.getCipherSuite(f.getBytes(2)),null===e.session.cipherSuite););if(null===e.session.cipherSuite)return e.error(e,{message:"No cipher suites in common.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.handshake_failure},cipherSuite:n.util.bytesToHex(i.cipher_suite)});e.session.compressionMethod=o?i.compression_method:l.CompressionMethod.none}return i},l.createSecurityParameters=function(e,t){var r=e.entity===l.ConnectionEnd.client,n=t.random.bytes(),i=r?e.session.sp.client_random:n,o=r?n:l.createRandom().getBytes();e.session.sp={entity:e.entity,prf_algorithm:l.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}},l.handleServerHello=function(e,t,r){var n=l.parseHelloMessage(e,t,r);if(!e.fail){if(!(n.version.minor<=e.version.minor))return e.error(e,{message:"Incompatible TLS version.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.protocol_version}});e.version.minor=n.version.minor,e.session.version=e.version;var i=n.session_id.bytes();i.length>0&&i===e.session.id?(e.expect=f,e.session.resuming=!0,e.session.sp.server_random=n.random.bytes()):(e.expect=u,e.session.resuming=!1,l.createSecurityParameters(e,n)),e.session.id=i,e.process()}},l.handleClientHello=function(e,t,r){var i=l.parseHelloMessage(e,t,r);if(!e.fail){var o=i.session_id.bytes(),s=null;if(e.sessionCache&&(null===(s=e.sessionCache.getSession(o))?o="":(s.version.major!==i.version.major||s.version.minor>i.version.minor)&&(s=null,o="")),0===o.length&&(o=n.random.getBytes(32)),e.session.id=o,e.session.clientHelloVersion=i.version,e.session.sp={},s)e.version=e.session.version=s.version,e.session.sp=s.sp;else{for(var a,c=1;c0;)i=a(c.certificate_list,3),o=n.asn1.fromDer(i),i=n.pki.certificateFromAsn1(o,!0),u.push(i)}catch(t){return e.error(e,{message:"Could not parse certificate list.",cause:t,send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.bad_certificate}})}var p=e.entity===l.ConnectionEnd.client;!p&&!0!==e.verifyClient||0!==u.length?0===u.length?e.expect=p?d:_:(p?e.session.serverCertificate=u[0]:e.session.clientCertificate=u[0],l.verifyCertificateChain(e,u)&&(e.expect=p?d:_)):e.error(e,{message:p?"No server certificate provided.":"No client certificate provided.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.illegal_parameter}}),e.process()},l.handleServerKeyExchange=function(e,t,r){if(r>0)return e.error(e,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.unsupported_certificate}});e.expect=p,e.process()},l.handleClientKeyExchange=function(e,t,r){if(r<48)return e.error(e,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.unsupported_certificate}});var i=t.fragment,o={enc_pre_master_secret:a(i,2).getBytes()},s=null;if(e.getPrivateKey)try{s=e.getPrivateKey(e,e.session.serverCertificate),s=n.pki.privateKeyFromPem(s)}catch(t){e.error(e,{message:"Could not get private key.",cause:t,send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.internal_error}})}if(null===s)return e.error(e,{message:"No private key set.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.internal_error}});try{var c=e.session.sp;c.pre_master_secret=s.decrypt(o.enc_pre_master_secret);var u=e.session.clientHelloVersion;if(u.major!==c.pre_master_secret.charCodeAt(0)||u.minor!==c.pre_master_secret.charCodeAt(1))throw new Error("TLS version rollback attack detected.")}catch(e){c.pre_master_secret=n.random.getBytes(48)}e.expect=w,null!==e.session.clientCertificate&&(e.expect=b),e.process()},l.handleCertificateRequest=function(e,t,r){if(r<3)return e.error(e,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.illegal_parameter}});var n=t.fragment,i={certificate_types:a(n,1),certificate_authorities:a(n,2)};e.session.certificateRequest=i,e.expect=h,e.process()},l.handleCertificateVerify=function(e,t,r){if(r<2)return e.error(e,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.illegal_parameter}});var i=t.fragment;i.read-=4;var o=i.bytes();i.read+=4;var s={signature:a(i,2).getBytes()},c=n.util.createBuffer();c.putBuffer(e.session.md5.digest()),c.putBuffer(e.session.sha1.digest()),c=c.getBytes();try{if(!e.session.clientCertificate.publicKey.verify(c,s.signature,"NONE"))throw new Error("CertificateVerify signature does not match.");e.session.md5.update(o),e.session.sha1.update(o)}catch(t){return e.error(e,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.handshake_failure}})}e.expect=w,e.process()},l.handleServerHelloDone=function(e,t,r){if(r>0)return e.error(e,{message:"Invalid ServerHelloDone message. Invalid length.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.record_overflow}});if(null===e.serverCertificate){var i={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.insufficient_security}},o=e.verify(e,i.alert.description,0,[]);if(!0!==o)return(o||0===o)&&("object"!=typeof o||n.util.isArray(o)?"number"==typeof o&&(i.alert.description=o):(o.message&&(i.message=o.message),o.alert&&(i.alert.description=o.alert))),e.error(e,i)}null!==e.session.certificateRequest&&(t=l.createRecord(e,{type:l.ContentType.handshake,data:l.createCertificate(e)}),l.queue(e,t)),t=l.createRecord(e,{type:l.ContentType.handshake,data:l.createClientKeyExchange(e)}),l.queue(e,t),e.expect=y;var s=function(e,t){null!==e.session.certificateRequest&&null!==e.session.clientCertificate&&l.queue(e,l.createRecord(e,{type:l.ContentType.handshake,data:l.createCertificateVerify(e,t)})),l.queue(e,l.createRecord(e,{type:l.ContentType.change_cipher_spec,data:l.createChangeCipherSpec()})),e.state.pending=l.createConnectionState(e),e.state.current.write=e.state.pending.write,l.queue(e,l.createRecord(e,{type:l.ContentType.handshake,data:l.createFinished(e)})),e.expect=f,l.flush(e),e.process()};if(null===e.session.certificateRequest||null===e.session.clientCertificate)return s(e,null);l.getClientSignature(e,s)},l.handleChangeCipherSpec=function(e,t){if(1!==t.fragment.getByte())return e.error(e,{message:"Invalid ChangeCipherSpec message received.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.illegal_parameter}});var r=e.entity===l.ConnectionEnd.client;(e.session.resuming&&r||!e.session.resuming&&!r)&&(e.state.pending=l.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?g:C,e.process()},l.handleFinished=function(e,t,r){var o=t.fragment;o.read-=4;var s=o.bytes();o.read+=4;var a=t.fragment.getBytes();(o=n.util.createBuffer()).putBuffer(e.session.md5.digest()),o.putBuffer(e.session.sha1.digest());var c=e.entity===l.ConnectionEnd.client,u=c?"server finished":"client finished",d=e.session.sp;if((o=i(d.master_secret,u,o.getBytes(),12)).getBytes()!==a)return e.error(e,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.decrypt_error}});e.session.md5.update(s),e.session.sha1.update(s),(e.session.resuming&&c||!e.session.resuming&&!c)&&(l.queue(e,l.createRecord(e,{type:l.ContentType.change_cipher_spec,data:l.createChangeCipherSpec()})),e.state.current.write=e.state.pending.write,e.state.pending=null,l.queue(e,l.createRecord(e,{type:l.ContentType.handshake,data:l.createFinished(e)}))),e.expect=c?m:E,e.handshaking=!1,++e.handshakes,e.peerCertificate=c?e.session.serverCertificate:e.session.clientCertificate,l.flush(e),e.isConnected=!0,e.connected(e),e.process()},l.handleAlert=function(e,t){var r,n=t.fragment,i={level:n.getByte(),description:n.getByte()};switch(i.description){case l.Alert.Description.close_notify:r="Connection closed.";break;case l.Alert.Description.unexpected_message:r="Unexpected message.";break;case l.Alert.Description.bad_record_mac:r="Bad record MAC.";break;case l.Alert.Description.decryption_failed:r="Decryption failed.";break;case l.Alert.Description.record_overflow:r="Record overflow.";break;case l.Alert.Description.decompression_failure:r="Decompression failed.";break;case l.Alert.Description.handshake_failure:r="Handshake failure.";break;case l.Alert.Description.bad_certificate:r="Bad certificate.";break;case l.Alert.Description.unsupported_certificate:r="Unsupported certificate.";break;case l.Alert.Description.certificate_revoked:r="Certificate revoked.";break;case l.Alert.Description.certificate_expired:r="Certificate expired.";break;case l.Alert.Description.certificate_unknown:r="Certificate unknown.";break;case l.Alert.Description.illegal_parameter:r="Illegal parameter.";break;case l.Alert.Description.unknown_ca:r="Unknown certificate authority.";break;case l.Alert.Description.access_denied:r="Access denied.";break;case l.Alert.Description.decode_error:r="Decode error.";break;case l.Alert.Description.decrypt_error:r="Decrypt error.";break;case l.Alert.Description.export_restriction:r="Export restriction.";break;case l.Alert.Description.protocol_version:r="Unsupported protocol version.";break;case l.Alert.Description.insufficient_security:r="Insufficient security.";break;case l.Alert.Description.internal_error:r="Internal error.";break;case l.Alert.Description.user_canceled:r="User canceled.";break;case l.Alert.Description.no_renegotiation:r="Renegotiation not supported.";break;default:r="Unknown error."}if(i.description===l.Alert.Description.close_notify)return e.close();e.error(e,{message:r,send:!1,origin:e.entity===l.ConnectionEnd.client?"server":"client",alert:i}),e.process()},l.handleHandshake=function(e,t){var r=t.fragment,i=r.getByte(),o=r.getInt24();if(o>r.length())return e.fragmented=t,t.fragment=n.util.createBuffer(),r.read-=4,e.process();e.fragmented=null,r.read-=4;var s=r.bytes(o+4);r.read+=4,i in F[e.entity][e.expect]?(e.entity!==l.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:n.md.md5.create(),sha1:n.md.sha1.create()}),i!==l.HandshakeType.hello_request&&i!==l.HandshakeType.certificate_verify&&i!==l.HandshakeType.finished&&(e.session.md5.update(s),e.session.sha1.update(s)),F[e.entity][e.expect][i](e,t,o)):l.handleUnexpected(e,t)},l.handleApplicationData=function(e,t){e.data.putBuffer(t.fragment),e.dataReady(e),e.process()},l.handleHeartbeat=function(e,t){var r=t.fragment,i=r.getByte(),o=r.getInt16(),s=r.getBytes(o);if(i===l.HeartbeatMessageType.heartbeat_request){if(e.handshaking||o>s.length)return e.process();l.queue(e,l.createRecord(e,{type:l.ContentType.heartbeat,data:l.createHeartbeat(l.HeartbeatMessageType.heartbeat_response,s)})),l.flush(e)}else if(i===l.HeartbeatMessageType.heartbeat_response){if(s!==e.expectedHeartbeatPayload)return e.process();e.heartbeatReceived&&e.heartbeatReceived(e,n.util.createBuffer(s))}e.process()};var u=1,d=2,p=3,h=4,f=5,g=6,m=7,y=8,v=1,_=2,b=3,w=4,C=5,E=6,T=l.handleUnexpected,S=l.handleChangeCipherSpec,x=l.handleAlert,k=l.handleHandshake,I=l.handleApplicationData,A=l.handleHeartbeat,P=[];P[l.ConnectionEnd.client]=[[T,x,k,T,A],[T,x,k,T,A],[T,x,k,T,A],[T,x,k,T,A],[T,x,k,T,A],[S,x,T,T,A],[T,x,k,T,A],[T,x,k,I,A],[T,x,k,T,A]],P[l.ConnectionEnd.server]=[[T,x,k,T,A],[T,x,k,T,A],[T,x,k,T,A],[T,x,k,T,A],[S,x,T,T,A],[T,x,k,T,A],[T,x,k,I,A],[T,x,k,T,A]];var R=l.handleHelloRequest,N=l.handleServerHello,O=l.handleCertificate,L=l.handleServerKeyExchange,D=l.handleCertificateRequest,M=l.handleServerHelloDone,B=l.handleFinished,F=[];F[l.ConnectionEnd.client]=[[T,T,N,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T],[R,T,T,T,T,T,T,T,T,T,T,O,L,D,M,T,T,T,T,T,T],[R,T,T,T,T,T,T,T,T,T,T,T,L,D,M,T,T,T,T,T,T],[R,T,T,T,T,T,T,T,T,T,T,T,T,D,M,T,T,T,T,T,T],[R,T,T,T,T,T,T,T,T,T,T,T,T,T,M,T,T,T,T,T,T],[R,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T],[R,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,B],[R,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T],[R,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T]];var j=l.handleClientHello,U=l.handleClientKeyExchange,$=l.handleCertificateVerify;F[l.ConnectionEnd.server]=[[T,j,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T],[T,T,T,T,T,T,T,T,T,T,T,O,T,T,T,T,T,T,T,T,T],[T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,U,T,T,T,T],[T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,$,T,T,T,T,T],[T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T],[T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,B],[T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T],[T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T]],l.generateKeys=function(e,t){var r=i,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 o=2*t.mac_key_length+2*t.enc_key_length,s=e.version.major===l.Versions.TLS_1_0.major&&e.version.minor===l.Versions.TLS_1_0.minor;s&&(o+=2*t.fixed_iv_length);var a=r(t.master_secret,"key expansion",n,o),c={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 s&&(c.client_write_IV=a.getBytes(t.fixed_iv_length),c.server_write_IV=a.getBytes(t.fixed_iv_length)),c},l.createConnectionState=function(e){var t=e.entity===l.ConnectionEnd.client,r=function(){var e={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,cipherState:null,cipherFunction:function(e){return!0},compressionState:null,compressFunction:function(e){return!0},updateSequenceNumber:function(){4294967295===e.sequenceNumber[1]?(e.sequenceNumber[1]=0,++e.sequenceNumber[0]):++e.sequenceNumber[1]}};return e},n={read:r(),write:r()};if(n.read.update=function(e,t){return n.read.cipherFunction(t,n.read)?n.read.compressFunction(e,t,n.read)||e.error(e,{message:"Could not decompress record.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.decompression_failure}}):e.error(e,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.bad_record_mac}}),!e.fail},n.write.update=function(e,t){return n.write.compressFunction(e,t,n.write)?n.write.cipherFunction(t,n.write)||e.error(e,{message:"Could not encrypt record.",send:!1,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.internal_error}}):e.error(e,{message:"Could not compress record.",send:!1,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.internal_error}}),!e.fail},e.session){var i=e.session.sp;switch(e.session.cipherSuite.initSecurityParameters(i),i.keys=l.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 l.CompressionMethod.none:break;case l.CompressionMethod.deflate:n.read.compressFunction=s,n.write.compressFunction=o;break;default:throw new Error("Unsupported compression algorithm.")}}return n},l.createRandom=function(){var e=new Date,t=+e+6e4*e.getTimezoneOffset(),r=n.util.createBuffer();return r.putInt32(t),r.putBytes(n.random.getBytes(28)),r},l.createRecord=function(e,t){return t.data?{type:t.type,version:{major:e.version.major,minor:e.version.minor},length:t.data.length(),fragment:t.data}:null},l.createAlert=function(e,t){var r=n.util.createBuffer();return r.putByte(t.level),r.putByte(t.description),l.createRecord(e,{type:l.ContentType.alert,data:r})},l.createClientHello=function(e){e.session.clientHelloVersion={major:e.version.major,minor:e.version.minor};for(var t=n.util.createBuffer(),r=0;r0&&(f+=2);var g=e.session.id,m=g.length+1+2+4+28+2+o+1+a+f,y=n.util.createBuffer();return y.putByte(l.HandshakeType.client_hello),y.putInt24(m),y.putByte(e.version.major),y.putByte(e.version.minor),y.putBytes(e.session.sp.client_random),c(y,1,n.util.createBuffer(g)),c(y,2,t),c(y,1,s),f>0&&c(y,2,u),y},l.createServerHello=function(e){var t=e.session.id,r=t.length+1+2+4+28+2+1,i=n.util.createBuffer();return i.putByte(l.HandshakeType.server_hello),i.putInt24(r),i.putByte(e.version.major),i.putByte(e.version.minor),i.putBytes(e.session.sp.server_random),c(i,1,n.util.createBuffer(t)),i.putByte(e.session.cipherSuite.id[0]),i.putByte(e.session.cipherSuite.id[1]),i.putByte(e.session.compressionMethod),i},l.createCertificate=function(e){var t,r=e.entity===l.ConnectionEnd.client,i=null;e.getCertificate&&(t=r?e.session.certificateRequest:e.session.extensions.server_name.serverNameList,i=e.getCertificate(e,t));var o=n.util.createBuffer();if(null!==i)try{n.util.isArray(i)||(i=[i]);for(var s=null,a=0;al.MaxFragment;)i.push(l.createRecord(e,{type:t.type,data:n.util.createBuffer(o.slice(0,l.MaxFragment))})),o=o.slice(l.MaxFragment);o.length>0&&i.push(l.createRecord(e,{type:t.type,data:n.util.createBuffer(o)}))}for(var s=0;s0&&(i=r.order[0]),null!==i&&i in r.cache)for(var o in t=r.cache[i],delete r.cache[i],r.order)if(r.order[o]===i){r.order.splice(o,1);break}return t},r.setSession=function(e,t){if(r.order.length===r.capacity){var i=r.order.shift();delete r.cache[i]}i=n.util.bytesToHex(e),r.order.push(i),r.cache[i]=t}}return r},l.createConnection=function(e){var t;t=e.caStore?n.util.isArray(e.caStore)?n.pki.createCaStore(e.caStore):e.caStore:n.pki.createCaStore();var r=e.cipherSuites||null;if(null===r)for(var i in r=[],l.CipherSuites)r.push(l.CipherSuites[i]);var o=e.server?l.ConnectionEnd.server:l.ConnectionEnd.client,s=e.sessionCache?l.createSessionCache(e.sessionCache):null,a={version:{major:l.Version.major,minor:l.Version.minor},entity:o,sessionId:e.sessionId,caStore:t,sessionCache:s,cipherSuites:r,connected:e.connected,virtualHost:e.virtualHost||null,verifyClient:e.verifyClient||!1,verify:e.verify||function(e,t,r,n){return t},verifyOptions:e.verifyOptions||{},getCertificate:e.getCertificate||null,getPrivateKey:e.getPrivateKey||null,getSignature:e.getSignature||null,input:n.util.createBuffer(),tlsData:n.util.createBuffer(),data:n.util.createBuffer(),tlsDataReady:e.tlsDataReady,dataReady:e.dataReady,heartbeatReceived:e.heartbeatReceived,closed:e.closed,error:function(t,r){r.origin=r.origin||(t.entity===l.ConnectionEnd.client?"client":"server"),r.send&&(l.queue(t,l.createAlert(t,r.alert)),l.flush(t));var n=!1!==r.fatal;n&&(t.fail=!0),e.error(t,r),n&&t.close(!1)},deflate:e.deflate||null,inflate:e.inflate||null,reset:function(e){a.version={major:l.Version.major,minor:l.Version.minor},a.record=null,a.session=null,a.peerCertificate=null,a.state={pending:null,current:null},a.expect=(a.entity,l.ConnectionEnd.client,0),a.fragmented=null,a.records=[],a.open=!1,a.handshakes=0,a.handshaking=!1,a.isConnected=!1,a.fail=!(e||void 0===e),a.input.clear(),a.tlsData.clear(),a.data.clear(),a.state.current=l.createConnectionState(a)}};return a.reset(),a.handshake=function(e){if(a.entity!==l.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&&0===a.handshakes&&(a.fail=!1),a.handshaking=!0;var t=null;(e=e||"").length>0&&(a.sessionCache&&(t=a.sessionCache.getSession(e)),null===t&&(e="")),0===e.length&&a.sessionCache&&null!==(t=a.sessionCache.getSession())&&(e=t.id),a.session={id:e,version:null,cipherSuite:null,compressionMethod:null,serverCertificate:null,certificateRequest:null,clientCertificate:null,sp:{},md5:n.md.md5.create(),sha1:n.md.sha1.create()},t&&(a.version=t.version,a.session.sp=t.sp),a.session.sp.client_random=l.createRandom().getBytes(),a.open=!0,l.queue(a,l.createRecord(a,{type:l.ContentType.handshake,data:l.createClientHello(a)})),l.flush(a)}},a.process=function(e){var t=0;return e&&a.input.putBytes(e),a.fail||(null!==a.record&&a.record.ready&&a.record.fragment.isEmpty()&&(a.record=null),null===a.record&&(t=function(e){var t=0,r=e.input,i=r.length();if(i<5)t=5-i;else{e.record={type:r.getByte(),version:{major:r.getByte(),minor:r.getByte()},length:r.getInt16(),fragment:n.util.createBuffer(),ready:!1};var o=e.record.version.major===e.version.major;o&&e.session&&e.session.version&&(o=e.record.version.minor===e.version.minor),o||e.error(e,{message:"Incompatible TLS version.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.protocol_version}})}return t}(a)),a.fail||null===a.record||a.record.ready||(t=function(e){var t=0,r=e.input,n=r.length();return n{var n=r(56105),i=r(36147),o=e.exports=n.util=n.util||{};function s(e){if(8!==e&&16!==e&&24!==e&&32!==e)throw new Error("Only 8, 16, 24, or 32 bits supported: "+e)}function a(e){if(this.data="",this.read=0,"string"==typeof e)this.data=e;else if(o.isArrayBuffer(e)||o.isArrayBufferView(e))if("undefined"!=typeof Buffer&&e instanceof Buffer)this.data=e.toString("binary");else{var t=new Uint8Array(e);try{this.data=String.fromCharCode.apply(null,t)}catch(e){for(var r=0;r15?(r=Date.now(),s(e)):(t.push(e),1===t.length&&i.setAttribute("a",n=!n))}}o.nextTick=o.setImmediate}(),o.isNodejs="undefined"!=typeof process&&process.versions&&process.versions.node,o.globalScope=o.isNodejs?global:"undefined"==typeof self?window:self,o.isArray=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},o.isArrayBuffer=function(e){return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer},o.isArrayBufferView=function(e){return e&&o.isArrayBuffer(e.buffer)&&void 0!==e.byteLength},o.ByteBuffer=a,o.ByteStringBuffer=a,o.ByteStringBuffer.prototype._optimizeConstructedString=function(e){this._constructedStringLength+=e,this._constructedStringLength>4096&&(this.data.substr(0,1),this._constructedStringLength=0)},o.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read},o.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0},o.ByteStringBuffer.prototype.putByte=function(e){return this.putBytes(String.fromCharCode(e))},o.ByteStringBuffer.prototype.fillWithByte=function(e,t){e=String.fromCharCode(e);for(var r=this.data;t>0;)1&t&&(r+=e),(t>>>=1)>0&&(e+=e);return this.data=r,this._optimizeConstructedString(t),this},o.ByteStringBuffer.prototype.putBytes=function(e){return this.data+=e,this._optimizeConstructedString(e.length),this},o.ByteStringBuffer.prototype.putString=function(e){return this.putBytes(o.encodeUtf8(e))},o.ByteStringBuffer.prototype.putInt16=function(e){return this.putBytes(String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},o.ByteStringBuffer.prototype.putInt24=function(e){return this.putBytes(String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},o.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(255&e))},o.ByteStringBuffer.prototype.putInt16Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255))},o.ByteStringBuffer.prototype.putInt24Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255))},o.ByteStringBuffer.prototype.putInt32Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>24&255))},o.ByteStringBuffer.prototype.putInt=function(e,t){s(t);var r="";do{t-=8,r+=String.fromCharCode(e>>t&255)}while(t>0);return this.putBytes(r)},o.ByteStringBuffer.prototype.putSignedInt=function(e,t){return e<0&&(e+=2<0);return t},o.ByteStringBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),r=2<=r&&(t-=r<<1),t},o.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):0===e?t="":(t=0===this.read?this.data:this.data.slice(this.read),this.clear()),t},o.ByteStringBuffer.prototype.bytes=function(e){return void 0===e?this.data.slice(this.read):this.data.slice(this.read,this.read+e)},o.ByteStringBuffer.prototype.at=function(e){return this.data.charCodeAt(this.read+e)},o.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},o.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)},o.ByteStringBuffer.prototype.copy=function(){var e=o.createBuffer(this.data);return e.read=this.read,e},o.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this},o.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this},o.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},o.ByteStringBuffer.prototype.toHex=function(){for(var e="",t=this.read;t=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},o.DataBuffer.prototype.putByte=function(e){return this.accommodate(1),this.data.setUint8(this.write++,e),this},o.DataBuffer.prototype.fillWithByte=function(e,t){this.accommodate(t);for(var r=0;r>8&65535),this.data.setInt8(this.write,e>>16&255),this.write+=3,this},o.DataBuffer.prototype.putInt32=function(e){return this.accommodate(4),this.data.setInt32(this.write,e),this.write+=4,this},o.DataBuffer.prototype.putInt16Le=function(e){return this.accommodate(2),this.data.setInt16(this.write,e,!0),this.write+=2,this},o.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},o.DataBuffer.prototype.putInt32Le=function(e){return this.accommodate(4),this.data.setInt32(this.write,e,!0),this.write+=4,this},o.DataBuffer.prototype.putInt=function(e,t){s(t),this.accommodate(t/8);do{t-=8,this.data.setInt8(this.write++,e>>t&255)}while(t>0);return this},o.DataBuffer.prototype.putSignedInt=function(e,t){return s(t),this.accommodate(t/8),e<0&&(e+=2<0);return t},o.DataBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),r=2<=r&&(t-=r<<1),t},o.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):0===e?t="":(t=0===this.read?this.data:this.data.slice(this.read),this.clear()),t},o.DataBuffer.prototype.bytes=function(e){return void 0===e?this.data.slice(this.read):this.data.slice(this.read,this.read+e)},o.DataBuffer.prototype.at=function(e){return this.data.getUint8(this.read+e)},o.DataBuffer.prototype.setAt=function(e,t){return this.data.setUint8(e,t),this},o.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)},o.DataBuffer.prototype.copy=function(){return new o.DataBuffer(this)},o.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},o.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this},o.DataBuffer.prototype.truncate=function(e){return this.write=Math.max(0,this.length()-e),this.read=Math.min(this.read,this.write),this},o.DataBuffer.prototype.toHex=function(){for(var e="",t=this.read;t0;)1&t&&(r+=e),(t>>>=1)>0&&(e+=e);return r},o.xorBytes=function(e,t,r){for(var n="",i="",o="",s=0,a=0;r>0;--r,++s)i=e.charCodeAt(s)^t.charCodeAt(s),a>=10&&(n+=o,o="",a=0),o+=String.fromCharCode(i),++a;return n+o},o.hexToBytes=function(e){var t="",r=0;for(!0&e.length&&(r=1,t+=String.fromCharCode(parseInt(e[0],16)));r>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e)};var c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l=[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],u="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";o.encode64=function(e,t){for(var r,n,i,o="",s="",a=0;a>2),o+=c.charAt((3&r)<<4|n>>4),isNaN(n)?o+="==":(o+=c.charAt((15&n)<<2|i>>6),o+=isNaN(i)?"=":c.charAt(63&i)),t&&o.length>t&&(s+=o.substr(0,t)+"\r\n",o=o.substr(t));return s+o},o.decode64=function(e){e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var t,r,n,i,o="",s=0;s>4),64!==n&&(o+=String.fromCharCode((15&r)<<4|n>>2),64!==i&&(o+=String.fromCharCode((3&n)<<6|i)));return o},o.encodeUtf8=function(e){return unescape(encodeURIComponent(e))},o.decodeUtf8=function(e){return decodeURIComponent(escape(e))},o.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:i.encode,decode:i.decode}},o.binary.raw.encode=function(e){return String.fromCharCode.apply(null,e)},o.binary.raw.decode=function(e,t,r){var n=t;n||(n=new Uint8Array(e.length));for(var i=r=r||0,o=0;o>2),o+=c.charAt((3&r)<<4|n>>4),isNaN(n)?o+="==":(o+=c.charAt((15&n)<<2|i>>6),o+=isNaN(i)?"=":c.charAt(63&i)),t&&o.length>t&&(s+=o.substr(0,t)+"\r\n",o=o.substr(t));return s+o},o.binary.base64.decode=function(e,t,r){var n,i,o,s,a=t;a||(a=new Uint8Array(3*Math.ceil(e.length/4))),e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var c=0,u=r=r||0;c>4,64!==o&&(a[u++]=(15&i)<<4|o>>2,64!==s&&(a[u++]=(3&o)<<6|s));return t?u-r:a.subarray(0,u)},o.binary.base58.encode=function(e,t){return o.binary.baseN.encode(e,u,t)},o.binary.base58.decode=function(e,t){return o.binary.baseN.decode(e,u,t)},o.text={utf8:{},utf16:{}},o.text.utf8.encode=function(e,t,r){e=o.encodeUtf8(e);var n=t;n||(n=new Uint8Array(e.length));for(var i=r=r||0,s=0;s0&&o.push(r),s=n.lastIndex;var a=t[0][1];switch(a){case"s":case"o":i");break;case"%":o.push("%");break;default:o.push("<%"+a+"?>")}}return o.push(e.substring(s)),o.join("")},o.formatNumber=function(e,t,r,n){var i=e,o=isNaN(t=Math.abs(t))?2:t,s=void 0===r?",":r,a=void 0===n?".":n,c=i<0?"-":"",l=parseInt(i=Math.abs(+i||0).toFixed(o),10)+"",u=l.length>3?l.length%3:0;return c+(u?l.substr(0,u)+a:"")+l.substr(u).replace(/(\d{3})(?=\d)/g,"$1"+a)+(o?s+Math.abs(i-l).toFixed(o).slice(2):"")},o.formatSize=function(e){return e>=1073741824?o.formatNumber(e/1073741824,2,".","")+" GiB":e>=1048576?o.formatNumber(e/1048576,2,".","")+" MiB":e>=1024?o.formatNumber(e/1024,0)+" KiB":o.formatNumber(e,0)+" bytes"},o.bytesFromIP=function(e){return-1!==e.indexOf(".")?o.bytesFromIPv4(e):-1!==e.indexOf(":")?o.bytesFromIPv6(e):null},o.bytesFromIPv4=function(e){if(4!==(e=e.split(".")).length)return null;for(var t=o.createBuffer(),r=0;rr[n].end-r[n].start&&(n=r.length-1)):r.push({start:c,end:c})}t.push(s)}if(r.length>0){var l=r[n];l.end-l.start>0&&(t.splice(l.start,l.end-l.start+1,""),0===l.start&&t.unshift(""),7===l.end&&t.push(""))}return t.join(":")},o.estimateCores=function(e,t){if("function"==typeof e&&(t=e,e={}),e=e||{},"cores"in o&&!e.update)return t(null,o.cores);if("undefined"!=typeof navigator&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return o.cores=navigator.hardwareConcurrency,t(null,o.cores);if("undefined"==typeof Worker)return o.cores=1,t(null,o.cores);if("undefined"==typeof Blob)return o.cores=2,t(null,o.cores);var r=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",(function(e){for(var t=Date.now(),r=t+4;Date.now()a.st&&i.sti.st&&a.st{var n=r(56105);r(60070),r(61057),r(62148),r(91183),r(9370),r(81877),r(25661),r(51242),r(69597),r(56827);var i=n.asn1,o=e.exports=n.pki=n.pki||{},s=o.oids,a={};a.CN=s.commonName,a.commonName="CN",a.C=s.countryName,a.countryName="C",a.L=s.localityName,a.localityName="L",a.ST=s.stateOrProvinceName,a.stateOrProvinceName="ST",a.O=s.organizationName,a.organizationName="O",a.OU=s.organizationalUnitName,a.organizationalUnitName="OU",a.E=s.emailAddress,a.emailAddress="E";var c=n.pki.rsa.publicKeyValidator,l={name:"Certificate",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:i.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:i.Class.UNIVERSAL,type:i.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:i.Class.UNIVERSAL,type:i.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:i.Class.UNIVERSAL,type:i.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:i.Class.UNIVERSAL,type:i.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},c,{name:"Certificate.TBSCertificate.issuerUniqueID",tagClass:i.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:i.Class.UNIVERSAL,type:i.Type.BITSTRING,constructed:!1,captureBitStringValue:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:i.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:i.Class.UNIVERSAL,type:i.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSubjectUniqueId"}]},{name:"Certificate.TBSCertificate.extensions",tagClass:i.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:i.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},{name:"Certificate.signatureValue",tagClass:i.Class.UNIVERSAL,type:i.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSignature"}]},u={name:"rsapss",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:i.Class.UNIVERSAL,type:i.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:i.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:i.Class.UNIVERSAL,type:i.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:i.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:i.Class.UNIVERSAL,type:i.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:i.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",tagClass:i.Class.UNIVERSAL,type:i.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},d={name:"CertificationRequestInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},c,{name:"CertificationRequestInfo.attributes",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0}]}]}]},p={name:"CertificationRequest",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[d,{name:"CertificationRequest.signatureAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:i.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:i.Class.UNIVERSAL,type:i.Type.BITSTRING,constructed:!1,captureBitStringValue:"csrSignature"}]};function h(e,t){"string"==typeof t&&(t={shortName:t});for(var r,n=null,i=0;null===n&&i128)throw new Error('Invalid "nsComment" content.');e.value=i.create(i.Class.UNIVERSAL,i.Type.IA5STRING,!1,e.comment)}else if("subjectKeyIdentifier"===e.name&&t.cert){var h=t.cert.generateSubjectKeyIdentifier();e.subjectKeyIdentifier=h.toHex(),e.value=i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,h.getBytes())}else if("authorityKeyIdentifier"===e.name&&t.cert){if(e.value=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]),u=e.value.value,e.keyIdentifier){var f=!0===e.keyIdentifier?t.cert.generateSubjectKeyIdentifier().getBytes():e.keyIdentifier;u.push(i.create(i.Class.CONTEXT_SPECIFIC,0,!1,f))}if(e.authorityCertIssuer){var g=[i.create(i.Class.CONTEXT_SPECIFIC,4,!0,[y(!0===e.authorityCertIssuer?t.cert.issuer:e.authorityCertIssuer)])];u.push(i.create(i.Class.CONTEXT_SPECIFIC,1,!0,g))}if(e.serialNumber){var m=n.util.hexToBytes(!0===e.serialNumber?t.cert.serialNumber:e.serialNumber);u.push(i.create(i.Class.CONTEXT_SPECIFIC,2,!1,m))}}else if("cRLDistributionPoints"===e.name){e.value=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]),u=e.value.value;var v,_=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]),b=i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[]);for(p=0;p2)throw new Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(d.length<2)throw new Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");if(c.validity.notBefore=d[0],c.validity.notAfter=d[1],c.tbsCertificate=r.tbsCertificate,t){c.md=g({signatureOid:c.signatureOid,type:"certificate"});var p=i.toDer(c.tbsCertificate);c.md.update(p.getBytes())}var m=n.md.sha1.create(),y=i.toDer(r.certIssuer);m.update(y.getBytes()),c.issuer.getField=function(e){return h(c.issuer,e)},c.issuer.addField=function(e){v([e]),c.issuer.attributes.push(e)},c.issuer.attributes=o.RDNAttributesAsArray(r.certIssuer),r.certIssuerUniqueId&&(c.issuer.uniqueId=r.certIssuerUniqueId),c.issuer.hash=m.digest().toHex();var _=n.md.sha1.create(),b=i.toDer(r.certSubject);return _.update(b.getBytes()),c.subject.getField=function(e){return h(c.subject,e)},c.subject.addField=function(e){v([e]),c.subject.attributes.push(e)},c.subject.attributes=o.RDNAttributesAsArray(r.certSubject),r.certSubjectUniqueId&&(c.subject.uniqueId=r.certSubjectUniqueId),c.subject.hash=_.digest().toHex(),r.certExtensions?c.extensions=o.certificateExtensionsFromAsn1(r.certExtensions):c.extensions=[],c.publicKey=o.publicKeyFromAsn1(r.subjectPublicKeyInfo),c},o.certificateExtensionsFromAsn1=function(e){for(var t=[],r=0;r1&&(r=c.value.charCodeAt(1),o=c.value.length>2?c.value.charCodeAt(2):0),t.digitalSignature=128==(128&r),t.nonRepudiation=64==(64&r),t.keyEncipherment=32==(32&r),t.dataEncipherment=16==(16&r),t.keyAgreement=8==(8&r),t.keyCertSign=4==(4&r),t.cRLSign=2==(2&r),t.encipherOnly=1==(1&r),t.decipherOnly=128==(128&o)}else if("basicConstraints"===t.name){(c=i.fromDer(t.value)).value.length>0&&c.value[0].type===i.Type.BOOLEAN?t.cA=0!==c.value[0].value.charCodeAt(0):t.cA=!1;var a=null;c.value.length>0&&c.value[0].type===i.Type.INTEGER?a=c.value[0].value:c.value.length>1&&(a=c.value[1].value),null!==a&&(t.pathLenConstraint=i.derToInteger(a))}else if("extKeyUsage"===t.name)for(var c=i.fromDer(t.value),l=0;l1&&(r=c.value.charCodeAt(1)),t.client=128==(128&r),t.server=64==(64&r),t.email=32==(32&r),t.objsign=16==(16&r),t.reserved=8==(8&r),t.sslCA=4==(4&r),t.emailCA=2==(2&r),t.objCA=1==(1&r);else if("subjectAltName"===t.name||"issuerAltName"===t.name){var d;t.altNames=[],c=i.fromDer(t.value);for(var p=0;p=C&&e0&&s.value.push(o.certificateExtensionsToAsn1(e.extensions)),s},o.getCertificationRequestInfo=function(e){return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(e.version).getBytes()),y(e.subject),o.publicKeyToAsn1(e.publicKey),w(e)])},o.distinguishedNameToAsn1=function(e){return y(e)},o.certificateToAsn1=function(e){var t=e.tbsCertificate||o.getTBSCertificate(e);return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[t,i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(e.signatureOid).getBytes()),b(e.signatureOid,e.signatureParameters)]),i.create(i.Class.UNIVERSAL,i.Type.BITSTRING,!1,String.fromCharCode(0)+e.signature)])},o.certificateExtensionsToAsn1=function(e){var t=i.create(i.Class.CONTEXT_SPECIFIC,3,!0,[]),r=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]);t.value.push(r);for(var n=0;nu.validity.notAfter)&&(c={message:"Certificate is not valid yet or has expired.",error:o.certificateError.certificate_expired,notBefore:u.validity.notBefore,notAfter:u.validity.notAfter,now:s}),null===c){if(null===(d=t[0]||e.getIssuer(u))&&u.isIssuer(u)&&(p=!0,d=u),d){var h=d;n.util.isArray(h)||(h=[h]);for(var f=!1;!f&&h.length>0;){d=h.shift();try{f=d.verify(u)}catch(e){}}f||(c={message:"Certificate signature is invalid.",error:o.certificateError.bad_certificate})}null!==c||d&&!p||e.hasCertificate(u)||(c={message:"Certificate is not trusted.",error:o.certificateError.unknown_ca})}if(null===c&&d&&!u.isIssuer(d)&&(c={message:"Certificate issuer is invalid.",error:o.certificateError.bad_certificate}),null===c)for(var g={keyUsage:!0,basicConstraints:!0},m=0;null===c&&mv.pathLenConstraint&&(c={message:"Certificate basicConstraints pathLenConstraint violated.",error:o.certificateError.bad_certificate})}var b=null===c||c.error,w=r.verify?r.verify(b,l,i):b;if(!0!==w)throw!0===b&&(c={message:"The application rejected the certificate.",error:o.certificateError.bad_certificate}),(w||0===w)&&("object"!=typeof w||n.util.isArray(w)?"string"==typeof w&&(c.error=w):(w.message&&(c.message=w.message),w.error&&(c.error=w.error))),c;c=null,a=!1,++l}while(t.length>0);return!0}},31814:(e,t,r)=>{const n=r(71017),i=r(32081),{promises:o,constants:s}=r(57147),a=r(67684),c=r(67546),l=r(71321),u=n.join(__dirname,"xdg-open"),{platform:d,arch:p}=process,h=(()=>{const e="/mnt/";let t;return async function(){if(t)return t;const r="/etc/wsl.conf";let n=!1;try{await o.access(r,s.F_OK),n=!0}catch{}if(!n)return e;const i=await o.readFile(r,{encoding:"utf8"}),a=/(?.*)/g.exec(i);return a?(t=a.groups.mountPoint.trim(),t=t.endsWith("/")?t:`${t}/`,t):e}})(),f=async(e,t)=>{let r;for(const n of e)try{return await t(n)}catch(e){r=e}throw r},g=async e=>{if(e={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...e},Array.isArray(e.app))return f(e.app,(t=>g({...e,app:t})));let t,{name:r,arguments:n=[]}=e.app||{};if(n=[...n],Array.isArray(r))return f(r,(t=>g({...e,app:{name:t,arguments:n}})));const l=[],p={};if("darwin"===d)t="open",e.wait&&l.push("--wait-apps"),e.background&&l.push("--background"),e.newInstance&&l.push("--new"),r&&l.push("-a",r);else if("win32"===d||a&&!c()){const i=await h();t=a?`${i}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`:`${process.env.SYSTEMROOT}\\System32\\WindowsPowerShell\\v1.0\\powershell`,l.push("-NoProfile","-NonInteractive","–ExecutionPolicy","Bypass","-EncodedCommand"),a||(p.windowsVerbatimArguments=!0);const o=["Start"];e.wait&&o.push("-Wait"),r?(o.push(`"\`"${r}\`""`,"-ArgumentList"),e.target&&n.unshift(e.target)):e.target&&o.push(`"${e.target}"`),n.length>0&&(n=n.map((e=>`"\`"${e}\`""`)),o.push(n.join(","))),e.target=Buffer.from(o.join(" "),"utf16le").toString("base64")}else{if(r)t=r;else{const e="/"===__dirname;let r=!1;try{await o.access(u,s.X_OK),r=!0}catch{}t=process.versions.electron||"android"===d||e||!r?"xdg-open":u}n.length>0&&l.push(...n),e.wait||(p.stdio="ignore",p.detached=!0)}e.target&&l.push(e.target),"darwin"===d&&n.length>0&&l.push("--args",...n);const m=i.spawn(t,l,p);return e.wait?new Promise(((t,r)=>{m.once("error",r),m.once("close",(n=>{e.allowNonzeroExitCode&&n>0?r(new Error(`Exited with code ${n}`)):t(m)}))})):(m.unref(),m)},m=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a `target`");return g({...t,target:e})};function y(e){if("string"==typeof e||Array.isArray(e))return e;const{[p]:t}=e;if(!t)throw new Error(`${p} is not supported`);return t}function v({[d]:e},{wsl:t}){if(t&&a)return y(t);if(!e)throw new Error(`${d} is not supported`);return y(e)}const _={};l(_,"chrome",(()=>v({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"]}}))),l(_,"firefox",(()=>v({darwin:"firefox",win32:"C:\\Program Files\\Mozilla Firefox\\firefox.exe",linux:"firefox"},{wsl:"/mnt/c/Program Files/Mozilla Firefox/firefox.exe"}))),l(_,"edge",(()=>v({darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]},{wsl:"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"}))),m.apps=_,m.openApp=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a `name`");const{arguments:r=[]}=t||{};if(null!=r&&!Array.isArray(r))throw new TypeError("Expected `appArguments` as Array type");return g({...t,app:{name:e,arguments:r}})},e.exports=m},71756:(e,t,r)=>{"use strict";var n=r(38173);e.exports=function(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=n(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(r){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}},91320:(e,t,r)=>{"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=n(r(71756));const o=(e,t)=>t.some((t=>t instanceof RegExp?t.test(e):t===e));const s=(e,t=!1)=>{const r=/^(?:([a-z_][a-z0-9_-]{0,31})@|https?:\/\/)([\w\.\-@]+)[\/:]([\~,\.\w,\-,\_,\/]+?(?:\.git|\/)?)$/,n=t=>{const r=new Error(t);throw r.subject_url=e,r};"string"==typeof e&&e.trim()||n("Invalid url."),e.length>s.MAX_INPUT_LENGTH&&n("Input exceeds maximum length. If needed, change the value of parseUrl.MAX_INPUT_LENGTH."),t&&("object"!=typeof t&&(t={stripHash:!1}),e=function(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((e,{stripHash:t})=>{const r=/^data:(?[^,]*?),(?[^#]*?)(?:#(?.*))?$/.exec(e);if(!r)throw new Error(`Invalid URL: ${e}`);let{type:n,data:i,hash:o}=r.groups;const s=n.split(";");o=t?"":o;let a=!1;"base64"===s[s.length-1]&&(s.pop(),a=!0);const c=(s.shift()||"").toLowerCase(),l=[...s.map((e=>{let[t,r=""]=e.split("=").map((e=>e.trim()));return"charset"===t&&(r=r.toLowerCase(),"us-ascii"===r)?"":`${t}${r?`=${r}`:""}`})).filter(Boolean)];return a&&l.push("base64"),(l.length>0||c&&"text/plain"!==c)&&l.unshift(c),`data:${l.join(";")},${a?i.trim():i}${o?`#${o}`:""}`})(e,t);if(/^view-source:/i.test(e))throw new Error("`view-source:` is not supported as it is a non-standard protocol");const r=e.startsWith("//");!r&&/^\.*\//.test(e)||(e=e.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,t.defaultProtocol));const n=new URL(e);if(t.forceHttp&&t.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(t.forceHttp&&"https:"===n.protocol&&(n.protocol="http:"),t.forceHttps&&"http:"===n.protocol&&(n.protocol="https:"),t.stripAuthentication&&(n.username="",n.password=""),t.stripHash?n.hash="":t.stripTextFragment&&(n.hash=n.hash.replace(/#?:~:text.*?$/i,"")),n.pathname){const e=/\b[a-z][a-z\d+\-.]{1,50}:\/\//g;let t=0,r="";for(;;){const i=e.exec(n.pathname);if(!i)break;const o=i[0],s=i.index;r+=n.pathname.slice(t,s).replace(/\/{2,}/g,"/"),r+=o,t=s+o.length}r+=n.pathname.slice(t,n.pathname.length).replace(/\/{2,}/g,"/"),n.pathname=r}if(n.pathname)try{n.pathname=decodeURI(n.pathname)}catch{}if(!0===t.removeDirectoryIndex&&(t.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(t.removeDirectoryIndex)&&t.removeDirectoryIndex.length>0){let e=n.pathname.split("/");const r=e[e.length-1];o(r,t.removeDirectoryIndex)&&(e=e.slice(0,-1),n.pathname=e.slice(1).join("/")+"/")}if(n.hostname&&(n.hostname=n.hostname.replace(/\.$/,""),t.stripWWW&&/^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(n.hostname)&&(n.hostname=n.hostname.replace(/^www\./,""))),Array.isArray(t.removeQueryParameters))for(const e of[...n.searchParams.keys()])o(e,t.removeQueryParameters)&&n.searchParams.delete(e);if(!0===t.removeQueryParameters&&(n.search=""),t.sortQueryParameters){n.searchParams.sort();try{n.search=decodeURIComponent(n.search)}catch{}}t.removeTrailingSlash&&(n.pathname=n.pathname.replace(/\/$/,""));const i=e;return e=n.toString(),t.removeSingleSlash||"/"!==n.pathname||i.endsWith("/")||""!==n.hash||(e=e.replace(/\/$/,"")),(t.removeTrailingSlash||"/"===n.pathname)&&""===n.hash&&t.removeSingleSlash&&(e=e.replace(/\/$/,"")),r&&!t.normalizeProtocol&&(e=e.replace(/^http:\/\//,"//")),t.stripProtocol&&(e=e.replace(/^(?:https?:)?\/\//,"")),e}(e,t));const a=i.default(e);if(a.parse_failed){const e=a.href.match(r);e?(a.protocols=["ssh"],a.protocol="ssh",a.resource=e[2],a.host=e[2],a.user=e[1],a.pathname=`/${e[3]}`,a.parse_failed=!1):n("URL parsing failed.")}return a};s.MAX_INPUT_LENGTH=2048,e.exports=s},55575:e=>{"use strict";const t=(e,t)=>function(){const r=t.promiseModule,n=new Array(arguments.length);for(let e=0;e{t.errorFirst?n.push((function(e,n){if(t.multiArgs){const t=new Array(arguments.length-1);for(let e=1;e{r=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},r);const n=e=>{const t=t=>"string"==typeof t?e===t:t.test(e);return r.include?r.include.some(t):!r.exclude.some(t)};let i;i="function"==typeof e?function(){return r.excludeMain?e.apply(this,arguments):t(e,r).apply(this,arguments)}:Object.create(Object.getPrototypeOf(e));for(const o in e){const s=e[o];i[o]="function"==typeof s&&n(o)?t(s,r):s}return i}},38173:e=>{"use strict";e.exports=function(e,t){!0===t&&(t=0);var r="";if("string"==typeof e)try{r=new URL(e).protocol}catch(e){}else e&&e.constructor===URL&&(r=e.protocol);var n=r.split(/\:|\+/).filter(Boolean);return"number"==typeof t?n[t]:n}},94403:e=>{"use strict";function t(e){return"function"==typeof e}var r=console.error.bind(console);function n(e,t,r){var n=!!e[t]&&e.propertyIsEnumerable(t);Object.defineProperty(e,t,{configurable:!0,enumerable:n,writable:!0,value:r})}function i(e){e&&e.logger&&(t(e.logger)?r=e.logger:r("new logger isn't a function, not replacing"))}function o(e,i,o){if(e&&e[i]){if(!o)return r("no wrapper function"),void r((new Error).stack);if(t(e[i])&&t(o)){var s=e[i],a=o(s,i);return n(a,"__original",s),n(a,"__unwrap",(function(){e[i]===a&&n(e,i,s)})),n(a,"__wrapped",!0),n(e,i,a),a}r("original object and wrapper must be functions")}else r("no original function "+i+" to wrap")}function s(e,t){return e&&e[t]?e[t].__unwrap?e[t].__unwrap():void r("no original to unwrap to -- has "+t+" already been unwrapped?"):(r("no function to unwrap."),void r((new Error).stack))}i.wrap=o,i.massWrap=function(e,t,n){if(!e)return r("must provide one or more modules to patch"),void r((new Error).stack);Array.isArray(e)||(e=[e]),t&&Array.isArray(t)?e.forEach((function(e){t.forEach((function(t){o(e,t,n)}))})):r("must provide one or more functions to wrap on modules")},i.unwrap=s,i.massUnwrap=function(e,t){if(!e)return r("must provide one or more modules to patch"),void r((new Error).stack);Array.isArray(e)||(e=[e]),t&&Array.isArray(t)?e.forEach((function(e){t.forEach((function(t){s(e,t)}))})):r("must provide one or more functions to unwrap on modules")},e.exports=i},50302:(e,t,r)=>{var n=r(81327),i=r(71576).StringDecoder;e.exports=function(e,t,r){var o=new i,s="",a=r&&r.maxLength,c=!r||!1!==r.trailing;function l(e,r){if(t){try{r=t(r)}catch(t){return e.emit("error",t)}void 0!==r&&e.queue(r)}else e.queue(r)}function u(t,r){var n=((null!=s?s:"")+r).split(e);if(s=n.pop(),a&&s.length>a)return t.emit("error",new Error("maximum buffer reached"));for(var i=0;i{e.exports=function(e,t){var r=[];r.push(function(e){try{return Error.prototype.toString.call(e)}catch(e){try{return""}catch(e){return""}}}(e));for(var n=0;n"}catch(e){i=""}}r.push(" at "+i)}return r.join("\n")}},26818:(e,t,r)=>{if(global._stackChain){if(global._stackChain.version!==r(70735).i8)throw new Error("Conflicting version of stack-chain found");e.exports=global._stackChain}else e.exports=global._stackChain=r(82396)},82396:(e,t,r)=>{var n=r(63031);function i(){this.extend=new a,this.filter=new a,this.format=new c,this.version=r(70735).i8}var o=!1;i.prototype.callSite=function e(t){t||(t={}),o=!0;var r={};Error.captureStackTrace(r,e);var n=r.stack;return o=!1,n=n.slice(t.slice||0),t.extend&&(n=this.extend._modify(r,n)),t.filter&&(n=this.filter._modify(r,n)),n};var s=new i;function a(){this._modifiers=[]}function c(){this._formater=n,this._previous=void 0}a.prototype._modify=function(e,t){for(var r=0,n=this._modifiers.length;r{"use strict";const n=r(22037),i=r(41875),o=process.env;let s;function a(e){const t=function(e){if(!1===s)return 0;if(i("color=16m")||i("color=full")||i("color=truecolor"))return 3;if(i("color=256"))return 2;if(e&&!e.isTTY&&!0!==s)return 0;const t=s?1:0;if("win32"===process.platform){const e=n.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in o)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some((e=>e in o))||"codeship"===o.CI_NAME?1:t;if("TEAMCITY_VERSION"in o)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(o.TEAMCITY_VERSION)?1:0;if("truecolor"===o.COLORTERM)return 3;if("TERM_PROGRAM"in o){const e=parseInt((o.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(o.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(o.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(o.TERM)||"COLORTERM"in o?1:(o.TERM,t)}(e);return function(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}(t)}i("no-color")||i("no-colors")||i("color=false")?s=!1:(i("color")||i("colors")||i("color=true")||i("color=always"))&&(s=!0),"FORCE_COLOR"in o&&(s=0===o.FORCE_COLOR.length||0!==parseInt(o.FORCE_COLOR,10)),e.exports={supportsColor:a,stdout:a(process.stdout),stderr:a(process.stderr)}},81327:(e,t,r)=>{var n=r(12781);function i(e,t,r){e=e||function(e){this.queue(e)},t=t||function(){this.queue(null)};var i=!1,o=!1,s=[],a=!1,c=new n;function l(){for(;s.length&&!c.paused;){var e=s.shift();if(null===e)return c.emit("end");c.emit("data",e)}}function u(){c.writable=!1,t.call(c),!c.readable&&c.autoDestroy&&c.destroy()}return c.readable=c.writable=!0,c.paused=!1,c.autoDestroy=!(r&&!1===r.autoDestroy),c.write=function(t){return e.call(this,t),!c.paused},c.queue=c.push=function(e){return a||(null===e&&(a=!0),s.push(e),l()),c},c.on("end",(function(){c.readable=!1,!c.writable&&c.autoDestroy&&process.nextTick((function(){c.destroy()}))})),c.end=function(e){if(!i)return i=!0,arguments.length&&c.write(e),u(),c},c.destroy=function(){if(!o)return o=!0,i=!0,s.length=0,c.writable=c.readable=!1,c.emit("close"),c},c.pause=function(){if(!c.paused)return c.paused=!0,c},c.resume=function(){return c.paused&&(c.paused=!1,c.emit("resume")),l(),c.paused||c.emit("drain"),c},c}e.exports=i,i.through=i},81843:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.logger=t.initializeLateDependencies=t.createAgentContext=void 0;const n=r(44617),i=r(35765),o=r(93927),s=r(39800),a=r(30446),c=r(5798),l=r(69035),u=r(86635),d=r(65489),p=r(89531),h=r(52369),f=r(70819),g=r(53406),m=r(9321),y=r(3895),v=r(53007),_=r(87426),b=r(61926),w=r(76021),C=r(65332),E=r(57214),T=r(40585),S=r(32879),x=r(65120),k=r(42401),I=r(10540);function A(){const e=(0,o.createProductionContext)(new y.AgentConfigProvider),r=(0,T.makeXdgPersistenceManager)();e.set(T.PersistenceManager,r);const c=new m.AuthManager(r,(e=>new i.CopilotTokenManagerFromGitHubToken(e)));e.set(g.GitHubDeviceFlow,new g.GitHubDeviceFlow),e.set(m.AuthManager,c),e.set(s.EditorSession,x.agentEditorSession),e.set(s.EditorAndPluginInfo,new y.AgentEditorInfo),e.set(C.MethodHandlers,(0,C.getAllMethods)()),e.set(C.NotificationHandlers,new C.NotificationHandlers),e.set(v.CopilotCompletionCache,new v.CopilotCompletionCache),e.set(h.LocationFactory,new k.AgentLocationFactory),e.set(n.FileSystem,w.agentFileSystem),(0,a.registerDefaultHandlers)(e,"agent"),e.set(_.WrappedConnection,_.WrappedConnection.from(e,process.stdin,process.stdout));const p=new E.ConnectionNotificationSender(e);e.set(l.NotificationSender,p),e.set(E.AgentNotificationSender,p),e.set(u.StatusReporter,new b.NotificationStatusReporter(e));const S=new I.AgentTextDocumentManager(e);return e.set(f.TextDocumentManager,S),e.set(I.AgentTextDocumentManager,S),process.on("exit",(()=>{try{t.logger.debug(e,"Shutting down agent"),e.get(d.TelemetryReporters).deactivate()}catch(e){}})),e}!async function(){const e=A();new S.CopilotService(e).listen()}(),t.createAgentContext=A,t.initializeLateDependencies=function(e){(0,p.setupStandardReporters)(e,"agent"),t.logger.debug(e,"Telemetry initialized")},t.logger=new c.Logger(c.LogLevel.DEBUG,"agent")},53406:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GitHubDeviceFlow=void 0;const n=r(39800),i=r(70769),o=r(20039),s="Iv1.b507a08c87ecfe98";async function a(e,t){const r={method:"POST",headers:{Accept:"application/json",...(0,n.editorVersionHeaders)(e)},json:{client_id:s,device_code:t,grant_type:"urn:ietf:params:oauth:grant-type:device_code"},timeout:3e4};return e.get(o.Fetcher).fetch("https://github.com/login/oauth/access_token",r).then((e=>e.json()))}async function c(e,t){return e.get(o.Fetcher).fetch("https://api.github.com/user",{headers:{Authorization:`Bearer ${t}`,Accept:"application/json"}}).then((e=>e.json()))}t.GitHubDeviceFlow=class{async getToken(e){try{return await this.getTokenUnguarded(e)}catch(t){throw e.get(i.UserErrorNotifier).notifyUser(e,t),t}}async getTokenUnguarded(e){const t=await async function(e){const t={method:"POST",headers:{Accept:"application/json",...(0,n.editorVersionHeaders)(e)},json:{client_id:s,scope:"read:user"},timeout:3e4},r=e.get(o.Fetcher).fetch("https://github.com/login/device/code",t);return(await r).json()}(e),r=new Promise((async(r,n)=>{let i,o=t.expires_in;for(;o>0;){const n=await a(e,t.device_code);if(o-=t.interval,await new Promise((e=>setTimeout(e,1e3*t.interval))),i=n.access_token,i)return void r({user:(await c(e,i)).login,oauth_token:i})}n("Timed out waiting for login to complete")}));return{...t,waitForAuth:r}}}},9321:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createRequestContext=t.AuthManager=void 0;const n=r(35765),i=r(75611),o=r(5381);class s{constructor(e,t){this.persistenceManager=e,this.mkTokenManager=t,this._pendingSignIn=void 0}getCopilotTokenManager(){return this._copilotTokenManager}setPendingSignIn(e){this._pendingSignIn=e}getPendingSignIn(){return this._pendingSignIn}async checkAndUpdateStatus(e,t){const r=t?.localChecksOnly??!1;let n;if("true"===process.env.CODESPACES&&process.env.GITHUB_TOKEN&&(n={user:process.env.GITHUB_USER||"codespace-user",oauth_token:process.env.GITHUB_TOKEN}),void 0===n&&(n=await this.getAuthRecord()),void 0===n)return this._copilotTokenManager=void 0,{status:"NotSignedIn"};if(r)return{status:"MaybeOK",user:n.user};const i={token:n.oauth_token};n.dev_override&&(i.devOverride={copilotTokenUrl:n.dev_override.copilot_token_url,notificationUrl:n.dev_override.notification_url});const o=this.mkTokenManager(i),s=await o.checkCopilotToken(e);return"status"in s?(this._copilotTokenManager=o,{status:"OK",user:n.user}):(this._copilotTokenManager=void 0,{status:"HTTP401"===s.reason?"NotSignedIn":s.reason,user:n.user})}async getAuthRecord(){return await this.persistenceManager.read("hosts","github.com")}async setAuthRecord(e){await this.persistenceManager.update("hosts","github.com",e)}async deleteAuthRecord(){await this.persistenceManager.delete("hosts","github.com")}}t.AuthManager=s,t.createRequestContext=async function(e,t){let r=t;if(void 0===r&&(r=e.get(s).getCopilotTokenManager()),void 0===r){const t=await e.get(s).checkAndUpdateStatus(e);if("OK"!==t.status)return{code:o.ErrorCode.NoCopilotToken,message:`Not authenticated: ${t.status}`};if(r=e.get(s).getCopilotTokenManager(),void 0===r)return{code:o.ErrorCode.InternalError,message:"Unexpected missing Copilot token"}}const a=new i.Context(e);return a.forceSet(n.CopilotTokenManager,r),a}},69582:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.MergedToken=void 0;const r=Object.freeze((function(e,t){const r=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(r)}}})),n=Object.freeze({isCancellationRequested:!1,onCancellationRequested:()=>({dispose:()=>{}})}),i=Object.freeze({isCancellationRequested:!0,onCancellationRequested:r});class o{constructor(){this._isCancelled=!1,this.handlers=[]}cancel(){this._isCancelled||(this._isCancelled=!0,this.handlers.forEach((e=>e(void 0))))}get isCancellationRequested(){return this._isCancelled}onCancellationRequested(e,t,n){return this._isCancelled?r(e,t):(this.handlers.push(e.bind(t)),{dispose:()=>{}})}dispose(){this.handlers=[]}}t.MergedToken=class{cancel(){this._isCancelled||(this._isCancelled=!0,this.handlers.forEach((e=>e(void 0))))}constructor(e){this.tokens=[],this.handlers=[],this._isCancelled=!1,this.tokens=e,this._isCancelled=e.some((e=>e.isCancellationRequested)),e.forEach((e=>{e.onCancellationRequested(this.cancel,this)}))}dispose(){this.tokens=[]}get isCancellationRequested(){return this.tokens.some((e=>e.isCancellationRequested))}onCancellationRequested(e,t,n){return this._isCancelled?r(e,t):(this.handlers.push(e.bind(t)),{dispose:()=>{}})}},t.CancellationTokenSource=class{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new o),this._token}cancel(){this._token?this._token instanceof o&&this._token.cancel():this._token=i}dispose(e=!1){e&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof o&&this._token.dispose():this._token=n}}},58212:(e,t)=>{"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.extensions=t.workspace=t.env=t.UIKind=t.EndOfLine=void 0,(n=t.EndOfLine||(t.EndOfLine={}))[n.LF=1]="LF",n[n.CRLF=2]="CRLF",function(e){e[e.Web=0]="Web",e[e.Desktop=1]="Desktop"}(r=t.UIKind||(t.UIKind={})),t.env={isTelemetryEnabled:!0,uiKind:r.Desktop,appRoot:"/non-existent-path"},t.workspace={onDidChangeConfiguration:()=>{},getConfiguration:()=>({})},t.extensions={getExtension:e=>{}}},3895:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AgentEditorInfo=t.AgentConfigProvider=void 0;const n=r(39800);class i extends n.InMemoryConfigProvider{constructor(){super(new n.DefaultsOnlyConfigProvider,new Map)}getOptionalConfig(e){if(!Array.isArray(e)||"editor"!=e[0]||this.isDefaultSettingOverwritten(e))return super.getConfig(e)}}t.AgentConfigProvider=i;class o extends n.EditorAndPluginInfo{setEditorAndPluginInfo(e,t){this._editorInfo=e,this._editorPluginInfo=t}getEditorInfo(e){return this._editorInfo?this._editorInfo:{name:"unknown-editor",version:"0"}}getEditorPluginInfo(e){return this._editorPluginInfo?this._editorPluginInfo:{name:"unknown-editor-plugin",version:"0"}}}t.AgentEditorInfo=o},53007:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CopilotCompletionCache=void 0;const n=r(70140);class i extends n.LRUCache{constructor(e=100){super(e)}}t.CopilotCompletionCache=i},87426:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WrappedConnection=void 0;const n=r(57147),i=r(12781),o=r(68212),s=r(5798),a=r(20913),c=r(4445);class l{constructor(e){this.conn=e}static from(e,t,r){let u=r;const d=parseInt(process.env.GH_COPILOT_DEBUG_UI_PORT);if(!isNaN(d))try{u=new c.DebugServer(d).listen().wrapStdout(r)}catch(t){new s.Logger(s.LogLevel.WARN,"agent").error(e,`Failed to start debug server on port ${d} (maybe it's in use?)`,t)}if(e.get(a.RuntimeMode).flags.recordInput){const e=Date.now().toString(),r=`stdin${e}.log`;t.on("data",(e=>{(0,n.appendFile)(r,e,(e=>{e&&console.error(e)}))}));const o=`stdout${e}.log`;p=u,h=e=>{(0,n.appendFile)(o,e,(e=>{e&&console.error(e)}))},u=new i.Writable({write:(e,t,r)=>(h(e.toString()),p.write(e,t,r))})}var p,h;const f=(0,o.createConnection)(o.ProposedFeatures.all,new o.StreamMessageReader(t),new o.StreamMessageWriter(u));return new l(f)}listen(){this.conn.listen()}}t.WrappedConnection=l},4445:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebugServer=void 0;const n=r(82361),i=r(57147),o=r(13685),s=r(71017),a=r(12781);function c(e,t){e.write("data: "+t.toString().replace(/\n/g,"\ndata: ")+"\n\n")}t.DebugServer=class{constructor(e){this.port=e,this.stdoutEmitter=new n.EventEmitter,this.server=o.createServer(((e,t)=>{if(e.headers.accept&&"text/event-stream"==e.headers.accept)switch(t.writeHead(200,{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"}),e.url){case"/stdin":return void process.stdin.on("data",(e=>{c(t,e)}));case"/stdout":return void this.stdoutEmitter.on("data",(e=>{c(t,e)}));default:return t.writeHead(404),void t.end()}t.writeHead(200,{"Content-Type":"text/html"});let r,n=__dirname;"dist"===s.basename(__dirname)&&(n=s.dirname(__dirname));try{r=i.readFileSync(s.join(n,"dist","debugServer.html"))}catch(e){r=e.toString()}t.write(r),t.end()}))}wrapStdout(e){return new a.Writable({write:(t,r,n)=>(this.stdoutEmitter.emit("data",t),e.write(t,r,n))})}listen(){return this.server.listen(this.port),this}}},76974:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotificationLogger=void 0;const n=r(68212),i=r(5798),o=r(57214);class s extends i.LogTarget{constructor(e){super(),this.debugMode=e}logIt(e,t,r,...s){const a={level:t,message:`${r} ${s.map(i.toPlainText)}`,metadataStr:r,extra:s.map(i.toPlainText)};e.get(o.AgentNotificationSender).sendNotification(new n.NotificationType("LogMessage"),a)}shouldLog(e,t){return!!this.debugMode||t>i.LogLevel.DEBUG}}t.NotificationLogger=s},61926:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotificationStatusReporter=void 0;const n=r(68212),i=r(57214);t.NotificationStatusReporter=class{constructor(e){this.ctx=e,this.notificationEndpoint="statusNotification",this.status="Normal"}setProgress(){"Error"!==this.status&&(this.status="InProgress",this.ctx.get(i.AgentNotificationSender).sendNotification(new n.NotificationType(this.notificationEndpoint),{status:"InProgress",message:""}))}removeProgress(){"Error"!==this.status&&"Warning"!==this.status&&(this.status="Normal",this.ctx.get(i.AgentNotificationSender).sendNotification(new n.NotificationType(this.notificationEndpoint),{status:"Normal",message:""}))}forceNormal(){this.status="Normal",this.ctx.get(i.AgentNotificationSender).sendNotification(new n.NotificationType(this.notificationEndpoint),{status:"Normal",message:""})}setWarning(e){"Error"!==this.status&&(this.status="Warning",this.ctx.get(i.AgentNotificationSender).sendNotification(new n.NotificationType(this.notificationEndpoint),{status:"Warning",message:""}))}setError(e){this.status="Error";const t={status:"Error",message:e};this.ctx.get(i.AgentNotificationSender).sendNotification(new n.NotificationType(this.notificationEndpoint),t)}}},76021:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.agentFileSystem=void 0;const n=r(57147);t.agentFileSystem={readFile:function(e){return n.promises.readFile(e)},mtime:async function(e){return(await n.promises.stat(e)).mtimeMs},stat:async function(e){const t=await n.promises.stat(e);return{ctime:t.ctimeMs,mtime:t.mtimeMs,size:t.size}}}},39824:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FakeWrappedConnection=t.FakeMessageWriter=t.FakeMessageReader=void 0;const n=r(68212),i=r(87426);class o extends n.AbstractMessageReader{listen(e){return this._callback=e,{dispose:()=>{this._callback=void 0}}}sendMessage(e){this._callback&&this._callback({jsonrpc:"2.0",...e})}}t.FakeMessageReader=o;class s extends n.AbstractMessageWriter{constructor(){super(...arguments),this.messages=[]}async write(e){this.messages.push(e)}end(){}}t.FakeMessageWriter=s;class a extends i.WrappedConnection{constructor(e=new o,t=new s){super((0,n.createConnection)(n.ProposedFeatures.all,e,t)),this.reader=e,this.writer=t}}t.FakeWrappedConnection=a},86934:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(892),i=r(86236),o=r(9321),s=r(5381),a=r(6159),c=r(56056),l=n.Type.Object({options:n.Type.Optional(n.Type.Intersect([n.Type.Object({localChecksOnly:n.Type.Optional(n.Type.Boolean())}),c.TestingOptions]))}),u=(new i.default).compile(n.Type.Strict(l));t.default=async function(e,t,r){if(!u(r)){const e=(0,s.extractAjvErrors)(u.errors);return[null,{code:s.ErrorCode.InvalidParams,message:"Invalid params: "+e.join(";")}]}return void 0!==r.options?.testingCtx&&(e=(0,a.getTestingContext)(r.options.testingCtx)),[await e.get(o.AuthManager).checkAndUpdateStatus(e,r.options),null]}},33340:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleGetCompletionsCycling=t.handleGetCompletions=void 0;const n=r(892),i=r(86236),o=r(7057),s=r(16630),a=r(75611),c=r(63993),l=r(40702),u=r(41749),d=r(5798),p=r(20039),h=r(65489),f=r(52369),g=r(9321),m=r(69582),y=r(53007),v=r(5381),_=r(7838),b=r(6159),w=r(42401),C=r(22930),E=r(56056),T=n.Type.Object({doc:n.Type.Object({position:n.Type.Object({line:n.Type.Number({minimum:0}),character:n.Type.Number({minimum:0})}),insertSpaces:n.Type.Optional(n.Type.Boolean()),tabSize:n.Type.Optional(n.Type.Number()),uri:n.Type.String(),version:n.Type.Number(),source:n.Type.Optional(n.Type.String()),languageId:n.Type.Optional(n.Type.String()),relativePath:n.Type.Optional(n.Type.String())}),options:n.Type.Optional(E.TestingOptions)}),S=(new i.default).compile(n.Type.Strict(T));let x;async function k(e,t,r,n,i){const E=h.TelemetryData.createAndMarkAsIssued();x&&(x.cancel(),x.dispose()),x=new m.CancellationTokenSource;const T=new m.MergedToken([t,x.token]);if(!S(r)){const e=(0,v.extractAjvErrors)(S.errors);return[null,{code:v.ErrorCode.InvalidParams,message:"Invalid params: "+e.join(";")}]}let k;void 0!==r.options?.testingCtx&&(e=(0,b.getTestingContext)(r.options.testingCtx));try{k=e.get(C.CompletionDocuments)}catch(e){}if(k){const e=i?3:1;return[{completions:k.documents.slice(0,e).map((e=>{const{cursorLine:t,lines:n,start:i,end:s}=(0,_.parseChallengeDoc)(e,r.doc.position),a=[t.slice(Math.min(i.character,r.doc.position.character))].concat(n.slice(r.doc.position.line+1)).join("\n");return{uuid:o.v4(),text:a,displayText:a,position:r.doc.position,range:{start:i,end:s},docVersion:r.doc.version}}))},null]}const I=await(0,g.createRequestContext)(e,n);if(!(I instanceof a.Context))return[null,I];const A=s.URI.parse(r.doc.uri);let P;try{if(P=await(0,w.getTextDocumentChecked)(e,A,r.doc),P.version!==r.doc.version)return async function(e,t,r,n){t.isCancellationRequested||(async function(e,t,r){const n=h.TelemetryData.createAndMarkAsIssued({languageId:String(t.languageId),requestedDocumentVersion:String(r),actualDocumentVersion:String(t.version)});(0,h.telemetry)(e,"getCompletions.docVersionMismatch",n)}(e,r,n.doc.version),new d.Logger(d.LogLevel.DEBUG,"getCompletions").debug(e,`Producing empty completions due to document version mismatch. Completions requested for document version ${n.doc.version} but document version was ${r.version}.`))}(e,T,P,r),[{completions:[]},null]}catch(e){return[null,{code:v.ErrorCode.InvalidParams,message:e.message}]}const R=P.offsetAt(I.get(f.LocationFactory).position(r.doc.position.line,r.doc.position.character)),N=P.positionAt(R),O=await async function(e,t,r,n,i,o){try{return await(0,l.getGhostText)(e,t,r,n,i,o)}catch(e){if((0,p.isAbortError)(e))return{type:"canceled",reason:"aborted at unknown location",telemetryData:(0,u.mkCanceledResultTelemetry)(i,{cancelledNetworkRequest:!0})};throw e}}(I,P,N,i,E,T),L=await(0,u.handleGhostTextResultTelemetry)(e,O);if(!L)return[{completions:[]},null];const[D,M]=L,B=(0,c.completionsFromGhostTextResults)(e,D,M,P,N,r.doc),F=e.get(y.CopilotCompletionCache);for(const e of B)F.put(e.uuid,e);return[{completions:B.map((e=>({uuid:e.uuid,text:e.text,range:e.range,displayText:e.displayText,position:e.position,docVersion:P.version})))},null]}t.handleGetCompletions=async function(e,t,r,n){return k(e,t,r,n,!1)},t.handleGetCompletionsCycling=async function(e,t,r,n){return k(e,t,r,n,!0)}},79638:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleGetPanelCompletions=void 0;const n=r(892),i=r(86236),o=r(76679),s=r(7057),a=r(35809),c=r(16630),l=r(39800),u=r(75611),d=r(75680),p=r(36317),h=r(5798),f=r(65489),g=r(52369),m=r(9321),y=r(69582),v=r(57214),_=r(5381),b=r(7838),w=r(6159),C=r(42401),E=r(8730),T=r(56056),S=n.Type.Object({doc:n.Type.Object({position:n.Type.Object({line:n.Type.Number({minimum:0}),character:n.Type.Number({minimum:0})}),uri:n.Type.String(),version:n.Type.Number(),source:n.Type.Optional(n.Type.String()),languageId:n.Type.Optional(n.Type.String()),relativePath:n.Type.Optional(n.Type.String())}),panelId:n.Type.String(),options:n.Type.Optional(T.TestingOptions)}),x=(new i.default).compile(n.Type.Strict(S));class k{constructor(e,t,r,n,i){this.textDocument=e,this.startPosition=t,this.completionContext=r,this.solutionCountTarget=n,this.cancellationToken=i,this.savedTelemetryData=f.TelemetryData.createAndMarkAsIssued()}reportCancelled(){}getCancellationToken(){return this.cancellationToken}async getDocument(){return this.textDocument}}async function I(e,t,r,n,i){const s=await n;switch(s.status){case"Solution":r.sendNotification(new a.NotificationType("PanelSolution"),function(e,t,r){const n=(0,p.normalizeCompletionText)(r.completionText);return{panelId:e,range:t,completionText:r.completionText,displayText:r.displayText,score:r.meanProb,solutionId:(0,o.SHA256)(n).toString(),docVersion:r.docVersion}}(e,t,s.solution)),await I(e,t,r,s.next,i);break;case"FinishedNormally":await A(e,r,i);break;case"FinishedWithError":r.sendNotification(new a.NotificationType("PanelSolutionsDone"),{status:"Error",message:s.error,panelId:e}),i()}}async function A(e,t,r){t.sendNotification(new a.NotificationType("PanelSolutionsDone"),{status:"OK",panelId:e}),r()}let P;t.handleGetPanelCompletions=async function(e,t,r,n,i){P&&(P.cancel(),P.dispose()),P=new y.CancellationTokenSource;const o=new y.MergedToken([t,P.token]);if(!x(r)){const e=(0,_.extractAjvErrors)(x.errors);return[null,{code:_.ErrorCode.InvalidParams,message:"Invalid params: "+e.join(";")}]}let a,f;void 0!==r.options?.testingCtx&&(e=(0,w.getTestingContext)(r.options.testingCtx));const T=(0,l.getConfig)(e,l.ConfigKey.ListCount);let S;try{S=e.get(E.PanelCompletionDocuments)}catch(e){}if(S){const e=s.v4(),t=S.documents,n=async i=>{if(i>=T||i>=t.length)return{status:"FinishedNormally"};const{text:o,score:a}=t[i],{cursorLine:c,lines:l,start:u}=(0,b.parseChallengeDoc)(o,r.doc.position),d=[c.slice(Math.min(u.character,r.doc.position.character))].concat(l.slice(r.doc.position.line+1)).join("\n");return{status:"Solution",solution:{requestId:{headerRequestId:e,completionId:s.v4(),created:0,serverExperiments:"",deploymentId:""},completionText:d,displayText:d,meanProb:a,meanLogProb:-1,choiceIndex:i,prependToCompletion:"",docVersion:r.doc.version},next:n(i+1)}};f=r.doc.position,a=n(0)}else{const t=await(0,m.createRequestContext)(e,n);if(!(t instanceof u.Context))return[null,t];const s=c.URI.parse(r.doc.uri);let l;try{if(l=await(0,C.getTextDocumentChecked)(e,s,r.doc),l.version!==r.doc.version)return new h.Logger(h.LogLevel.DEBUG,"getPanelCompletions").debug(e,`Producing empty solutions due to document version mismatch. Panel completions requested for document version ${r.doc.version} but document version was ${l.version}.`),function(e,t,r){return A(t.panelId,e.get(v.AgentNotificationSender),r??(()=>{})),[{solutionCountTarget:0},null]}(e,r,i)}catch(e){return[null,{code:_.ErrorCode.InvalidParams,message:e.message}]}const y=l.offsetAt(t.get(g.LocationFactory).position(r.doc.position.line,r.doc.position.character));f=l.positionAt(y);const b=(0,d.completionContextForDocument)(e,l,f),w=new k(l,f,b,T,o);a=(0,p.launchSolutions)(t,w),e=t}return setImmediate((()=>I(r.panelId,e.get(g.LocationFactory).range(f,f),e.get(v.AgentNotificationSender),a,i??(()=>{})))),[{solutionCountTarget:T},null]}},61025:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(892),i=r(86236),o=r(39800),s=r(5381),a=n.Type.Object({}),c=(new i.default).compile(n.Type.Strict(a));t.default=async function(e,t,r){if(!c(r)){const e=(0,s.extractAjvErrors)(c.errors);return[null,{code:s.ErrorCode.InvalidParams,message:"Invalid params: "+e.join(";")}]}return[{version:(0,o.getVersion)(e)},null]}},65332:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotificationHandlers=t.getAllMethods=t.MethodHandlers=void 0;const n=r(86934),i=r(33340),o=r(79638),s=r(61025),a=r(55581),c=r(71382),l=r(91300),u=r(89629),d=r(66885),p=r(31451),h=r(96656),f=r(31620),g=r(72530),m=r(8269),y=r(73609),v=r(86584),_=r(22930),b=r(8730),w=r(82043),C=r(22229),E=r(90623),T=r(98127);class S{constructor(e){this.handlers=e}}t.MethodHandlers=S,t.getAllMethods=function(){const e=new Map;return e.set("getCompletions",i.handleGetCompletions),e.set("getCompletionsCycling",i.handleGetCompletionsCycling),e.set("getPanelCompletions",o.handleGetPanelCompletions),e.set("getVersion",s.default),e.set("setEditorInfo",u.handleSetEditorInfo),e.set("checkStatus",n.default),e.set("signInInitiate",p.default),e.set("signInConfirm",d.default),e.set("signOut",h.default),e.set("notifyShown",l.notifyShown),e.set("notifyAccepted",a.notifyAccepted),e.set("notifyRejected",c.notifyRejected),e.set("telemetry/exception",f.telemetryExceptionMethod),e.set("testing/createContext",m.default),e.set("testing/alwaysAuth",g.default),e.set("testing/neverAuth",v.default),e.set("testing/useTestingToken",C.default),e.set("testing/setCompletionDocuments",_.default),e.set("testing/setPanelCompletionDocuments",b.default),e.set("testing/triggerShowMessageRequest",w.default),e.set("testing/getDocument",y.default),e.set("debug/verifyState",T.handleVerifyState),e.set("debug/verifyCertificate",E.handleVerifyCertificate),e.set("debug/verifyWorkspaceState",T.handleVerifyWorkspaceState),new S(e)},t.NotificationHandlers=class{constructor(e=new Map){this.handlers=e}}},55581:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.notifyAccepted=void 0;const n=r(892),i=r(86236),o=r(93402),s=r(53007),a=r(5381),c=r(6159),l=r(56056),u=n.Type.Object({uuid:n.Type.String({minLength:1}),options:n.Type.Optional(l.TestingOptions)}),d=(new i.default).compile(n.Type.Strict(u));t.notifyAccepted=async function(e,t,r){if(!d(r)){const e=(0,a.extractAjvErrors)(d.errors);return[null,{code:a.ErrorCode.InvalidParams,message:"Invalid params: "+e.join(";")}]}void 0!==r.options?.testingCtx&&(e=(0,c.getTestingContext)(r.options.testingCtx));const n=e.get(s.CopilotCompletionCache),i=n.get(r.uuid);return i&&(n.deleteKey(r.uuid),(0,o.postInsertionTasks)(e,"ghostText",i.text,i.offset,i.file,i.telemetry)),["OK",null]}},94340:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.applyNetworkProxyConfiguration=t.applySettingsToConfiguration=t.notifyChangeConfiguration=t.EditorConfigurationSettings=t.NetworkProxy=void 0;const n=r(892),i=r(86236),o=r(39800),s=r(20039),a=r(5381),c=r(6159),l=r(56056);t.NetworkProxy=n.Type.Object({host:n.Type.String(),port:n.Type.Number(),username:n.Type.Optional(n.Type.String()),password:n.Type.Optional(n.Type.String()),rejectUnauthorized:n.Type.Optional(n.Type.Boolean())}),t.EditorConfigurationSettings=n.Type.Object({showEditorCompletions:n.Type.Optional(n.Type.Boolean()),enableAutoCompletions:n.Type.Optional(n.Type.Boolean()),delayCompletions:n.Type.Optional(n.Type.Boolean()),filterCompletions:n.Type.Optional(n.Type.Boolean()),disabledLanguages:n.Type.Optional(n.Type.Array(n.Type.Object({languageId:n.Type.String()})))});const u=n.Type.Object({settings:n.Type.Optional(t.EditorConfigurationSettings),networkProxy:n.Type.Optional(n.Type.Union([t.NetworkProxy,n.Type.Null()])),options:n.Type.Optional(l.TestingOptions)}),d=(new i.default).compile(n.Type.Strict(u));function p(e,t){const r=e.get(o.ConfigProvider);if(r.setConfig(o.ConfigKey.ShowEditorCompletions,t.showEditorCompletions),r.setConfig(o.ConfigKey.DelayCompletions,t.delayCompletions),r.setConfig(o.ConfigKey.EnableAutoCompletions,t.enableAutoCompletions),r.setConfig(o.ConfigKey.FilterCompletions,t.filterCompletions),t.disabledLanguages)for(const e of t.disabledLanguages)r.setLanguageEnablement(e.languageId,!1)}function h(e,t){if(!t)return void(e.get(s.Fetcher).proxySettings=void 0);let r;t.username&&(r=t.password?t.username+":"+t.password:t.username);const n=r?r+"@":"";process.env.http_proxy=`http://${n}${t.host}:${t.port}`,process.env.https_proxy=`http://${n}${t.host}:${t.port}`,e.get(s.Fetcher).proxySettings={host:t.host,port:t.port,proxyAuth:r,rejectUnauthorized:t.rejectUnauthorized??!0,headers:{}}}t.notifyChangeConfiguration=function(e,t){if(!d(t)){const e=(0,a.extractAjvErrors)(d.errors);throw new Error(`Invalid params: ${e.join(", ")}`)}void 0!==t.options?.testingCtx&&(e=(0,c.getTestingContext)(t.options.testingCtx)),t.settings&&p(e,t.settings),void 0!==t.networkProxy&&h(e,t.networkProxy)},t.applySettingsToConfiguration=p,t.applyNetworkProxyConfiguration=h},71382:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.notifyRejected=void 0;const n=r(892),i=r(86236),o=r(93402),s=r(53007),a=r(5381),c=r(6159),l=r(56056),u=n.Type.Object({uuids:n.Type.Array(n.Type.String()),options:n.Type.Optional(l.TestingOptions)}),d=(new i.default).compile(n.Type.Strict(u));t.notifyRejected=async function(e,t,r){if(!d(r)){const e=(0,a.extractAjvErrors)(d.errors);return[null,{code:a.ErrorCode.InvalidParams,message:"Invalid params: "+e.join(";")}]}void 0!==r.options?.testingCtx&&(e=(0,c.getTestingContext)(r.options.testingCtx));const n=e.get(s.CopilotCompletionCache),i=r.uuids.flatMap((e=>n.get(e)??[]));if(i.length>0){const t=i[0];for(const e of r.uuids)n.deleteKey(e);const s=i.map((e=>({completionText:e.displayText,completionTelemetryData:e.telemetry})));(0,o.postRejectionTasks)(e,"ghostText",t.offset,t.file,s)}return["OK",null]}},91300:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.notifyShown=void 0;const n=r(892),i=r(86236),o=r(40702),s=r(41749),a=r(53007),c=r(5381),l=r(6159),u=r(56056),d=n.Type.Object({uuid:n.Type.String({minLength:1}),options:n.Type.Optional(u.TestingOptions)}),p=(new i.default).compile(n.Type.Strict(d));t.notifyShown=async function(e,t,r){if(!p(r)){const e=(0,c.extractAjvErrors)(p.errors);return[null,{code:c.ErrorCode.InvalidParams,message:"Invalid params: "+e.join(";")}]}void 0!==r.options?.testingCtx&&(e=(0,l.getTestingContext)(r.options.testingCtx));const n=e.get(a.CopilotCompletionCache).get(r.uuid);if(n){const t=!(n.resultType===o.ResultType.Network);(0,s.telemetryShown)(e,"ghostText",n.telemetry,t)}return["OK",null]}},89629:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleSetEditorInfo=void 0;const n=r(892),i=r(86236),o=r(39800),s=r(81843),a=r(5381),c=r(94340),l=n.Type.Object({name:n.Type.String(),version:n.Type.String()}),u=n.Type.Object({editorInfo:l,editorPluginInfo:l,editorConfiguration:n.Type.Optional(c.EditorConfigurationSettings),networkProxy:n.Type.Optional(c.NetworkProxy),options:n.Type.Optional(n.Type.Object({}))}),d=(new i.default).compile(n.Type.Strict(u));t.handleSetEditorInfo=async function(e,t,r){if(!d(r)){const e=(0,a.extractAjvErrors)(d.errors);return[null,{code:a.ErrorCode.InvalidParams,message:"Invalid params: "+e.join(";")}]}return e.get(o.EditorAndPluginInfo).setEditorAndPluginInfo(r.editorInfo,r.editorPluginInfo),r.editorConfiguration&&(0,c.applySettingsToConfiguration)(e,r.editorConfiguration),r.networkProxy&&(0,c.applyNetworkProxyConfiguration)(e,r.networkProxy),(0,s.initializeLateDependencies)(e),["OK",null]}},66885:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(892),i=r(86236),o=r(9321),s=r(5381),a=n.Type.Object({options:n.Type.Optional(n.Type.Object({}))}),c=(new i.default).compile(n.Type.Strict(a));t.default=async function(e,t,r){if(!c(r)){const e=(0,s.extractAjvErrors)(c.errors);return[null,{code:s.ErrorCode.InvalidParams,message:"Invalid params: "+e.join(";")}]}const n=e.get(o.AuthManager).getPendingSignIn();if(void 0===n)return[null,{code:s.ErrorCode.InvalidRequest,message:"No pending sign in"}];let i;try{return i=await n,[i,null]}catch(e){return[null,{code:s.ErrorCode.DeviceFlowFailed,message:e.toString()}]}finally{e.get(o.AuthManager).setPendingSignIn(void 0)}}},31451:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(892),i=r(86236),o=r(53406),s=r(9321),a=r(5381),c=n.Type.Object({options:n.Type.Optional(n.Type.Object({}))}),l=(new i.default).compile(n.Type.Strict(c));t.default=async function(e,t,r){if(!l(r)){const e=(0,a.extractAjvErrors)(l.errors);return[null,{code:a.ErrorCode.InvalidParams,message:"Invalid params: "+e.join(";")}]}const n=await e.get(s.AuthManager).checkAndUpdateStatus(e);if("OK"===n.status)return[{status:"AlreadySignedIn",user:n.user},null];const i=await e.get(o.GitHubDeviceFlow).getToken(e),c=i.waitForAuth.then((async t=>(await e.get(s.AuthManager).setAuthRecord(t),await e.get(s.AuthManager).checkAndUpdateStatus(e))));return e.get(s.AuthManager).setPendingSignIn(c),[{status:"PromptUserDeviceFlow",userCode:i.user_code,verificationUri:i.verification_uri,expiresIn:i.expires_in,interval:i.interval},null]}},96656:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(892),i=r(86236),o=r(9321),s=r(5381),a=n.Type.Object({options:n.Type.Optional(n.Type.Object({}))}),c=(new i.default).compile(n.Type.Strict(a));t.default=async function(e,t,r){if(!c(r)){const e=(0,s.extractAjvErrors)(c.errors);return[null,{code:s.ErrorCode.InvalidParams,message:"Invalid params: "+e.join(";")}]}return await e.get(o.AuthManager).deleteAuthRecord(),[await e.get(o.AuthManager).checkAndUpdateStatus(e),null]}},31620:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.telemetryExceptionMethod=void 0;const n=r(892),i=r(86236),o=r(65489),s=r(5381),a=n.Type.Object({origin:n.Type.String(),stacktrace:n.Type.Optional(n.Type.String()),properties:n.Type.Optional(n.Type.Record(n.Type.String(),n.Type.String()))}),c=(new i.default).compile(n.Type.Strict(a));t.telemetryExceptionMethod=async function(e,t,r){if(!c(r)){const e=(0,s.extractAjvErrors)(c.errors);return[null,{code:s.ErrorCode.InvalidParams,message:"Invalid params: "+e.join(";")}]}const n=new Error("Original stacktrace: "+r.stacktrace);n.stack="";const i=r.properties||{};return await(0,o.telemetryException)(e,n,r.origin,i),["OK",null]}},72530:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(892),i=r(86236),o=r(9321),s=r(5381),a=r(91728),c=r(6159),l=n.Type.Object({testingCtx:n.Type.Number(),options:n.Type.Optional(n.Type.Object({}))}),u=(new i.default).compile(n.Type.Strict(l));t.default=async function(e,t,r){if(!u(r)){const e=(0,s.extractAjvErrors)(u.errors);return[null,{code:s.ErrorCode.InvalidParams,message:"Invalid params: "+e.join(";")}]}return(0,c.getTestingContext)(r.testingCtx).forceSet(o.AuthManager,new a.AlwaysAuthManager),["OK",null]}},8269:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(892),i=r(86236),o=r(5381),s=r(6159),a=n.Type.Object({options:n.Type.Optional(n.Type.Object({}))}),c=(new i.default).compile(n.Type.Strict(a));t.default=async function(e,t,r){if(!c(r)){const e=(0,o.extractAjvErrors)(c.errors);return[null,{code:o.ErrorCode.InvalidParams,message:"Invalid params: "+e.join(";")}]}return[(0,s.newTestingContext)(e),null]}},73609:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(892),i=r(86236),o=r(16630),s=r(70819),a=r(5381),c=n.Type.Object({uri:n.Type.String()}),l=(new i.default).compile(n.Type.Strict(c));t.default=async function(e,t,r){if(!l(r)){const e=(0,a.extractAjvErrors)(l.errors);return[null,{code:a.ErrorCode.InvalidParams,message:"Invalid params: "+e.join(";")}]}const n=e.get(s.TextDocumentManager),i=await n.getTextDocument(o.URI.parse(r.uri));return[{uri:r.uri,languageId:i?.languageId??"unknown",version:i?.version??-1,text:i?.getText()??""},null]}},86584:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(892),i=r(86236),o=r(9321),s=r(5381),a=r(91728),c=r(6159),l=n.Type.Object({testingCtx:n.Type.Number(),options:n.Type.Optional(n.Type.Object({}))}),u=(new i.default).compile(n.Type.Strict(l));t.default=async function(e,t,r){if(!u(r)){const e=(0,s.extractAjvErrors)(u.errors);return[null,{code:s.ErrorCode.InvalidParams,message:"Invalid params: "+e.join(";")}]}return(0,c.getTestingContext)(r.testingCtx).forceSet(o.AuthManager,new a.NotAuthManager),["OK",null]}},22930:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompletionDocuments=void 0;const n=r(892),i=r(86236),o=r(5381),s=r(6159),a=n.Type.Object({testingCtx:n.Type.Number(),documents:n.Type.Array(n.Type.String()),options:n.Type.Optional(n.Type.Object({}))}),c=(new i.default).compile(n.Type.Strict(a));class l{constructor(e){this.documents=e}}t.CompletionDocuments=l,t.default=async function(e,t,r){if(!c(r)){const e=(0,o.extractAjvErrors)(c.errors);return[null,{code:o.ErrorCode.InvalidParams,message:"Invalid params: "+e.join(";")}]}return(0,s.getTestingContext)(r.testingCtx).forceSet(l,new l(r.documents)),["OK",null]}},8730:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PanelCompletionDocuments=void 0;const n=r(892),i=r(86236),o=r(5381),s=r(6159),a=n.Type.Object({text:n.Type.String(),score:n.Type.Number()}),c=n.Type.Object({testingCtx:n.Type.Number(),documents:n.Type.Array(a),options:n.Type.Optional(n.Type.Object({}))}),l=(new i.default).compile(n.Type.Strict(c));class u{constructor(e){this.documents=e}}t.PanelCompletionDocuments=u,t.default=async function(e,t,r){if(!l(r)){const e=(0,o.extractAjvErrors)(l.errors);return[null,{code:o.ErrorCode.InvalidParams,message:"Invalid params: "+e.join(";")}]}return(0,s.getTestingContext)(r.testingCtx).forceSet(u,new u(r.documents)),["OK",null]}},82043:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(892),i=r(86236),o=r(5798),s=r(57214),a=r(5381),c=n.Type.Object({}),l=(new i.default).compile(n.Type.Strict(c));t.default=async function(e,t,r){if(!l(r)){const e=(0,a.extractAjvErrors)(l.errors);return[null,{code:a.ErrorCode.InvalidParams,message:"Invalid params: "+e.join(";")}]}const n=e.get(s.AgentNotificationSender),i=e.get(o.LogTarget);return await n.showWarningMessage("This is a test message",{title:"Some Action"}).catch((e=>c(o.LogLevel.ERROR,"error sending show message request",e))).then((e=>c(o.LogLevel.INFO,"response from message request",e.title))),["OK",null];async function c(t,r,n){return i.logIt(e,t,r+" ("+n+")",n)}}},22229:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FakeAuthManager=void 0;const n=r(892),i=r(86236),o=r(45922),s=r(9321),a=r(5381),c=r(6159),l=n.Type.Object({testingCtx:n.Type.Number(),options:n.Type.Optional(n.Type.Object({}))}),u=(new i.default).compile(n.Type.Strict(l));class d extends s.AuthManager{constructor(e){super(void 0,(t=>e)),this.tokenManager=e,this.user="user"}getCopilotTokenManager(){return this.tokenManager}async checkAndUpdateStatus(e,t){const r=await this.tokenManager.checkCopilotToken(e);return"status"in r?{status:"OK",user:this.user}:{status:"HTTP401"===r.reason?"NotSignedIn":r.reason,user:this.user}}}t.FakeAuthManager=d,t.default=async function(e,t,r){if(!u(r)){const e=(0,a.extractAjvErrors)(u.errors);return[null,{code:a.ErrorCode.InvalidParams,message:"Invalid params: "+e.join(";")}]}const n=(0,o.getTestingCopilotTokenManager)();return(0,c.getTestingContext)(r.testingCtx).forceSet(s.AuthManager,new d(n)),["OK",null]}},56056:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestingOptions=void 0;const n=r(892);t.TestingOptions=n.Type.Object({testingCtx:n.Type.Optional(n.Type.Number())})},90623:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleVerifyCertificate=void 0;const n=r(892),i=r(86236),o=r(22037),s=r(15291),a=r(72406),c=r(5381),l=n.Type.Object({expectedCertificate:n.Type.String()}),u=(new i.default).compile(n.Type.Strict(l));t.handleVerifyCertificate=async function(e,t,r){if(!u(r)){const e=(0,c.extractAjvErrors)(u.errors);return[null,{code:c.ErrorCode.InvalidParams,message:"Invalid params: "+e.join(";")}]}const n=(0,s.getRootCertificateReader)(e),i=(await n.getAllRootCAs()).map(a.normalizeNewlines),l=(0,a.normalizeNewlines)(r.expectedCertificate);return i.includes(l)?[{status:!0,message:"Certificate verified"},null]:[{status:!1,message:`expected certificate not found - Expected to find certificate ${(0,a.asReadableCert)(l)}. Only found those installed on the system:${o.EOL}${i.map((e=>"- "+(0,a.asReadableCert)(e))).join(o.EOL)}`},null]}},98127:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleVerifyWorkspaceState=t.handleVerifyState=void 0;const n=r(892),i=r(86236),o=r(16630),s=r(70819),a=r(5381),c=r(10540),l=n.Type.Object({source:n.Type.String(),languageId:n.Type.String(),version:n.Type.Number(),uri:n.Type.String()}),u=(new i.default).compile(n.Type.Strict(l));t.handleVerifyState=async function(e,t,r){if(!u(r)){const e=(0,a.extractAjvErrors)(u.errors);return[null,{code:a.ErrorCode.InvalidParams,message:"Invalid params: "+e.join(";")}]}const n=e.get(s.TextDocumentManager),i=await n.getTextDocument(o.URI.parse(r.uri));return i?i.languageId!==r.languageId?[{status:!1,message:`Language id mismatch: [State] ${i.languageId} !== [Request] ${r.languageId}`},null]: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: "${o.URI.parse(r.uri)}" (given by the editor: "${r.uri}")`},null]},t.handleVerifyWorkspaceState=async function(e,t,r){return[e.get(c.AgentTextDocumentManager).workspaceFolders,null]}},57214:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectionNotificationSender=t.AgentNotificationSender=void 0;const n=r(69035),i=r(87426);class o extends n.NotificationSender{}t.AgentNotificationSender=o,t.ConnectionNotificationSender=class extends o{constructor(e){super(),this.ctx=e,this.connection=this.ctx.get(i.WrappedConnection).conn}sendNotification(e,t){this.connection.sendNotification(e,t)}showWarningMessage(e,...t){return this.connection.window.showWarningMessage(e,...t)}}},40585:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.makeXdgPersistenceManager=t.PersistenceManager=void 0;const n=r(57147),i=r(22037),o=r(77282);class s{constructor(e){this.directory=e}async read(e,t){const r=`${this.directory}/${e}.json`;try{const e=await n.promises.readFile(r,{encoding:"utf8"});return JSON.parse(e)[t]}catch(e){return}}async update(e,t,r){await n.promises.mkdir(this.directory,{recursive:!0,mode:448});const i=`${this.directory}/${e}.json`;let o={};try{const e=await n.promises.readFile(i,{encoding:"utf8"});o=JSON.parse(e)}catch(e){}o[t]=r,await n.promises.writeFile(i,JSON.stringify(o)+"\n",{encoding:"utf8"})}async delete(e,t){const r=`${this.directory}/${e}.json`;try{const e=await n.promises.readFile(r,{encoding:"utf8"}),i=JSON.parse(e);delete i[t],await n.promises.writeFile(r,JSON.stringify(i)+"\n",{encoding:"utf8"})}catch(e){}}}t.PersistenceManager=s,t.makeXdgPersistenceManager=function(){return new s(o.env.XDG_CONFIG_HOME?o.env.XDG_CONFIG_HOME+"/github-copilot":"win32"===(0,i.platform)()?o.env.USERPROFILE+"\\AppData\\Local\\github-copilot":o.env.HOME+"/.config/github-copilot")}},5381:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.extractAjvErrors=t.ErrorCode=void 0,(r=t.ErrorCode||(t.ErrorCode={}))[r.ParseError=-32700]="ParseError",r[r.InvalidRequest=-32600]="InvalidRequest",r[r.MethodNotFound=-32601]="MethodNotFound",r[r.InvalidParams=-32602]="InvalidParams",r[r.InternalError=-32603]="InternalError",r[r.NoCopilotToken=1e3]="NoCopilotToken",r[r.DeviceFlowFailed=1001]="DeviceFlowFailed",r[r.ContextNotInitialized=1002]="ContextNotInitialized",t.extractAjvErrors=function(e){return e.map((e=>`${e.instancePath} ${e.message}`))}},32879:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CopilotService=void 0;const n=r(68212),i=r(16630),o=r(25225),s=r(5798),a=r(20913),c=r(87426),l=r(76974),u=r(65332),d=r(94340),p=r(5381),h=r(10540);t.CopilotService=class{constructor(e){this.ctx=e,this.wrappedConnection=e.get(c.WrappedConnection);const t=this.wrappedConnection.conn;this.initialized=!1;const r=new s.MultiLog([this.ctx.get(s.LogTarget),new l.NotificationLogger((0,a.isDebugEnabled)(this.ctx))]);this.ctx.forceSet(s.LogTarget,r),new s.Logger(s.LogLevel.DEBUG,"agent").debug(this.ctx,"Agent service starting"),t.onRequest(this.messageHandler.bind(this)),t.onNotification(this.notificationHandler.bind(this));const u=e.get(h.AgentTextDocumentManager);t.onInitialize((async e=>{const t=e.capabilities.workspace?.workspaceFolders??!1;return u.init(e.workspaceFolders?.map((e=>i.URI.parse(e.uri)))??[],!(0,a.isRunningInTest)(this.ctx)&&t),(0,o.registerDocumentTracker)(this.ctx),this.initialized=!0,{capabilities:{textDocumentSync:{openClose:!0,change:n.TextDocumentSyncKind.Incremental},workspace:{workspaceFolders:{supported:t,changeNotifications:t}}}}})),t.onDidChangeConfiguration((async e=>{(0,d.notifyChangeConfiguration)(this.ctx,e)}))}async messageHandler(e,t,r){const i=this.ctx.get(u.MethodHandlers).handlers.get(e);if(!i)return new n.ResponseError(p.ErrorCode.MethodNotFound,`Method not found: ${e}`);if(!this.initialized)return new n.ResponseError(p.ErrorCode.ContextNotInitialized,"Agent service not initialized.");Array.isArray(t)&&(t=t[0]);const[o,s]=await i(this.ctx,r,t);return s?new n.ResponseError(s.code,s.message,s.data):o}async notificationHandler(e,t){const r=this.ctx.get(u.NotificationHandlers).handlers.get(e);r&&(Array.isArray(t)&&(t=t[0]),await r(this.ctx,t))}listen(){this.wrappedConnection.listen()}dispose(){this.wrappedConnection.conn.dispose()}}},65120:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.agentEditorSession=void 0;const n=r(6113),i=r(22037),o=r(7057),s=r(39800),a=new Set(["00:00:00:00:00:00","ff:ff:ff:ff:ff:ff","ac:de:48:00:11:22"]);function c(e){const t=e.replace(/-/g,":").toLowerCase();return!a.has(t)}let l;const u=o.v4()+Date.now();t.agentEditorSession=new s.EditorSession(u,function(){if(!l){const e=function(){try{const e=function(){const e=(0,i.networkInterfaces)();for(const t in e){const r=e[t];if(r)for(const{mac:e}of r)if(c(e))return e}throw new Error("Unable to retrieve mac address (unexpected format)")}();return n.createHash("sha256").update(e,"utf8").digest("hex")}catch(e){return}}();l=e||o.v4()}return l}())},91728:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AlwaysAuthManager=t.NotAuthManager=void 0;const n=r(35765),i=r(9321);class o extends i.AuthManager{constructor(){super(null,(()=>null))}async checkAndUpdateStatus(e,t){return{status:"NotSignedIn"}}}t.NotAuthManager=o;class s extends i.AuthManager{constructor(){super(null,(()=>null))}async checkAndUpdateStatus(e,t){return{status:"OK",user:"user"}}getCopilotTokenManager(){return new n.FixedCopilotTokenManager("tid=valid-copilot-token")}}t.AlwaysAuthManager=s},7838:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseChallengeDoc=void 0,t.parseChallengeDoc=function(e,t){const r=e.split("\n");let n=t,i=t,o=r[t.line];const s=o.indexOf("%");-1!==s&&(o=o.substring(0,s)+o.substring(s+1),n={line:t.line,character:s});const a=o.indexOf("^");if(-1!==a){const e=o.indexOf("^",a+1);if(-1===e)throw new Error("Challenge document must contain zero or two ^ characters.");o=o.substring(0,a)+o.substring(a+1,e)+o.substring(e+1),n={line:t.line,character:t.character},i={line:t.line,character:t.character+e-a-1}}return{cursorLine:o,lines:r,start:n,end:i}}},6159:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createAgentTestingContext=t.TestAgentEditorInfo=t.TestTextDocumentManager=t.getTestingContext=t.newTestingContext=void 0;const n=r(44617),i=r(39800),o=r(75611),s=r(69035),a=r(4630),c=r(52369),l=r(70819),u=r(3895),d=r(53007),p=r(76021),h=r(42401),f=r(87426),g=r(39824),m=r(65332),y=r(57214),v=r(56238),_=new Map;let b=0;t.newTestingContext=function(e){const t=b,r=new o.Context(e);return _.set(t,r),b++,t},t.getTestingContext=function(e){const t=_.get(e);if(void 0===t)throw new Error(`Testing context ${e} not found`);return t};class w extends l.TextDocumentManager{constructor(){super(...arguments),this._textDocuments=[],this.onDidFocusTextDocument=()=>({dispose:()=>{}}),this.onDidChangeTextDocument=()=>({dispose:()=>{}}),this.onDidChangeCursor=()=>({dispose:()=>{}})}get textDocuments(){return this._textDocuments}async getTextDocument(e){return this.textDocuments.find((t=>t.uri.toString()==e.toString()))}async getRelativePath(e){}setTextDocument(e,t,r){const n=this._textDocuments.find((t=>t.uri.toString()==e.toString()));n?n.update([{text:r}],n.version+1):this._textDocuments.push(new h.AgentTextDocument(e,t,0,r))}findNotebook(e){}}t.TestTextDocumentManager=w;class C extends u.AgentEditorInfo{constructor(){super(...arguments),this.inner=new u.AgentEditorInfo}clear(){this.inner=new u.AgentEditorInfo}setEditorAndPluginInfo(e,t){this.inner.setEditorAndPluginInfo(e,t)}getEditorInfo(e){return this.inner.getEditorInfo(e)}getEditorPluginInfo(e){return this.inner.getEditorPluginInfo(e)}}t.TestAgentEditorInfo=C,t.createAgentTestingContext=function(){const e=(0,a._createBaselineContext)(new u.AgentConfigProvider),t=function(){const e=new C;return e.setEditorAndPluginInfo({name:"agent-tests",version:"0"},{name:"agent-tests",version:"0"}),e}();e.set(i.EditorAndPluginInfo,t),e.set(u.AgentEditorInfo,t),e.set(C,t),e.set(c.LocationFactory,new h.AgentLocationFactory);const r=new w;e.set(l.TextDocumentManager,r),e.set(w,r),e.set(n.FileSystem,p.agentFileSystem);const o=new g.FakeWrappedConnection;e.set(f.WrappedConnection,o),e.set(g.FakeWrappedConnection,o);const _=new v.TestAgentNotificationSender;return e.forceSet(s.NotificationSender,_),e.set(y.AgentNotificationSender,_),e.set(v.TestAgentNotificationSender,_),e.set(d.CopilotCompletionCache,new d.CopilotCompletionCache),e.set(m.MethodHandlers,(0,m.getAllMethods)()),e}},56238:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestAgentNotificationSender=void 0;const n=r(57214);class i extends n.AgentNotificationSender{constructor(){super(),this.sentNotifications=[],this.sentMessages=[]}sendNotification(e,t){this.sentNotifications.push(t)}showWarningMessage(e,...t){return this.sentMessages.push(e),t?Promise.resolve(t[0]):Promise.resolve(void 0)}}t.TestAgentNotificationSender=i},42401:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AgentTextDocument=t.getTextDocumentChecked=t.AgentLocationFactory=void 0;const n=r(96813),i=r(91674),o=r(52369),s=r(70819);class a extends o.LocationFactory{range(e,t,r,n){return void 0!==r&&void 0!==n?i.Range.create(e,t,r,n):i.Range.create(e,t)}position(e,t){return i.Position.create(e,t)}}t.AgentLocationFactory=a,t.getTextDocumentChecked=async function(e,t,r){if(r&&r.source&&r.languageId){const e=new c(t,r.languageId,0,r.source);return r.relativePath&&(e.relativePath=r.relativePath),e}const n=e.get(s.TextDocumentManager);return await n.getTextDocument(t).then((e=>{if(!e){const e=n.textDocuments.map((e=>e.uri)).join(", ");throw new Error(`Couldn't find document for uri: ${t}, known document uris are: ${e}`)}return new c(e.uri,e.languageId,e.version,e.getText())}))};class c{constructor(e,t,r,i){this._uri=e,this._textDocument=n.TextDocument.create(e.toString(),t,r,i)}get uri(){return this._uri}get fileName(){return this._uri.fsPath}get languageId(){return this._textDocument.languageId}get version(){return this._textDocument.version}get lineCount(){return this._textDocument.lineCount}get relativePath(){return this._relativePath}set relativePath(e){this._relativePath=e}getText(e){return this._textDocument.getText(e)}positionAt(e){return this._textDocument.positionAt(e)}offsetAt(e){return this._textDocument.offsetAt(e)}lineAt(e){const t="number"==typeof e?e:e.line,r=this.getText().split("\n")[t],n=i.Range.create(i.Position.create(t,0),i.Position.create(t,r.length)),o=0===r.trim().length;return{text:r,range:n,isEmptyOrWhitespace:o}}getWordRangeAtPosition(e){}update(e,t){n.TextDocument.update(this._textDocument,e,t)}}t.AgentTextDocument=c},10540:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AgentTextDocumentManager=void 0;const n=r(82361),i=r(71017),o=r(35809),s=r(16630),a=r(20190),c=r(70819),l=r(87426),u=r(42401);class d{constructor(e){this.ctx=e,this.emitter=new n}create(e,t,r,n){const i=new u.AgentTextDocument(s.URI.parse(e),t,r,n);return(0,a.primeLanguageDetectionCache)(this.ctx,i),i}update(e,t,r){const n=[];for(const r of t)if(o.TextDocumentContentChangeEvent.isIncremental(r)){const t={range:r.range,rangeOffset:e.offsetAt(r.range.start),rangeLength:e.offsetAt(r.range.end)-e.offsetAt(r.range.start),text:r.text};n.push(t)}const i={document:e,contentChanges:n};return this.emitter.emit("change",i),e.update(t,r),e}}class p extends c.TextDocumentManager{constructor(e){super(),this.ctx=e,this.connection=this.ctx.get(l.WrappedConnection).conn,this.workspaceFolders=[],this.onDidChangeTextDocument=(e,t,r)=>{const n=e.bind(t);return this._textDocumentConfiguration.emitter.on("change",n),{dispose:()=>{this._textDocumentConfiguration.emitter.removeListener("change",n)}}},this.onDidFocusTextDocument=(e,t,r)=>(this.connection.onNotification("textDocument/didFocus",(r=>{const n=s.URI.parse(r.uri);e.call(t,{document:{uri:n}})})),{dispose:()=>{}}),this.onDidChangeCursor=(e,t,r)=>({dispose:()=>{}}),this._textDocumentConfiguration=new d(e),this._textDocumentListener=new o.TextDocuments(this._textDocumentConfiguration),this._textDocumentListener.listen(this.connection),this.connection.onNotification("vs/didAddWorkspaceFolder",(e=>this.registerWorkspaceFolder(e))),this.connection.onNotification("vs/didRemoveWorkspaceFolder",(e=>this.unregisterWorkspaceFolder(e)))}init(e,t){this.workspaceFolders.length=0,this.workspaceFolders.push(...e),t&&this.connection.workspace.onDidChangeWorkspaceFolders((e=>{e.added.forEach((e=>this.registerWorkspaceFolder(e))),e.removed.forEach((e=>this.unregisterWorkspaceFolder(e)))}))}unregisterWorkspaceFolder(e){const t=this.workspaceFolders.findIndex((t=>t.toString()===s.URI.parse(e.uri).toString()));t>=0&&this.workspaceFolders.splice(t,1)}registerWorkspaceFolder(e){this.workspaceFolders.push(s.URI.parse(e.uri))}get textDocuments(){return this._textDocumentListener.all()}async getTextDocument(e){return this._textDocumentListener.all().find((t=>t.uri.toString()==e.toString()))}async getRelativePath(e){const t=e;return t.relativePath?t.relativePath:(0,c.getRelativePath)(this.workspaceFolders??[],e.fileName)??i.basename(e.fileName)}findNotebook(e){}}t.AgentTextDocumentManager=p},35765:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.refreshToken=t.CopilotTokenManagerFromGitHubToken=t.FixedCopilotTokenManager=t.CopilotTokenManager=t.CopilotToken=t.authFromGitHubToken=t.nowSeconds=t.TOKEN_REFRESHED_EVENT=void 0;const n=r(82361),i=r(39800),o=r(70769),s=r(5798),a=r(20039),c=r(69035),l=r(65489),u=r(84567),d=r(40084),p=new s.Logger(s.LogLevel.INFO,"auth");let h=0;function f(){return Math.floor(Date.now()/1e3)}async function g(e,t){(0,l.telemetry)(e,"auth.new_login");const r=await async function(e,t){const r=t.devOverride?.copilotTokenUrl??"https://api.github.com/copilot_internal/v2/token";try{return await e.get(a.Fetcher).fetch(r,{headers:{Authorization:`token ${t.token}`,...(0,i.editorVersionHeaders)(e)}})}catch(t){throw e.get(o.UserErrorNotifier).notifyUser(e,t),t}}(e,t);if(!r)return p.info(e,"Failed to get copilot token"),(0,l.telemetryError)(e,"auth.request_failed"),{kind:"failure",reason:"FailedToGetToken"};const n=await r.json();if(!n)return p.info(e,"Failed to get copilot token"),(0,l.telemetryError)(e,"auth.request_read_failed"),{kind:"failure",reason:"FailedToGetToken"};if(y(e,n.user_notification,t),401===r.status)return p.info(e,"Failed to get copilot token due to 401 status"),(0,l.telemetryError)(e,"auth.unknown_401"),{kind:"failure",reason:"HTTP401"};if(!r.ok||!n.token){p.info(e,`Invalid copilot token: missing token: ${r.status} ${r.statusText}`),(0,l.telemetryError)(e,"auth.invalid_token",l.TelemetryData.createAndMarkAsIssued({status:r.status.toString(),status_text:r.statusText}));const i=n.error_details;return y(e,i,t),{kind:"failure",reason:"NotAuthorized",...i}}const s=n.expires_at;n.expires_at=f()+n.refresh_in+60;const{token:c,organization_list:u,...h}=n,g=new v(c,u);return e.get(d.CopilotTokenNotifier).emit("onCopilotToken",g,h),(0,l.telemetry)(e,"auth.new_token",l.TelemetryData.createAndMarkAsIssued({},{adjusted_expires_at:n.expires_at,expires_at:s,current_time:f()})),{kind:"success",...n}}t.TOKEN_REFRESHED_EVENT="token_refreshed",t.nowSeconds=f,t.authFromGitHubToken=g;const m=new Map;function y(e,t,r){if(!t)return;const n=f();m.get(t.message)||(m.set(t.message,n),e.get(c.NotificationSender).showWarningMessage(t.message,{title:t.title},{title:"Dismiss"}).catch((t=>{console.error(t),p.error(e,`Error while sending notification: ${t.message}`)})).then((async n=>{const o=n?.title===t.title,s=o||"Dismiss"===n?.title;if(o){const r=e.get(i.EditorAndPluginInfo).getEditorPluginInfo(e),n=t.url.replace("{EDITOR}",encodeURIComponent(r.name+"_"+r.version));await e.get(u.UrlOpener).open(n)}"notification_id"in t&&s&&await async function(e,t,r){const n=r.devOverride?.notificationUrl??"https://api.github.com/copilot_internal/notification",o=await e.get(a.Fetcher).fetch(n,{headers:{Authorization:`token ${r.token}`,...(0,i.editorVersionHeaders)(e)},method:"POST",body:JSON.stringify({notification_id:t})});o&&o.ok||p.error(e,`Failed to send notification result to GitHub: ${o?.status} ${o?.statusText}`)}(e,t.notification_id,r)})))}class v{constructor(e,t){this.token=e,this.organization_list=t,this.tokenMap=this.parseToken(e)}parseToken(e){const t=new Map,r=e?.split(":")[0],n=r?.split(";");for(const e of n){const[r,n]=e.split("=");t.set(r,n)}return t}getTokenValue(e){return this.tokenMap.get(e)}}t.CopilotToken=v;class _{constructor(){this.tokenRefreshEventEmitter=new n.EventEmitter}}function b(e,r,n){const i=f();h>0||(h++,setTimeout((async()=>{let n,o="";try{h--,await r.getCopilotToken(e,!0),n="success",r.tokenRefreshEventEmitter.emit(t.TOKEN_REFRESHED_EVENT)}catch(e){n="failure",o=e.toString()}const s=l.TelemetryData.createAndMarkAsIssued({result:n},{time_taken:f()-i,refresh_count:h});o&&(s.properties.reason=o),(0,l.telemetry)(e,"auth.token_refresh",s)}),1e3*n))}t.CopilotTokenManager=_,t.FixedCopilotTokenManager=class extends _{constructor(e){super(),this.token=e,this.wasReset=!1}async getGitHubToken(){return Promise.resolve("token")}async getCopilotToken(e,t){return new v(this.token)}resetCopilotToken(e,t){this.wasReset=!0}async checkCopilotToken(e){return{status:"OK"}}},t.CopilotTokenManagerFromGitHubToken=class extends _{constructor(e){super(),this.githubToken=e,this.copilotToken=void 0}async getGitHubToken(){return Promise.resolve(this.githubToken.token)}async getCopilotToken(e,t){if(!this.copilotToken||this.copilotToken.expires_at{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CopilotTokenNotifier=void 0;const n=r(82361);t.CopilotTokenNotifier=class extends n{constructor(){super()}emit(e,t,r){return super.emit(e,t,r)}}},25135:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChangeTracker=void 0;const n=r(70819);t.ChangeTracker=class{get offset(){return this._offset}constructor(e,t,r){this._referenceCount=0,this._isDisposed=!1,this._offset=r;const i=e.get(n.TextDocumentManager);this._tracker=i.onDidChangeTextDocument((async e=>{if(e.document.uri===t)for(const t of e.contentChanges)if(t.rangeOffset+t.rangeLength<=this.offset){const e=t.text.length-t.rangeLength;this._offset=this._offset+e}}))}push(e,t){if(this._isDisposed)throw new Error("Unable to push new actions to a disposed ChangeTracker");this._referenceCount++,setTimeout((()=>{e(),this._referenceCount--,0===this._referenceCount&&(this._tracker.dispose(),this._isDisposed=!0)}),t)}}},32137:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Clock=void 0,t.Clock=class{now(){return new Date}}},70140:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LRUCache=t.keyForPrompt=void 0;const n=r(76679);t.keyForPrompt=function(e){return(0,n.SHA256)(e.prefix+e.suffix).toString()},t.LRUCache=class{constructor(e=10){this.values=new Map,this.lruKeys=[],this.size=e}removeKeyFromLRU(e){const t=this.lruKeys.indexOf(e);-1!==t&&this.lruKeys.splice(t,1)}touchKeyInLRU(e){this.removeKeyFromLRU(e),this.lruKeys.push(e)}clear(){this.values.clear(),this.lruKeys=[]}deleteKey(e){this.removeKeyFromLRU(e),void 0!==this.values.get(e)&&this.values.delete(e)}get(e){if(this.values.has(e)){const t=this.values.get(e);return this.touchKeyInLRU(e),t}}put(e,t){let r=[];this.values.has(e)?r=[e]:this.lruKeys.length>=this.size&&(r=this.lruKeys.splice(0,1));for(const e of r)this.deleteKey(e);this.values.set(e,t),this.touchKeyInLRU(e)}}},83940:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debounce=t.Debouncer=void 0,t.Debouncer=class{async debounce(e){return this.state&&(clearTimeout(this.state.timer),this.state.reject(),this.state=void 0),new Promise(((t,r)=>{this.state={timer:setTimeout((()=>t()),e),reject:r}}))}},t.debounce=function(e,t){let r;return(...n)=>(r&&clearTimeout(r),new Promise((i=>{r=setTimeout((()=>{const e=t(...n);i(e)}),e)})))}},11661:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.asyncIterableFromArray=t.asyncIterableMapFilter=t.asyncIterableFilter=t.asyncIterableMap=void 0,t.asyncIterableMap=async function*(e,t){for await(const r of e)yield t(r)},t.asyncIterableFilter=async function*(e,t){for await(const r of e)await t(r)&&(yield r)},t.asyncIterableMapFilter=async function*(e,t){for await(const r of e){const e=await t(r);void 0!==e&&(yield e)}},t.asyncIterableFromArray=async function*(e){for(const t of e)yield t}},93927:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.logger=t.createProductionContext=void 0;const n=r(40084),i=r(32137),o=r(39800),s=r(75611),a=r(70769),c=r(16905),l=r(66046),u=r(96817),d=r(54619),p=r(63405),h=r(20190),f=r(5798),g=r(15291),m=r(57158),y=r(20039),v=r(52031),_=r(70216),b=r(65489),w=r(20913),C=r(84567);t.createProductionContext=function(e){const r=new s.Context;return r.set(o.ConfigProvider,e),r.set(i.Clock,new i.Clock),r.set(o.BuildInfo,new o.BuildInfo),function(e){e.set(w.RuntimeMode,w.RuntimeMode.fromEnvironment(!1)),e.set(f.LogVerbose,new f.LogVerbose((0,w.isVerboseLoggingEnabled)(e))),e.set(f.LogTarget,new f.ConsoleLog(console))}(r),t.logger.debug(r,"Initializing main context"),r.set(n.CopilotTokenNotifier,new n.CopilotTokenNotifier),r.set(g.RootCertificateReader,(0,g.getRootCertificateReader)(r)),r.set(y.Fetcher,new m.HelixFetcher(r)),r.set(d.GhostTextDebounceManager,new d.GhostTextDebounceManager),r.set(h.LanguageDetection,(0,h.getLanguageDetection)()),r.set(c.Features,new c.Features(r)),r.set(_.PostInsertionNotifier,new _.PostInsertionNotifier),r.set(b.TelemetryUserConfig,new b.TelemetryUserConfig(r)),r.set(b.TelemetryEndpointUrl,new b.TelemetryEndpointUrl),r.set(b.TelemetryReporters,new b.TelemetryReporters),r.set(p.HeaderContributors,new p.HeaderContributors),r.set(a.UserErrorNotifier,new a.UserErrorNotifier),r.set(u.ContextualFilterManager,new u.ContextualFilterManager),r.set(v.OpenAIFetcher,new v.LiveOpenAIFetcher),r.set(o.BlockModeConfig,new o.ConfigBlockModeConfig),r.set(C.UrlOpener,new C.RealUrlOpener),r.set(l.ExpConfigMaker,new l.ExpConfigNone),r},t.logger=new f.Logger(f.LogLevel.DEBUG,"context")},39800:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.editorVersionHeaders=t.EditorAndPluginInfo=t.formatNameAndVersion=t.EditorSession=t.getVersion=t.getBuild=t.getBuildType=t.isProduction=t.BuildInfo=t.fimSuffixLengthThreshold=t.suffixMatchThreshold=t.suffixPercent=t.getEnabledConfig=t.getLanguageConfig=t.dumpConfig=t.getHiddenConfig=t.isDefaultSettingOverwritten=t.getConfig=t.getConfigDefaultForObjectKey=t.getConfigDefaultForKey=t.InMemoryConfigProvider=t.DefaultsOnlyConfigProvider=t.ConfigProvider=t.ConfigBlockModeConfig=t.BlockModeConfig=t.BuildType=t.shouldDoServerTrimming=t.shouldDoParsingTrimming=t.BlockMode=t.ConfigKey=void 0;const n=r(44617),i=r(68139),o=r(16905),s=r(99876);var a,c;t.ConfigKey={Enable:"enable",InlineSuggestEnable:"inlineSuggest.enable",ShowEditorCompletions:["editor","showEditorCompletions"],EnableAutoCompletions:["editor","enableAutoCompletions"],DelayCompletions:["editor","delayCompletions"],FilterCompletions:["editor","filterCompletions"],DisplayStyle:["advanced","displayStyle"],SecretKey:["advanced","secret_key"],SolutionLength:["advanced","length"],Stops:["advanced","stops"],Temperature:["advanced","temperature"],TopP:["advanced","top_p"],IndentationMode:["advanced","indentationMode"],InlineSuggestCount:["advanced","inlineSuggestCount"],ListCount:["advanced","listCount"],DebugOverrideProxyUrl:["advanced","debug.overrideProxyUrl"],DebugTestOverrideProxyUrl:["advanced","debug.testOverrideProxyUrl"],DebugOverrideEngine:["advanced","debug.overrideEngine"],DebugShowScores:["advanced","debug.showScores"],DebugOverrideLogLevels:["advanced","debug.overrideLogLevels"],DebugFilterLogCategories:["advanced","debug.filterLogCategories"],DebugUseSuffix:["advanced","debug.useSuffix"],DebugCodeQuote:["advanced","debug.codeQuote"]},function(e){e.Parsing="parsing",e.Server="server",e.ParsingAndServer="parsingandserver"}(a=t.BlockMode||(t.BlockMode={})),t.shouldDoParsingTrimming=function(e){return[a.Parsing,a.ParsingAndServer].includes(e)},t.shouldDoServerTrimming=function(e){return[a.Server,a.ParsingAndServer].includes(e)},(c=t.BuildType||(t.BuildType={})).DEV="dev",c.PROD="prod",c.NIGHTLY="nightly";class l{}function u(e,t){return e!==a.ParsingAndServer||(0,n.isSupportedLanguageId)(t)?e:a.Server}t.BlockModeConfig=l,t.ConfigBlockModeConfig=class extends l{async forLanguage(e,r){if(e.get(d).isDefaultSettingOverwritten(t.ConfigKey.IndentationMode))switch(e.get(d).getLanguageConfig(t.ConfigKey.IndentationMode,r)){case"client":case!0:case"server":return a.Server;case"clientandserver":return u(a.ParsingAndServer,r);default:return a.Parsing}const i=await e.get(o.Features).overrideBlockMode();return i?u(i,r):"ruby"==r?a.Parsing:(0,n.isSupportedLanguageId)(r)?a.ParsingAndServer:a.Server}};class d{}function p(e){try{const t=s.contributes.configuration[0].properties[`${i.CopilotConfigPrefix}.${e}`].default;if(void 0===t)throw new Error(`Missing config default value: ${i.CopilotConfigPrefix}.${e}`);return t}catch(t){throw new Error(`Error inspecting config default value ${i.CopilotConfigPrefix}.${e}: ${t}`)}}function h(e,t){try{const r=s.contributes.configuration[0].properties[`${i.CopilotConfigPrefix}.${e}`].properties[t].default;if(void 0===r)throw new Error(`Missing config default value: ${i.CopilotConfigPrefix}.${e}`);return r}catch(r){throw new Error(`Error inspecting config default value ${i.CopilotConfigPrefix}.${e}.${t}: ${r}`)}}function f(e,t){return e.get(d).getConfig(t)}function g(e,t){return e.get(d).isDefaultSettingOverwritten(t)}function m(e,t,r){return g(e,t)?f(e,t):r.default}function y(e,t,r){return e.get(d).getLanguageConfig(t,r)}t.ConfigProvider=d,t.DefaultsOnlyConfigProvider=class extends d{getConfig(e){return Array.isArray(e)?h(e[0],e[1]):p(e)}isDefaultSettingOverwritten(e){return!1}dumpConfig(){return{}}getLanguageConfig(e,t){const r=this.getConfig(e);return t&&t in r?r[t]:r["*"]}},t.InMemoryConfigProvider=class{constructor(e,t){this.baseConfigProvider=e,this.overrides=t}getConfig(e){const t=this.overrides.get(e);return void 0!==t?t:this.baseConfigProvider.getConfig(e)}setConfig(e,t){void 0!==t?this.overrides.set(e,t):this.overrides.delete(e)}setLanguageEnablement(e,r){this.overrides.set(t.ConfigKey.Enable,{[e]:r})}isDefaultSettingOverwritten(e){return!!this.overrides.has(e)||this.baseConfigProvider.isDefaultSettingOverwritten(e)}keyAsString(e){return Array.isArray(e)?e.join("."):e}dumpConfig(){const e=this.baseConfigProvider.dumpConfig();return this.overrides.forEach(((t,r)=>{e[this.keyAsString(r)]=JSON.stringify(t)})),e}getLanguageConfig(e,t){const r=this.overrides.get(e);return void 0!==r?void 0!==t?r[t]:r["*"]:this.baseConfigProvider.getLanguageConfig(e,t)}},t.getConfigDefaultForKey=p,t.getConfigDefaultForObjectKey=h,t.getConfig=f,t.isDefaultSettingOverwritten=g,t.getHiddenConfig=m,t.dumpConfig=function(e){return e.get(d).dumpConfig()},t.getLanguageConfig=y,t.getEnabledConfig=function(e,r){return y(e,t.ConfigKey.Enable,r)},t.suffixPercent=async function(e,r,n,i,s){return m(e,t.ConfigKey.DebugUseSuffix,{default:!1})?15:e.get(o.Features).suffixPercent(r,n,i,s)},t.suffixMatchThreshold=async function(e,r,n,i,s){return m(e,t.ConfigKey.DebugUseSuffix,{default:!1})?10:e.get(o.Features).suffixMatchThreshold(r,n,i,s)},t.fimSuffixLengthThreshold=async function(e,r,n,i,s){return m(e,t.ConfigKey.DebugUseSuffix,{default:!1})?0:e.get(o.Features).fimSuffixLengthThreshold(r,n,i,s)};class v{constructor(){this.packageJson=s}isProduction(){return"dev"!=this.getBuildType()}getBuildType(){return this.packageJson.buildType}getVersion(){return this.packageJson.version}getBuild(){return this.packageJson.build}getName(){return this.packageJson.name}}function _({name:e,version:t}){return`${e}/${t}`}t.BuildInfo=v,t.isProduction=function(e){return e.get(v).isProduction()},t.getBuildType=function(e){return e.get(v).getBuildType()},t.getBuild=function(e){return e.get(v).getBuild()},t.getVersion=function(e){return e.get(v).getVersion()},t.EditorSession=class{constructor(e,t){this.sessionId=e,this.machineId=t}},t.formatNameAndVersion=_;class b{}t.EditorAndPluginInfo=b,t.editorVersionHeaders=function(e){const t=e.get(b);return{"Editor-Version":_(t.getEditorInfo(e)),"Editor-Plugin-Version":_(t.getEditorPluginInfo(e))}}},68139:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CopilotScheme=t.CopilotConfigPrefix=void 0,t.CopilotConfigPrefix="github.copilot",t.CopilotScheme="copilot"},75611:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Context=void 0,t.Context=class{constructor(e){this.baseContext=e,this.constructionStack=[],this.instances=new Map;const t=(new Error).stack?.split("\n");t&&this.constructionStack.push(...t.slice(1))}get(e){const t=this.tryGet(e);if(t)return t;throw new Error(`No instance of ${e.name} has been registered.\n${this}`)}tryGet(e){return this.instances.get(e)||(this.baseContext?this.baseContext.tryGet(e):void 0)}set(e,t){if(this.tryGet(e))throw new Error(`An instance of ${e.name} has already been registered. Use forceSet() if you're sure it's a good idea.`);this.instances.set(e,t)}forceSet(e,t){this.instances.set(e,t)}toString(){let e=" Context created at:\n";for(const t of this.constructionStack||[])e+=` ${t}\n`;return e+=this.baseContext?.toString()??"",e}get debug(){const e={};for(const[t,r]of this.instances)e[t.name]=r;return e}}},75680:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeLocation=t.encodeLocation=t.completionContextForDocument=t.CompletionContext=t.completionTypeToString=t.CompletionType=void 0;const n=r(16630),i=r(52369),o=r(68139);var s;!function(e){e[e.OPEN_COPILOT=2]="OPEN_COPILOT"}(s=t.CompletionType||(t.CompletionType={})),t.completionTypeToString=function(e){return e===s.OPEN_COPILOT?"open copilot":"unknown"};class a{constructor(e,t,r){this.prependToCompletion="",this.appendToCompletion="",this.indentation=null,this.completionType=s.OPEN_COPILOT,this.insertPosition=e.get(i.LocationFactory).position(t.line,t.character),this.completionType=r}static fromJSONParse(e,t){const r=e.get(i.LocationFactory).position(t.insertPosition.line,t.insertPosition.character),n=new a(e,r,t.completionType);return n.prependToCompletion=t.prependToCompletion,n.appendToCompletion=t.appendToCompletion,n.indentation=t.indentation,n}}t.CompletionContext=a,t.completionContextForDocument=function(e,t,r){let n=r;const i=t.lineAt(r.line);return i.isEmptyOrWhitespace||(n=i.range.end),new a(e,n,s.OPEN_COPILOT)};let c=0;t.encodeLocation=function(e,t){const r=e.toString().split("#"),i=r.length>1?r[1]:"",s=JSON.stringify([r[0],t,i]);return n.URI.parse(`${o.CopilotScheme}:GitHub%20Copilot?${s}#${c++}`)},t.decodeLocation=function(e,t){const[r,i,o]=JSON.parse(t.query);return[n.URI.parse(o.length>0?r+"#"+o:r),a.fromJSONParse(e,i)]}},36317:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.launchSolutions=t.normalizeCompletionText=void 0;const n=r(7057),i=r(11661),o=r(39800),s=r(75680),a=r(5798),c=r(47553),l=r(598),u=r(86635),d=r(47917),p=r(24090),h=r(2273),f=r(3591),g=r(3883),m=r(65489),y=r(52369),v=new a.Logger(a.LogLevel.INFO,"solutions");function _(e,t,r,n){return async n=>(0,d.isBlockBodyFinished)(e,t,r,n)}async function b(e,t,r){if(t.isCancellationRequested)return e.removeProgress(),{status:"FinishedWithError",error:"Cancelled"};const n=await r.next();return!0===n.done?(e.removeProgress(),{status:"FinishedNormally"}):{status:"Solution",solution:n.value,next:b(e,t,r)}}t.normalizeCompletionText=function(e){return e.replace(/\s+/g,"")},t.launchSolutions=async function(e,t){const r=t.completionContext.insertPosition,a=t.completionContext.prependToCompletion,w=t.completionContext.indentation,C=e.get(y.LocationFactory),E=await t.getDocument(),T=await(0,p.extractPrompt)(e,E,r);if("contextTooShort"===T.type)return t.reportCancelled(),{status:"FinishedWithError",error:"Context too short"};const S=T.prompt,x=T.trailingWs;x.length>0&&(t.startPosition=C.position(t.startPosition.line,t.startPosition.character-x.length));const k=t.getCancellationToken(),I=n.v4();t.savedTelemetryData=m.TelemetryData.createAndMarkAsIssued({headerRequestId:I,languageId:E.languageId,source:(0,s.completionTypeToString)(t.completionContext.completionType)},{...(0,m.telemetrizePromptLength)(S),solutionCount:t.solutionCountTarget,promptEndPos:E.offsetAt(r)}),v.info(e,`prompt: ${JSON.stringify(S)}`),v.debug(e,`prependToCompletion: ${a}`),(0,m.telemetry)(e,"solution.requested",t.savedTelemetryData);const A=await e.get(o.BlockModeConfig).forLanguage(e,E.languageId),P=(0,h.isSupportedLanguageId)(E.languageId),R=(0,d.contextIndentation)(E,r),N={stream:!0,extra:{language:E.languageId,next_indent:R.next??0}};"parsing"!==A||P||(N.stop=["\n\n","\r\n\r\n"]);const O=(0,f.extractRepoInfoInBackground)(e,E.fileName),L={prompt:S,languageId:E.languageId,repoInfo:O,ourRequestId:I,engineUrl:await(0,c.getEngineURL)(e,(0,f.tryGetGitHubNWO)(O),E.languageId,(0,f.getDogFood)(O),await(0,f.getUserKind)(e),t.savedTelemetryData),count:t.solutionCountTarget,uiKind:l.CopilotUiKind.Panel,postOptions:N,requestLogProbs:!0};let D;switch(t.completionContext.completionType,A){case o.BlockMode.Server:D=async e=>{},N.extra.force_indent=R.prev??-1,N.extra.trim_by_indentation=!0;break;case o.BlockMode.ParsingAndServer:D=P?_(e,E,t.startPosition):async e=>{},N.extra.force_indent=R.prev??-1,N.extra.trim_by_indentation=!0;break;case o.BlockMode.Parsing:default:D=P?_(e,E,t.startPosition):async e=>{}}e.get(u.StatusReporter).setProgress();const M=await e.get(l.OpenAIFetcher).fetchAndStreamCompletions(e,L,m.TelemetryData.createAndMarkAsIssued(),D,k);if("failed"===M.type||"canceled"===M.type)return t.reportCancelled(),e.get(u.StatusReporter).removeProgress(),{status:"FinishedWithError",error:`${M.type}: ${M.reason}`};let B=M.choices;B=async function*(e,t){for await(const r of e){const e={...r};e.completionText=t+e.completionText.trimRight(),yield e}}(B,a),null!==w&&(B=(0,l.cleanupIndentChoices)(B,w)),B=(0,i.asyncIterableMapFilter)(B,(async t=>(0,g.postProcessChoice)(e,"solution",E,r,t,!1,v)));const F=(0,i.asyncIterableMapFilter)(B,(async n=>{let i=n.completionText;if(v.info(e,`Open Copilot completion: [${n.completionText}]`),t.completionContext.completionType===s.CompletionType.OPEN_COPILOT){let t="";const o=await(0,d.getNodeStart)(e,E,r,n.completionText);if(o)[t]=(0,p.trimLastLine)(E.getText(C.range(C.position(o.line,o.character),r)));else{const e=C.position(r.line,0);t=E.getText(C.range(e,r))}i=t+i}let o=n.completionText;x.length>0&&o.startsWith(x)&&(o=o.substring(x.length));const c=n.meanLogProb,l=void 0!==c?Math.exp(c):0,u=(await t.getDocument()).version;return{displayText:i,meanProb:l,meanLogProb:c||0,completionText:o,requestId:n.requestId,choiceIndex:n.choiceIndex,prependToCompletion:a,docVersion:u}}));return b(e.get(u.StatusReporter),k,F[Symbol.asyncIterator]())}},30446:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerDefaultHandlers=void 0;const n=r(20039),i=r(65489);t.registerDefaultHandlers=function(e,t){process.addListener("uncaughtException",(t=>{console.error("uncaughtException",t),i.telemetryException(e,t,"uncaughtException")}));let r=!1;process.addListener("unhandledRejection",((o,s)=>{if(r)return;if(r=!0,"vscode"===t&&!o)return;if("aborted"===o.type||(0,n.isAbortError)(o))return;if("vscode"===t&&["ENOTFOUND","ECONNREFUSED","ECONNRESET","ETIMEDOUT","ENETDOWN","ENETUNREACH","EADDRNOTAVAIL"].includes(o.code))return;if("ENOENT"==o.code)return;let a="";try{a=`${o.message} (${o.code})`,a=JSON.stringify(o)}catch(e){a="[actual reason JSON was cyclic]"}"{}"!==a&&(console.error("unhandledRejection",a),i.telemetryError(e,"unhandledRejection",i.TelemetryData.createAndMarkAsIssued({origin:"unhandledRejection",reason:"Unhandled rejection logged to restricted telemetry"}),!1),i.telemetryError(e,"unhandledRejection",i.TelemetryData.createAndMarkAsIssued({origin:"unhandledRejection",reason:a}),!0),r=!1)}))}},25225:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerCursorTracker=t.cursorHistoryStack=t.registerDocumentTracker=t.sortByAccessTimes=t.accessTimes=void 0;const n=r(70819);t.accessTimes=new Map,t.sortByAccessTimes=function(e){return[...e].sort(((e,r)=>{const n=t.accessTimes.get(e.uri.toString())??0;return(t.accessTimes.get(r.uri.toString())??0)-n}))},t.registerDocumentTracker=e=>e.get(n.TextDocumentManager).onDidFocusTextDocument((e=>{e&&t.accessTimes.set(e.document.uri.toString(),Date.now())})),t.cursorHistoryStack=[],t.registerCursorTracker=e=>e.get(n.TextDocumentManager).onDidChangeCursor((e=>{e&&e.selections.length>0&&e.selections[0].active.line==e.selections[0].anchor.line&&e.selections[0].active.character==e.selections[0].anchor.character&&(t.cursorHistoryStack.push({uri:e.textEditor.document.uri.toString(),offset:e.textEditor.document.offsetAt(e.selections[0].active),timestamp:Date.now()}),t.cursorHistoryStack.length>1e3&&t.cursorHistoryStack.shift())}))},70769:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UserErrorNotifier=void 0;const n=r(5798),i=r(69035),o=r(84567),s=["UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_SIGNATURE_FAILURE"];t.UserErrorNotifier=class{constructor(){this.notifiedErrorCodes=[]}async notifyUser(e,t){s.includes(t.code)&&!this.didNotifyBefore(t.code)&&(this.displayCertificateErrorNotification(e,t),this.notifiedErrorCodes.push(t.code))}displayCertificateErrorNotification(e,t){const r="https://aka.ms/copilot-ssc",i="Your current Copilot license doesn't support proxy connections with self-signed certificates.";new n.Logger(n.LogLevel.ERROR,"certificates").error(e,`${i} Please visit ${r} to learn more. Original cause: ${JSON.stringify(t)}`),this.showCertificateWarningMessage(e,i,r)}showCertificateWarningMessage(e,t,r){const n={title:"Learn more"};e.get(i.NotificationSender).showWarningMessage(t,n).then((t=>{t?.title===n.title&&e.get(o.UrlOpener).open(r)}))}didNotifyBefore(e){return-1!==this.notifiedErrorCodes.indexOf(e)}}},75917:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExpConfig=t.ExpTreatmentVariables=void 0;const n=r(65489),i=r(74914);var o;(o=t.ExpTreatmentVariables||(t.ExpTreatmentVariables={})).AA="copilotaa",o.CustomEngine="copilotcustomengine",o.Fetcher="copilotfetcher",o.OverrideBlockMode="copilotoverrideblockmode",o.OverrideNumGhostCompletions="copilotoverridednumghostcompletions",o.SuffixPercent="CopilotSuffixPercent",o.BeforeRequestWaitMs="copilotlms",o.NeighboringTabsOption="copilotneighboringtabs",o.NeighboringSnippetTypes="copilotneighboringsnippettypes",o.DebounceMs="copilotdebouncems",o.DebouncePredict="copilotdebouncepredict",o.ContextualFilterEnable="copilotcontextualfilterenable",o.ContextualFilterEnableTree="copilotcontextualfilterenabletree",o.ContextualFilterAcceptThreshold="copilotcontextualfilteracceptthreshold",o.ContextualFilterExplorationTraffic="copilotcontextualfilterexplorationtraffic",o.disableLogProb="copilotdisablelogprob",o.RepetitionFilterMode="copilotrepetitionfiltermode",o.DropCompletionReasons="copilotdropcompletionreasons",o.GranularityTimePeriodSizeInH="copilottimeperiodsizeinh",o.GranularityByCallBuckets="copilotbycallbuckets",o.SuffixStartMode="copilotsuffixstartmode",o.SuffixMatchThreshold="copilotsuffixmatchthreshold",o.FimSuffixLengthThreshold="copilotfimsuffixlenthreshold",o.MultiLogitBias="copilotlbeot",o.TokenizerName="copilottokenizername",o.IndentationMinLength="copilotindentationminlength",o.IndentationMaxLength="copilotindentationmaxlength",o.OpenFileStrategy="openfilestrategy",o.CursorHistoryStrategy="cursorhistorystrategy",o.MostRecent="mostrecent",o.MostCount="mostcount",o.BeforeCurrentFile="beforecurrentfile";class s{constructor(e,t,r){this.variables=e,this.assignmentContext=t,this.features=r}static createFallbackConfig(e,t){return(0,n.telemetryExpProblem)(e,{reason:t}),this.createEmptyConfig()}static createEmptyConfig(){return new s({},"","")}addToTelemetry(e){e.properties[i.ExpServiceTelemetryNames.featuresTelemetryPropertyName]=this.features,e.properties[i.ExpServiceTelemetryNames.assignmentContextTelemetryPropertyName]=this.assignmentContext}}t.ExpConfig=s},16905:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Features=t.Task=void 0;const n=r(44617),i=r(32137),o=r(70140),s=r(39800),a=r(80187),c=r(29975),l=r(54604),u=r(75917),d=r(66046),p=r(22249),h=r(68495);class f{constructor(e){this.ctx=e,this.cache=new o.LRUCache(200)}async fetchExpConfig(e){let t=this.cache.get(e.stringify());return t||(t=new g((()=>this.ctx.get(d.ExpConfigMaker).fetchExperiments(this.ctx,e.toHeaders())),36e5),this.cache.put(e.stringify(),t)),t.run()}getCachedExpConfig(e){return this.cache.get(e.stringify())?.value()}}class g{constructor(e,t=1/0){this.producer=e,this.expirationMs=t}async run(){return void 0===this.promise&&(this.promise=this.producer(),this.storeResult(this.promise).then((()=>{this.expirationMs<1/0&&void 0!==this.promise&&setTimeout((()=>this.promise=void 0),this.expirationMs)}))),this.promise}async storeResult(e){try{this.result=await e}finally{void 0===this.result&&(this.promise=void 0)}}value(){return this.result}}t.Task=g;class m{constructor(e){this.ctx=e,this.staticFilters={},this.dynamicFilters={},this.upcomingDynamicFilters={},this.assignments=new f(this.ctx),this.granularityDirectory=new h.GranularityDirectory("unspecified",e.get(i.Clock))}setPrefix(e){this.granularityDirectory=new h.GranularityDirectory(e,this.ctx.get(i.Clock))}registerStaticFilters(e){Object.assign(this.staticFilters,e)}registerDynamicFilter(e,t){this.dynamicFilters[e]=t}getDynamicFilterValues(){const e={};for(const[t,r]of Object.entries(this.dynamicFilters))e[t]=r();return e}registerUpcomingDynamicFilter(e,t){this.upcomingDynamicFilters[e]=t}async getAssignment(e,t={},r){const n=this.makeFilterSettings(t),i=this.granularityDirectory.extendFilters(n),o=await this.getExpConfig(i.newFilterSettings);this.granularityDirectory.update(n,+(o.variables[u.ExpTreatmentVariables.GranularityByCallBuckets]??NaN),+(o.variables[u.ExpTreatmentVariables.GranularityTimePeriodSizeInH]??NaN));const s=this.granularityDirectory.extendFilters(n),a=s.newFilterSettings,c=await this.getExpConfig(a);let l=new Promise((e=>setTimeout(e,m.upcomingDynamicFilterCheckDelayMs)));for(const e of s.otherFilterSettingsToPrefetch)l=l.then((async()=>{await new Promise((e=>setTimeout(e,m.upcomingDynamicFilterCheckDelayMs))),this.getExpConfig(e)}));return this.prepareForUpcomingFilters(a),r&&(r.filtersAndExp={exp:c,filters:a}),c.variables[e]}makeFilterSettings(e){return new p.FilterSettings({...this.staticFilters,...this.getDynamicFilterValues(),...e})}async getExpConfig(e){try{return this.assignments.fetchExpConfig(e)}catch(e){return u.ExpConfig.createFallbackConfig(this.ctx,`Error fetching ExP config: ${e}`)}}async prepareForUpcomingFilters(e){if(!((new Date).getMinutes()<60-m.upcomingTimeBucketMinutes))for(const[t,r]of Object.entries(this.upcomingDynamicFilters))await new Promise((e=>setTimeout(e,m.upcomingDynamicFilterCheckDelayMs))),this.getExpConfig(e.withChange(t,r()))}stringify(){const e=this.assignments.getCachedExpConfig(new p.FilterSettings({}));return JSON.stringify(e?.variables??{})}async customEngine(e,t,r,n,i){const o={[p.Filter.CopilotRepository]:e,[p.Filter.CopilotFileType]:t,[p.Filter.CopilotDogfood]:r,[p.Filter.CopilotUserKind]:n};return await this.getAssignment(u.ExpTreatmentVariables.CustomEngine,o,i)??""}async beforeRequestWaitMs(e,t,r,n,i){const o={[p.Filter.CopilotRepository]:e,[p.Filter.CopilotFileType]:t,[p.Filter.CopilotUserKind]:r,[p.Filter.CopilotDogfood]:n};return await this.getAssignment(u.ExpTreatmentVariables.BeforeRequestWaitMs,o,i)??0}async multiLogitBias(e,t,r,n,i){const o={[p.Filter.CopilotRepository]:e,[p.Filter.CopilotFileType]:t,[p.Filter.CopilotUserKind]:r,[p.Filter.CopilotDogfood]:n};return await this.getAssignment(u.ExpTreatmentVariables.MultiLogitBias,o,i)??!1}async debounceMs(){return await this.getAssignment(u.ExpTreatmentVariables.DebounceMs)??0}async debouncePredict(){return await this.getAssignment(u.ExpTreatmentVariables.DebouncePredict)??!1}async contextualFilterEnable(){return await this.getAssignment(u.ExpTreatmentVariables.ContextualFilterEnable)??!0}async contextualFilterEnableTree(){return await this.getAssignment(u.ExpTreatmentVariables.ContextualFilterEnableTree)??!0}async contextualFilterAcceptThreshold(){return await this.getAssignment(u.ExpTreatmentVariables.ContextualFilterAcceptThreshold)??a.contextualFilterAcceptThreshold}async contextualFilterExplorationTraffic(){return await this.getAssignment(u.ExpTreatmentVariables.ContextualFilterExplorationTraffic)??a.contextualFilterExplorationTraffic}async disableLogProb(){return await this.getAssignment(u.ExpTreatmentVariables.disableLogProb)??!0}async indentationMinLength(e,t,r,n){const i={[p.Filter.CopilotRepository]:e,[p.Filter.CopilotFileType]:t,[p.Filter.CopilotDogfood]:r,[p.Filter.CopilotUserKind]:n};return await this.getAssignment(u.ExpTreatmentVariables.IndentationMinLength,i)??void 0}async indentationMaxLength(e,t,r,n){const i={[p.Filter.CopilotRepository]:e,[p.Filter.CopilotFileType]:t,[p.Filter.CopilotDogfood]:r,[p.Filter.CopilotUserKind]:n};return await this.getAssignment(u.ExpTreatmentVariables.IndentationMaxLength,i)??void 0}async overrideBlockMode(){return await this.getAssignment(u.ExpTreatmentVariables.OverrideBlockMode)}async overrideNumGhostCompletions(){return await this.getAssignment(u.ExpTreatmentVariables.OverrideNumGhostCompletions)}async suffixPercent(e,t,r,n){const i={[p.Filter.CopilotRepository]:e,[p.Filter.CopilotFileType]:t,[p.Filter.CopilotUserKind]:r,[p.Filter.CopilotDogfood]:n};return(0,s.getConfig)(this.ctx,s.ConfigKey.DebugOverrideEngine)?0:await this.getAssignment(u.ExpTreatmentVariables.SuffixPercent,i)??15}async suffixMatchThreshold(e,t,r,n){const i={[p.Filter.CopilotRepository]:e,[p.Filter.CopilotFileType]:t,[p.Filter.CopilotUserKind]:r,[p.Filter.CopilotDogfood]:n};return await this.getAssignment(u.ExpTreatmentVariables.SuffixMatchThreshold,i)??10}async fimSuffixLengthThreshold(e,t,r,n){const i={[p.Filter.CopilotRepository]:e,[p.Filter.CopilotFileType]:t,[p.Filter.CopilotUserKind]:r,[p.Filter.CopilotDogfood]:n};return await this.getAssignment(u.ExpTreatmentVariables.FimSuffixLengthThreshold,i)??0}async suffixStartMode(e,t,r,i){const o={[p.Filter.CopilotRepository]:e,[p.Filter.CopilotFileType]:t,[p.Filter.CopilotUserKind]:r,[p.Filter.CopilotDogfood]:i};switch(await this.getAssignment(u.ExpTreatmentVariables.SuffixStartMode,o)){case"cursor":return n.SuffixStartMode.Cursor;case"cursortrimstart":default:return n.SuffixStartMode.CursorTrimStart;case"siblingblock":return n.SuffixStartMode.SiblingBlock;case"siblingblocktrimstart":return n.SuffixStartMode.SiblingBlockTrimStart}}async tokenizerName(e,t){const r={[p.Filter.CopilotRepository]:e,[p.Filter.CopilotUserKind]:t};switch(await this.getAssignment(u.ExpTreatmentVariables.TokenizerName,r)){case"cushman001":return n.TokenizerName.cushman001;case"cushman002":default:return n.TokenizerName.cushman002;case"mock":return n.TokenizerName.mock}}async neighboringTabsOption(e,t,r,i){const o={[p.Filter.CopilotRepository]:e,[p.Filter.CopilotFileType]:t,[p.Filter.CopilotUserKind]:r,[p.Filter.CopilotDogfood]:i};switch(await this.getAssignment(u.ExpTreatmentVariables.NeighboringTabsOption,o)){case"none":return n.NeighboringTabsOption.None;case"conservative":return n.NeighboringTabsOption.Conservative;case"medium":return n.NeighboringTabsOption.Medium;case"eager":default:return n.NeighboringTabsOption.Eager;case"eagerbutlittle":return n.NeighboringTabsOption.EagerButLittle;case"eagerbutmedium":return n.NeighboringTabsOption.EagerButMedium}}async neighboringSnippetTypes(e,t,r,i){const o={[p.Filter.CopilotRepository]:e,[p.Filter.CopilotFileType]:t,[p.Filter.CopilotUserKind]:r,[p.Filter.CopilotDogfood]:i};return"function"===await this.getAssignment(u.ExpTreatmentVariables.NeighboringSnippetTypes,o)?n.NeighboringSnippetType.NeighboringFunctions:n.NeighboringSnippetType.NeighboringSnippets}async repetitionFilterMode(){switch(await this.getAssignment(u.ExpTreatmentVariables.RepetitionFilterMode)){case"proxy":return l.RepetitionFilterMode.PROXY;case"both":return l.RepetitionFilterMode.BOTH;default:return l.RepetitionFilterMode.CLIENT}}async dropCompletionReasons(){const e=await this.getAssignment(u.ExpTreatmentVariables.DropCompletionReasons);if(e)return e.split(",")}async openFileStrategy(e,t,r){const n={[p.Filter.CopilotRepository]:e,[p.Filter.CopilotUserKind]:t,[p.Filter.CopilotFileType]:r};return await this.getAssignment(u.ExpTreatmentVariables.OpenFileStrategy,n)??!0}async cursorHistoryStrategy(e,t,r){const n={[p.Filter.CopilotRepository]:e,[p.Filter.CopilotUserKind]:t,[p.Filter.CopilotFileType]:r};switch(await this.getAssignment(u.ExpTreatmentVariables.CursorHistoryStrategy,n)){case"mostrecent":return c.CursorHistoryStrategy.MostRecent;case"mostcount":return c.CursorHistoryStrategy.MostCount;case"beforecurrentfile":return c.CursorHistoryStrategy.BeforeCurrentFile;default:return c.CursorHistoryStrategy.None}}async addExpAndFilterToTelemetry(e){const t=this.makeFilterSettings({});e.filtersAndExp={filters:t,exp:await this.getExpConfig(t)}}}t.Features=m,m.upcomingDynamicFilterCheckDelayMs=20,m.upcomingTimeBucketMinutes=5+Math.floor(11*Math.random())},66046:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExpConfigNone=t.ExpConfigFromTAS=t.ExpConfigMaker=void 0;const n=r(20039),i=r(75917);class o{}t.ExpConfigMaker=o,t.ExpConfigFromTAS=class extends o{async fetchExperiments(e,t){const r=e.get(n.Fetcher);let o;try{o=await r.fetch("https://default.exp-tas.com/vscode/ab",{method:"GET",headers:t})}catch(t){return i.ExpConfig.createFallbackConfig(e,`Error fetching ExP config: ${t}`)}if(!o.ok)return i.ExpConfig.createFallbackConfig(e,`ExP responded with ${o.status}`);const s=await o.json(),a=s.Configs.find((e=>"vscode"===e.Id))??{Id:"vscode",Parameters:{}},c=Object.entries(a.Parameters).map((([e,t])=>e+(t?"":"cf")));return new i.ExpConfig(a.Parameters,s.AssignmentContext,c.join(";"))}},t.ExpConfigNone=class extends o{async fetchExperiments(e,t){return i.ExpConfig.createEmptyConfig()}}},22249:(e,t)=>{"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.FilterSettings=t.telmetryNames=t.TargetPopulation=t.Filter=void 0,function(e){e.Market="X-MSEdge-Market",e.CorpNet="X-FD-Corpnet",e.ApplicationVersion="X-VSCode-AppVersion",e.Build="X-VSCode-Build",e.ClientId="X-MSEdge-ClientId",e.ExtensionName="X-VSCode-ExtensionName",e.ExtensionVersion="X-VSCode-ExtensionVersion",e.Language="X-VSCode-Language",e.TargetPopulation="X-VSCode-TargetPopulation",e.CopilotClientTimeBucket="X-Copilot-ClientTimeBucket",e.CopilotOverrideEngine="X-Copilot-OverrideEngine",e.CopilotRepository="X-Copilot-Repository",e.CopilotFileType="X-Copilot-FileType",e.CopilotUserKind="X-Copilot-UserKind",e.CopilotDogfood="X-Copilot-Dogfood"}(r=t.Filter||(t.Filter={})),(n=t.TargetPopulation||(t.TargetPopulation={})).Team="team",n.Internal="internal",n.Insiders="insider",n.Public="public",t.telmetryNames={[r.CopilotClientTimeBucket]:"timeBucket",[r.CopilotOverrideEngine]:"engine",[r.CopilotRepository]:"repo",[r.CopilotFileType]:"fileType",[r.CopilotUserKind]:"userKind"};class i{constructor(e){this.filters=e;for(const[e,t]of Object.entries(this.filters))""===t&&delete this.filters[e]}extends(e){for(const[t,r]of Object.entries(e.filters))if(this.filters[t]!==r)return!1;return!0}addToTelemetry(e){for(const[r,n]of Object.entries(this.filters)){const i=t.telmetryNames[r];void 0!==i&&(e.properties[i]=n)}}stringify(){const e=Object.keys(this.filters);return e.sort(),e.map((e=>`${e}:${this.filters[e]}`)).join(";")}toHeaders(){return{...this.filters}}withChange(e,t){return new i({...this.filters,[e]:t})}}t.FilterSettings=i},68495:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GranularityDirectory=void 0;const n=r(22249),i=r(52505),o=n.Filter.CopilotClientTimeBucket;t.GranularityDirectory=class{constructor(e,t){this.specs=new Map,this.prefix=e,this.clock=t,this.defaultGranularity=(0,i.DEFAULT_GRANULARITY)(e)}selectGranularity(e){for(const[t,r]of this.specs.entries())if(e.extends(t))return r;return this.defaultGranularity}update(e,t,r){if(t=t>1?t:NaN,r=r>0?r:NaN,isNaN(t)&&isNaN(r))this.specs.delete(e);else{const n=new i.TimeBucketGranularity(this.prefix);isNaN(t)||n.setByCallBuckets(t),isNaN(r)||n.setTimePeriod(3600*r*1e3),this.specs.set(e,n)}}extendFilters(e){const t=this.selectGranularity(e),[r,n]=t.getCurrentAndUpComingValues(this.clock.now());return{newFilterSettings:e.withChange(o,r),otherFilterSettingsToPrefetch:n.map((t=>e.withChange(o,t)))}}}},52505:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimeBucketGranularity=t.DEFAULT_GRANULARITY=t.GranularityImplementation=void 0;class r{getCurrentAndUpComingValues(e){return[this.getValue(e),this.getUpcomingValues(e)]}constructor(e){this.prefix=e}}t.GranularityImplementation=r;class n extends r{getValue(e){return this.prefix}getUpcomingValues(e){return[]}}t.DEFAULT_GRANULARITY=e=>new n(e),t.TimeBucketGranularity=class extends r{constructor(e,t=.5,r=(new Date).setUTCHours(0,0,0,0)){super(e),this.prefix=e,this.fetchBeforeFactor=t,this.anchor=r}setTimePeriod(e){isNaN(e)?this.timePeriodLengthMs=void 0:this.timePeriodLengthMs=e}setByCallBuckets(e){isNaN(e)?this.numByCallBuckets=void 0:this.numByCallBuckets=e}getValue(e){return this.prefix+this.getTimePeriodBucketString(e)+(this.numByCallBuckets?this.timeHash(e):"")}getTimePeriodBucketString(e){return this.timePeriodLengthMs?this.dateToTimePartString(e):""}getUpcomingValues(e){const t=[],r=this.getUpcomingTimePeriodBucketStrings(e),n=this.getUpcomingByCallBucketStrings();for(const e of r)for(const r of n)t.push(this.prefix+e+r);return t}getUpcomingTimePeriodBucketStrings(e){if(void 0===this.timePeriodLengthMs)return[""];if((e.getTime()-this.anchor)%this.timePeriodLengthMse.toString()))}timeHash(e){return null==this.numByCallBuckets?0:e.getTime()%this.numByCallBuckets*7883%this.numByCallBuckets}dateToTimePartString(e){return null==this.timePeriodLengthMs?"":Math.floor((e.getTime()-this.anchor)/this.timePeriodLengthMs).toString()}}},74914:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.ExpServiceTelemetryNames=void 0,(r=t.ExpServiceTelemetryNames||(t.ExpServiceTelemetryNames={})).featuresTelemetryPropertyName="VSCode.ABExp.Features",r.assignmentContextTelemetryPropertyName="abexp.assignmentcontext"},96817:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contextualFilterScore=t.getLastLineLength=t.ContextualFilterManager=void 0;const n=r(80187),i=r(54725);class o{constructor(){this.previousLabel=0,this.previousLabelTimestamp=Date.now()-3600,this.probabilityAccept=0}}function s(e){const t=e.split("\n");return t[t.length-1].length}t.ContextualFilterManager=o,t.getLastLineLength=s,t.contextualFilterScore=function(e,t,r,a){const c=e.get(o),l=c.previousLabel;let u=0;"afterCursorWhitespace"in t.properties&&"true"===t.properties.afterCursorWhitespace&&(u=1);const d=(Date.now()-c.previousLabelTimestamp)/1e3,p=Math.log(1+d);let h=0,f=0;const g=r.prefix;if(g){h=Math.log(1+s(g));const e=g.slice(-1);void 0!==n.contextualFilterCharacterMap[e]&&(f=n.contextualFilterCharacterMap[e])}let m=0,y=0;const v=g.trimEnd();if(v){m=Math.log(1+s(v));const e=v.slice(-1);void 0!==n.contextualFilterCharacterMap[e]&&(y=n.contextualFilterCharacterMap[e])}let _=0;if("documentLength"in t.measurements){const e=t.measurements.documentLength;_=Math.log(1+e)}let b=0;if("promptEndPos"in t.measurements){const e=t.measurements.promptEndPos;b=Math.log(1+e)}let w=0;if("promptEndPos"in t.measurements&&"documentLength"in t.measurements){const e=t.measurements.documentLength;w=(t.measurements.promptEndPos+.5)/(1+e)}let C=0;void 0!==n.contextualFilterLanguageMap[t.properties.languageId]&&(C=n.contextualFilterLanguageMap[t.properties.languageId]);let E=0;if(a){const e=new Array(221).fill(0);e[0]=l,e[1]=u,e[2]=p,e[3]=h,e[4]=m,e[5]=_,e[6]=b,e[7]=w,e[8+C]=1,e[29+f]=1,e[125+y]=1,E=(0,i.treeScore)(e)[1]}else{let e=n.contextualFilterIntercept;e+=n.contextualFilterWeights[0]*l,e+=n.contextualFilterWeights[1]*u,e+=n.contextualFilterWeights[2]*p,e+=n.contextualFilterWeights[3]*h,e+=n.contextualFilterWeights[4]*m,e+=n.contextualFilterWeights[5]*_,e+=n.contextualFilterWeights[6]*b,e+=n.contextualFilterWeights[7]*w,e+=n.contextualFilterWeights[8+C],e+=n.contextualFilterWeights[29+f],e+=n.contextualFilterWeights[125+y],E=1/(1+Math.exp(-e))}return e.get(o).probabilityAccept=E,E}},80187:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contextualFilterCharacterMap=t.contextualFilterLanguageMap=t.contextualFilterWeights=t.contextualFilterIntercept=t.contextualFilterExplorationTraffic=t.contextualFilterAcceptThreshold=void 0,t.contextualFilterAcceptThreshold=35,t.contextualFilterExplorationTraffic=1,t.contextualFilterIntercept=-.3043572714994554,t.contextualFilterWeights=[.9978708359643611,.7001905605239328,-.1736749244124868,-.22994157947320112,.13406692641682572,-.007751370662011853,.0057783222035240715,.41910878254476003,-.1621657125711092,.13770814958908187,-.06036011308184006,-.07351180985800129,0,-.05584878151248109,.30618794079412015,-.1282197982598485,.10951859303997555,.1700461782788777,-.3346057842644757,.22497985923128136,0,-.44038101825774356,-.6540115939236782,.16595600081341702,.20733910722385135,-.1337033766105696,-.06923072125290894,-.05806684191976292,.3583334671633344,-.47357732824944315,.17810871365594377,.42268219963946685,0,0,-.16379620467004602,-.43893868831061167,0,.11570094006709251,.9326431262654882,-.9990110509203912,-.44125275652726503,-.15840786997162004,-.4600396256644451,-.018814811994044403,.09230944537175266,.025814790934742798,-1.0940162204190154,-.9407503631235489,-.9854303778694269,-1.1045822488262245,-1.1417299456573262,-1.5623704405345513,-.4157473855795939,-1.0244257735561713,-.7477401944601753,-1.1275109699068402,-.0714715633552533,-1.1408628006786907,-1.0409898655074672,-.2288889836518878,-.5469549893760344,-.181946611106845,.1264329316374918,0,0,.312206968554707,-.3656436392517924,.23655650686038968,.1014912419901576,0,.06287549221765308,0,0,.19027065218932154,-.8519502045974378,0,.23753599905971923,.2488809322489166,.019969251907983224,0,.06916505526229488,.29053356359188204,-.14484456555431657,.014768129429370188,-.15051464926341374,.07614835502776021,-.3317489901313935,0,0,.04921938684669103,-.28248576768353445,-.9708816204525345,-1.3560464522265527,.014165375212383239,-.23924166472544983,.10006595730248855,.09867233147279562,.32330430333220644,-.058625706114180595,.17149853105783947,.4436484054395367,.047189049576707255,.16832520944790552,.1117259900942179,-.35469010329927253,0,-.1528189124465582,-.3804848349564939,.07278077320753953,.13263786480064088,.22920682659292527,1.1512955314336537,0,.016939862282340023,.4242994650403408,.12759835577444986,-.5577261135825583,-.19764560943067672,-.4042102444736004,.12063461617733708,-.2933966817484834,.2715683893968593,0,-.7138548251238751,0,-.023066228703035277,0,-.06383043976746139,.09683723720709651,-.7337151424080791,0,-.27191370124625525,.2819781269656171,-.08711496549050252,.11048604909969338,-.0934849550450534,.0721001250772912,.2589126797890794,.6729582659532254,-.21921032738244908,-.21535277468651456,-.45474006124091354,-.05861820126419139,-.007875306207720204,-.056661261678809284,.17727881404222662,.23603713348534658,.17485861412377932,-.5737483768696752,-.38220029570342745,-.5202722985519168,-.37187947527657256,.47155277792990113,-.12077912346691123,.47825628981545326,.4736704404000214,-.1615218651546898,.18362447973513005,0,0,-.18183417425866824,0,0,-.2538532305733833,-.1303692690676528,-.4073577969188216,.04172985870928789,-.1704527388573901,0,0,.7536858953385828,-.44703159588787644,0,-.7246484085580873,-.21378128540782063,0,.037461090552656146,-.16205852364367032,-.10973952064404884,.017468043407647377,-.1288980387397392,0,0,0,-1.218692715379445,.05536949662193305,-.3763799844799116,-.1845001725624579,-.1615576298149558,0,-.15373262203249874,-.04603412604270418,0,-.3068149681460828,.09412352468269412,0,.09116543650609721,.06065865264082559,.05688267379386188,-.05873945477722306,0,.14532465133322153,.1870857769705463,.36304258043185555,.1411392422180405,.0630388629716367,0,-1.1170522012450395,.16133697772771127,.15908534390781448,-.23485453704002232,-.1419980841417892,.21909510179526218,.39948420260153766,.40802294284289187,.15403767653746853,0,.19764784115096676,.584914157527457,0,-.4573883817015294],t.contextualFilterLanguageMap={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},t.contextualFilterCharacterMap={" ":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}},54725:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.treeScore=void 0,t.treeScore=function(e){let t,r,n,i,o,s,a,c,l,u,d,p,h,f,g,m,y,v,_,b,w,C,E,T,S,x,k,I,A,P,R,N,O,L,D,M,B,F,j,U,$,q,H,V,z,K,W,G,Q,J,Y,X,Z,ee,te,re,ne,ie,oe,se,ae,ce,le,ue,de,pe,he,fe,ge,me,ye,ve,_e,be,we,Ce,Ee,Te,Se,xe,ke,Ie,Ae,Pe,Re,Ne,Oe,Le,De,Me,Be,Fe,je,Ue,$e,qe,He,Ve,ze,Ke;t=e[0]>1e-35?e[29]>1e-35?e[138]>1e-35?.49496579646815353:.47546580490346646:e[30]>1e-35?.4456371992737078:e[4]>3.238486181444842?e[135]>1e-35?.2645576817782658:e[46]>1e-35?.20251922126765812:.37359143313367105:e[7]>.9662372103242399?.44975631109230374:.4067133376207218:e[7]>.960816451500545?e[29]>1e-35?e[4]>1.7005986908310777?.4240336839258693:.35414085998710754:e[4]>3.238486181444842?.353882328354817:e[100]>1e-35?.48783079865293355:e[30]>1e-35?.419904106522537:.38599249795612806:e[4]>3.6242520361853052?e[29]>1e-35?e[7]>.5086748127709895?.37522628419389664:.3359393805000766:e[30]>1e-35?.3685210833144829:e[135]>1e-35?.22140958666091123:e[134]>1e-35?.38379851487275685:e[46]>1e-35?.1926283522107934:.3098162447812857:e[46]>1e-35?.22698331991181095:e[4]>1.4978661367769956?e[30]>1e-35?e[4]>2.138333059508028?.39709448374768985:.34711865383837703:e[134]>1e-35?.40608455346469957:e[135]>1e-35?.3084120164848763:e[48]>1e-35?.24193590696691425:e[51]>1e-35?.2087938690163009:e[4]>3.1984648276080736?.3529508564858481:.3698795818909763:.30210240039979064,r=e[0]>1e-35?e[2]>2.4414009612931857?e[2]>3.676220550121792?e[7]>.9246495578512688?.0570428673081833:.019779482100154476:e[7]>.9705672697050661?.1023948532887641:.06265430080550045:e[29]>1e-35?e[5]>4.658699722134796?e[2]>1.2424533248940002?.12784241430585772:.15126156743993927:e[8]>1e-35?e[2]>.8958797346140276?.10624230855386699:-.1699142543394302:.10290106276456985:e[5]>3.5694334999727624?.09368877801612557:.1552615744687782:e[2]>3.3842466058243152?e[4]>3.5694334999727624?e[29]>1e-35?e[7]>.7022798213723723?.02282408308012389:-.032610792718175546:-.04405498437523181:e[46]>1e-35?-.14475563528583885:e[7]>.9159108669154322?.02539215399728953:e[134]>1e-35?.04720629593220485:e[4]>1.8688348091416842?-.00150052748656963:-.04528409340753242:e[5]>3.5694334999727624?e[4]>3.6505739029280164?e[29]>1e-35?.050909089229765704:e[39]>1e-35?-.08747827386821926:e[46]>1e-35?-.11300671054986217:-.002669293928522137:e[46]>1e-35?-.07873653229849684:e[39]>1e-35?-.06389470798465265:e[2]>.8958797346140276?e[47]>1e-35?-.07102696386827136:e[4]>1.8688348091416842?.04567768852273886:.016429189359442275:.024223384872688037:e[7]>.9569480028661056?.12458720561596202:-.006224718391409129,n=e[29]>1e-35?e[2]>2.602003343538398?e[2]>4.166635176627655?e[7]>.8375851232899904?.027219239366992384:-.023288925509443156:e[7]>.5866799179067689?.05780689652787357:.019914206435185725:e[2]>1.2424533248940002?e[7]>.9246495578512688?.1091540005913688:.08430043254349175:e[6]>4.832297822126891?e[125]>1e-35?.029350728374412424:.1327178977041336:e[8]>1e-35?e[7]>.9793410316570949?-.10742256752042179:.10128035205992136:.08719230025231978:e[5]>3.772694874805912?e[39]>1e-35?-.07712063687837625:e[46]>1e-35?-.09987046122905541:e[2]>3.6242520361853052?e[134]>1e-35?.0549278412468898:e[155]>1e-35?.0628934857241284:e[47]>1e-35?-.14605662411148382:e[48]>1e-35?-.1460221669882455:.002073957868392086:e[2]>1e-35?e[47]>1e-35?-.0769198367034467:e[155]>1e-35?.0769122902449957:e[134]>1e-35?.06856131328753592:e[152]>1e-35?.07081107422282688:e[51]>1e-35?-.11095669360187602:e[91]>1e-35?-.08136006552659215:e[48]>1e-35?-.07180356044417698:e[18]>1e-35?-.029572927306223313:e[50]>1e-35?-.11419309779400831:.03331652781327257:.0015747823792064454:e[7]>.9662372103242399?.1203598683210537:.011240838199712565,i=e[0]>1e-35?e[2]>2.4414009612931857?e[1]>1e-35?e[2]>4.03420147928485?.03823654007072966:e[7]>.9033253454895247?.09329944316059466:.06705865009439997:e[134]>1e-35?.06865805795066232:e[30]>1e-35?.05189058132179502:e[217]>1e-35?.044913757044379055:-.05078929160105722:e[1]>1e-35?e[6]>5.161920636569023?e[2]>1.4978661367769956?.10652732380394028:.13307829460294332:e[7]>.985694415330804?.06936133858882627:.11090193559908544:e[30]>1e-35?.10406540623634791:.03985408831881549:e[1]>1e-35?e[2]>3.772694874805912?e[29]>1e-35?e[7]>.7316379010844482?.012897973304512032:-.028068579877067623:.024577017676752924:e[5]>3.417592293073651?e[22]>1e-35?-.023871063947594612:e[7]>.8255520169851381?.0513970804870914:e[153]>1e-35?.0032035784177419503:.038713568639820416:e[7]>.9527510849235538?.10975706910869304:-.009433959232316078:e[38]>1e-35?.05195298239886214:e[30]>1e-35?.02476336300816124:e[2]>2.524928003624769?e[217]>1e-35?.0135414448190362:e[135]>1e-35?-.14660288310803915:-.07298980826531443:e[135]>1e-35?-.11136111748165503:e[123]>1e-35?-.1489448617480049:e[46]>1e-35?-.0922792773195811:-.024587716086845016,o=e[0]>1e-35?e[2]>2.249904835165133?e[1]>1e-35?e[2]>3.540854293052788?e[3]>2.249904835165133?.0590142410559562:e[7]>.6376007852429183?.043799948513989724:-4018626768373957e-20:.0790082705503403:e[38]>1e-35?.06581244939148062:e[30]>1e-35?.04874874335011108:-.03908081910821116:e[3]>2.602003343538398?e[1]>1e-35?.0902076086329385:e[30]>1e-35?.10143876154366023:.021304615514737626:e[2]>1.4978661367769956?.10248710197602005:e[8]>1e-35?e[125]>1e-35?-.1652240484643952:.09695355914385996:.12574960258243387:e[1]>1e-35?e[2]>3.8815106545092593?e[3]>2.249904835165133?.030411053020370282:e[7]>.8375851232899904?.01347947217941036:-.02329004077119854:e[7]>.9480659774309611?e[22]>1e-35?-.021734552060979462:e[100]>1e-35?.12154672718218543:e[3]>1e-35?.0467045097539336:.07133232987671506:e[4]>2.012675845367575?e[4]>3.9219243190762363?.018631928508103857:.04026129961424531:-.0060403819170799225:e[38]>1e-35?.04740678443866351:e[30]>1e-35?.022411595432555845:e[2]>2.970085626360216?e[121]>1e-35?.016385457091892035:-.07115043890873148:e[4]>3.417592293073651?-.04057726754591634:e[29]>1e-35?-.10601923621749415:-.013474385705240824,s=e[3]>1e-35?e[3]>3.481121732133104?e[30]>1e-35?.03419190074885174:e[39]>1e-35?-.07596248521514803:e[142]>1e-35?-.09906305142951233:e[143]>1e-35?-.11544208927241095:e[134]>1e-35?.03231677158309109:e[217]>1e-35?.04584520241402839:-.014587374070287719:e[30]>1e-35?e[141]>1e-35?-.05022127515891476:e[6]>3.540854293052788?.046006786519929344:e[3]>2.3502401828962087?.03746852485580482:.11887634683908754:e[142]>1e-35?-.0715680845257123:e[134]>1e-35?.05310603374316432:e[39]>1e-35?-.05301061369502469:e[143]>1e-35?-.06806923450459589:e[21]>1e-35?-.054617004299251364:e[113]>1e-35?e[6]>3.795426061844291?.03901365322581413:.11833310693969545:e[141]>1e-35?-.039041289505442084:e[3]>3.0677824455408698?.010823236602311471:e[29]>1e-35?-.062100944449970996:e[58]>1e-35?-.04585181543113668:e[99]>1e-35?.053796582993543764:e[100]>1e-35?e[6]>3.676220550121792?.02800134029424525:.12622387863644666:e[98]>1e-35?.06289940430905602:.023655750883710656:e[138]>1e-35?.09902929683374195:e[6]>5.161920636569023?.07160940969782595:e[141]>1e-35?.11975693334861698:.03480602671098732,a=e[0]>1e-35?e[2]>2.4414009612931857?e[1]>1e-35?e[2]>4.600145018061341?.02024868069387139:e[2]>3.1984648276080736?.048682024362267456:.07158946327961134:e[134]>1e-35?.05360858064017479:e[30]>1e-35?.03969788038954029:e[39]>1e-35?-.1339275468398512:-.03340699462411555:e[1]>1e-35?e[2]>1.2424533248940002?.09338368602561321:e[5]>4.5379471377116305?.11818377094705468:.02406138301472482:e[30]>1e-35?.08786833398626331:.031294938606502315:e[1]>1e-35?e[2]>2.970085626360216?e[29]>1e-35?e[2]>4.923617305492666?-.0247806554659429:.00415615978158072:e[4]>2.138333059508028?e[4]>3.6505739029280164?-.0025888569756007704:.033556460788819964:-.011238496891848667:e[5]>3.5694334999727624?e[4]>2.012675845367575?e[2]>.8958797346140276?.03964701920383755:.024902380380505313:e[141]>1e-35?-.07221122170573789:.009221806859728395:e[2]>.8958797346140276?.09633850035166669:.007323280248710229:e[134]>1e-35?.038330704525669945:e[30]>1e-35?.01660549386778516:e[2]>2.524928003624769?e[217]>1e-35?.008967266036665084:e[29]>1e-35?-.12693911437262784:-.05779560753585583:e[29]>1e-35?-.0908743155940788:e[4]>3.314020688089767?-.030882471980034343:-.010429019903489632,c=e[0]>1e-35?e[2]>2.138333059508028?e[1]>1e-35?e[2]>3.4498615536424366?e[3]>2.249904835165133?.04956831432894648:e[2]>5.223051249395764?-.010305811579773205:.027491320728082233:.06656735137915168:e[38]>1e-35?.05309749470598965:e[30]>1e-35?.03843762763805799:-.030980078724697425:e[3]>1e-35?e[1]>1e-35?.08089335516186445:.04120452858949669:e[6]>4.832297822126891?e[2]>.8958797346140276?.10006865536846919:.11917243570572485:e[8]>1e-35?e[2]>.8958797346140276?.06704577104028654:-.1454046740476985:e[219]>1e-35?-.13678871665753098:.07859247859374968:e[1]>1e-35?e[2]>3.314020688089767?e[3]>2.249904835165133?.024623237775190106:e[2]>4.73179313355342?-.02080435685185878:.0026175118278487855:e[6]>3.417592293073651?e[22]>1e-35?-.025465692791530083:e[45]>1e-35?-.044807460105408044:e[8]>1e-35?.008766235663186964:.032712521408248645:e[3]>2.602003343538398?-.0056332432294706036:e[6]>2.524928003624769?.09592889105245415:-.013339150198983546:e[38]>1e-35?.03563564253379704:e[30]>1e-35?.014870517098142924:e[2]>2.970085626360216?-.054537994223319376:e[219]>1e-35?-.13242819761683536:e[39]>1e-35?-.0910629106840573:-.01970485337755703,l=e[0]>1e-35?e[2]>2.012675845367575?e[1]>1e-35?e[2]>3.4498615536424366?e[7]>.9246495578512688?.04812308497880073:e[29]>1e-35?.0005380021336956461:.03361690381564229:e[5]>3.5694334999727624?.05947219194425965:.11024468105183681:e[134]>1e-35?.04905351957215242:e[138]>1e-35?.05554447267811877:-.021863233324542066:e[29]>1e-35?e[5]>4.855921334140645?e[2]>.8958797346140276?.09590438270550732:.11498869480105023:.04093609484315685:.06588820186431316:e[1]>1e-35?e[2]>2.970085626360216?e[29]>1e-35?e[7]>.41763374498947375?.0043146758499583255:-.03443798345003191:e[58]>1e-35?-.08355523706358281:.017928058505534663:e[5]>3.5694334999727624?e[22]>1e-35?-.02209335592785362:e[2]>.8958797346140276?.03223396066919647:.0170789547385017:e[7]>.9546729796082215?e[2]>.8958797346140276?.09545837551902411:.008923660539643153:-.012322532316048181:e[134]>1e-35?.03182502017906531:e[138]>1e-35?e[29]>1e-35?-.06617589040350445:.040440282181288686:e[2]>2.802901033147999?-.043412758816960974:e[219]>1e-35?-.11700143817568372:e[48]>1e-35?-.11379636451926181:e[49]>1e-35?-.14202838670262277:e[39]>1e-35?-.08160450909782378:-.013448620144296253,u=e[1]>1e-35?e[2]>2.602003343538398?e[3]>2.249904835165133?e[4]>3.6505739029280164?.004170792297448336:.0368033867902024:e[7]>.8333442551332461?e[2]>4.677480030793064?.009136341105716223:.03568813371096505:e[7]>.22301866079069904?e[2]>5.1209788959100075?-.02365589472388456:.00919157417627931:-.0379399276194825:e[3]>1e-35?e[5]>3.5694334999727624?e[2]>.8958797346140276?e[22]>1e-35?-.019258819649469603:.03709105125649261:.016860660630369267:e[3]>2.602003343538398?-.00991261350028801:e[7]>.9626084674797213?.11517814309711256:-.009719045525281071:e[2]>1.2424533248940002?e[7]>.7316379010844482?.07097600019370685:.04586465946843457:e[6]>4.783307617946789?.09722756919612678:e[8]>1e-35?e[7]>.9793410316570949?-.11805054859481241:.07110946491407406:.05402719662002902:e[134]>1e-35?.03393227005537922:e[30]>1e-35?.023661319650909306:e[2]>2.970085626360216?e[121]>1e-35?.031049210793405797:e[135]>1e-35?-.10837216222444626:e[219]>1e-35?-.14640457784236915:-.03965818070110935:e[121]>1e-35?.039992710146502054:e[143]>1e-35?-.09311937611688731:e[46]>1e-35?-.07559392834101462:e[219]>1e-35?-.09895720087616466:e[135]>1e-35?-.07586062007425573:-.011775153504486295,d=e[1]>1e-35?e[3]>1e-35?e[141]>1e-35?-.03681630636575175:e[22]>1e-35?-.024594313135047084:e[7]>.9626084674797213?e[6]>3.676220550121792?.03355559026428929:e[3]>2.602003343538398?.012516956280523336:.1113827943542528:e[3]>2.3502401828962087?e[39]>1e-35?-.03483153469277968:e[29]>1e-35?-.06012725416594425:.03180949281577552:e[3]>1.2424533248940002?.007572391854701212:-.04833059473573461:e[7]>.5866799179067689?e[138]>1e-35?.084956566507563:e[7]>.9407436463973539?e[6]>5.161920636569023?.07174368742657447:e[7]>.9793410316570949?.024186357466630726:.07739671408330714:.048429456456843774:e[6]>5.078289090109146?e[138]>1e-35?.07555203090037793:.033181836695182196:-.02197298038836975:e[38]>1e-35?.031334580210504996:e[30]>1e-35?.021270582199851534:e[121]>1e-35?.0329970846397004:e[42]>1e-35?.04064092183581017:e[135]>1e-35?-.08440485061890712:e[219]>1e-35?-.10638369254266776:e[143]>1e-35?-.09755269717731242:e[144]>1e-35?-.1173397395002877:e[51]>1e-35?-.1288517354356988:e[49]>1e-35?-.13923283846721088:e[91]>1e-35?-.1224188861275682:e[3]>3.156774023138548?-.02477169567121223:-.006917307470148426,p=e[2]>2.802901033147999?e[7]>.9159108669154322?e[3]>3.314020688089767?-.0010700017432373199:e[2]>4.832297822126891?.009582861728698568:.029780100164495754:e[30]>1e-35?e[210]>1e-35?-.028942339056712313:.020599853201598167:e[3]>3.540854293052788?-.030156164189210577:e[2]>4.620046665062766?e[3]>1.8688348091416842?-.00103151911027294:e[217]>1e-35?.005930672148987754:-.03586108945255643:.004417350848115493:e[3]>1e-35?e[2]>.8958797346140276?e[5]>3.5694334999727624?e[3]>3.6242520361853052?e[30]>1e-35?.02388317653477103:-.0034021644637823034:e[125]>1e-35?-.059034648546006076:e[18]>1e-35?-.02514305472376584:e[46]>1e-35?-.05290744310611087:e[21]>1e-35?-.03750702516022783:e[39]>1e-35?-.031092446888446753:.028272541588979773:e[7]>.9676186228082213?e[3]>2.602003343538398?-.009169247394016047:.11347856526033356:-.00310251177264949:e[2]>1e-35?.00844340216096322:-.00894414829369423:e[2]>1.4978661367769956?e[7]>.6223082132708274?e[6]>3.0677824455408698?.04885293193722139:.10736598620828455:.026545392586289893:e[6]>4.938058177869999?e[2]>.8958797346140276?.07355143458077283:.09420954595651049:e[8]>1e-35?e[2]>.8958797346140276?.07966619891180966:-.10471235843714122:.04867207725748343,h=e[1]>1e-35?e[3]>1e-35?e[5]>3.5694334999727624?e[3]>2.249904835165133?e[22]>1e-35?-.0262424908256809:e[8]>1e-35?.001637419319408071:e[155]>1e-35?.053444838794586114:e[99]>1e-35?.05039717103923269:.02448689278350471:e[141]>1e-35?-.05723199469388615:.005411562031545046:e[7]>.9626084674797213?e[3]>2.602003343538398?.00980665121101267:.10420505846679201:-.001639851950872336:e[7]>.26911173821332884?e[138]>1e-35?.07591724033622518:e[7]>.9275861021112151?e[5]>5.173316863805991?.06276466446882598:e[194]>1e-35?-.1330802382498368:e[5]>3.156774023138548?e[8]>1e-35?-.027034262965141144:.03949417085855365:.08851962788853085:e[9]>1e-35?.05379608621573637:.032253635727649325:e[138]>1e-35?.058048925881989615:.005620237500451222:e[134]>1e-35?.02734220426041116:e[30]>1e-35?.017746745665275825:e[142]>1e-35?-.07814745820732061:e[143]>1e-35?-.08860968498533135:e[14]>1e-35?.01954819512523945:e[42]>1e-35?.03333354798081121:e[147]>1e-35?-.11642554317575503:e[49]>1e-35?-.12425086420883341:e[146]>1e-35?-.12996952774815626:e[3]>3.817651943129708?-.03275661606585881:-.014860694091417102,f=e[1]>1e-35?e[2]>2.524928003624769?e[3]>2.249904835165133?e[3]>3.725620842493839?-.000906155627647317:e[24]>1e-35?.0785324151067157:e[154]>1e-35?-.058309500036909157:.026762512119806844:e[7]>.26911173821332884?e[2]>4.505334588423558?-.010584135839537876:.013982545022862853:-.03208712711019827:e[3]>1e-35?e[2]>.8958797346140276?e[5]>3.5694334999727624?.026401003398891884:e[3]>2.602003343538398?-.008168418058515686:e[7]>.9662372103242399?.10626422692131453:-.01031637351522216:.010358942714602982:e[2]>1.2424533248940002?e[2]>2.012675845367575?.0312811686023135:.05423507965224627:e[6]>4.832297822126891?.08479742987484738:e[8]>1e-35?e[7]>.9793410316570949?-.09338070882722671:.058145805002919916:.04227449937397909:e[38]>1e-35?.025289091019879376:e[2]>3.1132683346437333?e[3]>.8958797346140276?e[46]>1e-35?-.09114331684757576:e[135]>1e-35?-.07948190608487016:e[48]>1e-35?-.12911151777601662:e[143]>1e-35?-.09735205976374478:-.017192402584465798:-.08661537827420282:e[217]>1e-35?.033425023239885124:e[14]>1e-35?.02729990952110066:e[48]>1e-35?-.09098188061865646:e[46]>1e-35?-.05848458618550134:e[91]>1e-35?-.10969774095556883:-.0068971807474334365,g=e[1]>1e-35?e[3]>1e-35?e[3]>1.2424533248940002?e[125]>1e-35?-.06150017523108556:e[39]>1e-35?-.03350257370473994:e[22]>1e-35?-.02193617429266551:e[8]>1e-35?7274245146620154e-20:e[6]>3.676220550121792?e[4]>2.3502401828962087?.026702786904914785:.00851181280021978:e[4]>2.673553765358735?.010358811529123666:e[6]>2.802901033147999?.08891517935366504:.023114323891227237:-.02875694375159779:e[4]>1.7005986908310777?e[138]>1e-35?.06720372648635974:e[6]>5.427147823217923?e[9]>1e-35?.0544777682515472:.037060547607205986:e[6]>1e-35?.022016394753027843:-.1559604133821172:e[6]>3.540854293052788?-.009372509268454739:-.24388295956457617:e[38]>1e-35?.023012278764368795:e[138]>1e-35?.03564423186175008:e[30]>1e-35?.008093643695090883:e[217]>1e-35?.028810461962454004:e[135]>1e-35?-.07120877224354143:e[46]>1e-35?-.06546454537408128:e[144]>1e-35?-.09534262423492412:e[143]>1e-35?-.0770344566882831:e[29]>1e-35?-.06285371287531509:e[14]>1e-35?.02073120300153793:e[123]>1e-35?-.09016320513643451:e[51]>1e-35?-.10496442920973255:e[3]>3.1132683346437333?-.019949599427836494:-.0019060085544902166,m=e[0]>1e-35?e[2]>1.8688348091416842?e[2]>3.1984648276080736?e[1]>1e-35?e[3]>2.249904835165133?.03174009468268253:e[2]>5.363634090365639?-.019608371322822362:.012560836552403976:-.006925466014569184:e[1]>1e-35?.047796055675515446:.014363935217773802:e[6]>5.391349638084432?e[2]>.8958797346140276?e[3]>1e-35?.05193425865217324:.07891754708034264:.09859506024630252:e[8]>1e-35?e[5]>4.424828703319957?.0288226384042998:-.09397342098461306:e[4]>.8958797346140276?.06181532763949055:e[3]>1e-35?.0661728888522049:-.18938681666136592:e[2]>3.6242520361853052?e[30]>1e-35?.005754128097002715:e[4]>1.7005986908310777?e[1]>1e-35?e[3]>1.8688348091416842?.003940381852503271:-.01767544594631589:e[134]>1e-35?.005683243725945637:-.033167818200618454:-.049739953036904844:e[1]>1e-35?e[5]>3.417592293073651?e[3]>2.249904835165133?e[3]>4.051747139190486?-.013281167238314323:.016971087295600894:-.0032296953806057044:e[8]>1e-35?e[3]>1e-35?-.09772932329003692:.10215199291158968:e[3]>1e-35?.04042124133857408:e[4]>1.7005986908310777?-.03780917296974188:-.29617407728303585:e[3]>1.2424533248940002?e[134]>1e-35?.019695468056761475:-.008073287117671947:-.07196945037292647,y=e[0]>1e-35?e[3]>1e-35?e[30]>1e-35?.04565870990720628:e[4]>3.481121732133104?-.0010242035152053465:e[46]>1e-35?-.06735757101078846:.028047085557873476:e[4]>.8958797346140276?.061451212522936484:-.008994471708946133:e[4]>3.8815106545092593?-.015862290359637304:e[4]>1.2424533248940002?e[156]>1e-35?-.0353203284829365:e[135]>1e-35?-.029955239188290975:e[153]>1e-35?-.024262881593313065:e[21]>1e-35?-.04039396048201336:e[155]>1e-35?.031605649750965394:e[46]>1e-35?-.0412690351363074:e[18]>1e-35?-.02516534034859168:e[51]>1e-35?-.09383050740007202:e[219]>1e-35?e[30]>1e-35?.05781620337941066:-.031029108058883783:e[54]>1e-35?-.1312103962175427:e[14]>1e-35?.029309503966067275:e[52]>1e-35?-.12376041877584809:e[49]>1e-35?-.08405476403385437:e[129]>1e-35?-.07017699310303659:e[3]>3.238486181444842?.0005864979938663785:e[90]>1e-35?-.19027994988708324:e[4]>2.4414009612931857?.013036973814688194:e[141]>1e-35?-.05866284827055356:e[196]>1e-35?e[3]>1.2424533248940002?e[3]>1.4978661367769956?.021738540839636195:.10410506831002041:-.25590968590756463:.0023982515170817725:-.04143304307857132,v=e[0]>1e-35?e[2]>1.8688348091416842?e[2]>3.417592293073651?e[2]>5.335128436483344?-.011443269019739626:e[1]>1e-35?.015228192424880932:-.005492858431736962:e[1]>1e-35?e[5]>3.5694334999727624?.03605247912942737:.08439131345296227:.009650676995478455:e[5]>5.096808314315481?e[2]>.8958797346140276?e[29]>1e-35?.07077360688836766:.044754385330663386:.09313294724999382:e[8]>1e-35?e[2]>.8958797346140276?.04214845406094496:-.10283747682230321:e[4]>.8958797346140276?.05232959789940822:e[2]>.8958797346140276?.00730829946441921:-.23825070451282065:e[7]>.9358314658959646?e[5]>3.417592293073651?e[8]>1e-35?-.013117301012430346:.010418379595902224:e[19]>1e-35?-.07514668047310291:.05032486941219513:e[29]>1e-35?e[1]>1e-35?e[7]>.14547530463198097?e[4]>2.138333059508028?-.009576060406554683:-.04582944318062007:-.04685159067258116:-.07022291581850879:e[1]>1e-35?e[4]>2.3502401828962087?e[4]>3.8815106545092593?-.008313873320272646:e[140]>1e-35?-.029352675967497712:e[37]>1e-35?-.09937923794037767:.015967772276156707:-.009857373135428817:e[38]>1e-35?.011345159604794278:e[2]>2.4414009612931857?e[30]>1e-35?.001522017389940959:-.026992183902105407:-.006358778971076675,_=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,b=e[0]>1e-35?e[1]>1e-35?e[7]>.30853255358841714?e[4]>.8958797346140276?e[138]>1e-35?.0708169212387357:e[7]>.9974623466432676?.06323909894881967:.04463133906529934:-.006876640569960593:e[4]>2.138333059508028?.02983313061920756:-.012849740499321841:e[138]>1e-35?.05170725384597862:e[134]>1e-35?.03407970940934425:e[32]>1e-35?.04641257566344885:e[217]>1e-35?.04726549849359106:e[152]>1e-35?.04284855498215312:-.018635981778740818:e[7]>.9358314658959646?e[1]>1e-35?.013495195381145214:-.0017562536904350947:e[153]>1e-35?-.035450683955968364:e[135]>1e-35?-.033677490938511655:e[1]>1e-35?e[156]>1e-35?-.03492338371344172:e[4]>2.012675845367575?e[8]>1e-35?-.012478407554855247:e[58]>1e-35?-.06588308463544146:.01024668455910621:-.017964352445712636:e[138]>1e-35?.023509519134334668:e[134]>1e-35?.009985116251562821:e[219]>1e-35?-.08089904073615993:e[144]>1e-35?-.08668450969211726:e[146]>1e-35?-.11193950701534479:e[91]>1e-35?-.09510832561737878:e[47]>1e-35?-.06671901650698997:e[145]>1e-35?-.10185972302071798:e[142]>1e-35?-.050979038763275586:-.008318124414257324,w=e[2]>2.4414009612931857?e[7]>.5866799179067689?e[1]>1e-35?e[2]>5.059420419187638?-.004966114458456121:e[3]>1.4978661367769956?e[6]>3.9219243190762363?.016160825033090097:e[4]>2.673553765358735?-.008119911797705546:e[7]>.9676186228082213?.10191214482603793:.010406721157764452:e[4]>2.602003343538398?.011963972867583182:e[209]>1e-35?e[24]>1e-35?-.4633165603515741:-.027241411195905924:-.01021341522779383:e[3]>.8958797346140276?e[39]>1e-35?-.07106669495723826:-.003949154414882924:-.06434150131915288:e[3]>1.7005986908310777?e[1]>1e-35?.005050893558647285:-.01649483548684653:e[217]>1e-35?.0027009145619870485:e[7]>.16413460456379095?-.021492035902356262:-.04956173856083012:e[3]>1e-35?e[2]>.8958797346140276?e[4]>3.314020688089767?.004614615289098078:e[125]>1e-35?-.053838919278819175:e[141]>1e-35?-.031232660335016666:e[7]>.9676186228082213?.031522536832188655:.016369948821613637:-.001970208279177045:e[2]>1.2424533248940002?e[7]>.8045995506441456?e[6]>3.0677824455408698?.035653122678366796:.09668798382116887:.017192957672541906:e[6]>5.427147823217923?e[2]>.8958797346140276?.05167603828162103:.07201242912898732:e[4]>.8958797346140276?e[6]>4.3882378946731615?.04079789432551034:-.00477197753110532:-.1330224689055222,C=e[0]>1e-35?e[1]>1e-35?e[6]>5.519456907163478?e[3]>1e-35?.025938224253040522:e[7]>.9480659774309611?.06369970668749851:.04567224211157202:e[8]>1e-35?-.03272937728465352:e[7]>.8002228006195066?e[219]>1e-35?-.06304921759586735:.04293432033794005:.0034607309539607385:e[30]>1e-35?.03333728636724803:e[134]>1e-35?.03171739664928598:e[32]>1e-35?.04247521237473512:e[217]>1e-35?.04515237436183519:e[138]>1e-35?.043674672816657406:-.021495642896979555:e[153]>1e-35?e[7]>.7405695827634472?-.005353425538700483:-.03818743916821677:e[1]>1e-35?e[156]>1e-35?-.026937004040991603:e[9]>1e-35?.01687211330975012:e[129]>1e-35?-.06344334253531962:e[5]>3.276966702012906?e[3]>2.4414009612931857?e[3]>4.3882378946731615?-.029787052855333836:e[140]>1e-35?-.0315337765152156:.01010125865272709:-.003643087951301554:e[3]>1.8688348091416842?-.009293469974765106:e[7]>.9407436463973539?e[19]>1e-35?-.10837629052758145:.08012552652666853:-.03240188731353479:e[3]>.8958797346140276?e[138]>1e-35?.028089541906112948:e[134]>1e-35?.011775653029555359:e[54]>1e-35?-.1329256322319015:-.010520589644656487:-.058476715353390545,E=e[0]>1e-35?e[2]>1.7005986908310777?e[2]>2.970085626360216?e[3]>1.4978661367769956?e[1]>1e-35?.015966021866473425:-.004942501766182043:e[7]>.7646034107159144?.0008922354520049755:-.02377096637770522:e[1]>1e-35?.03185471115279236:.009030463601278762:e[6]>5.033695261903033?e[2]>.8958797346140276?e[3]>1e-35?.03583918176912262:.05978765203310842:e[3]>1.4978661367769956?.04363706154403441:.08596238935719265:e[8]>1e-35?e[4]>3.676220550121792?-.14139420543234502:e[6]>4.135134555718313?.06641653507737781:-.08482961471233386:e[219]>1e-35?-.08432601495298837:.036383288293587494:e[2]>4.212100162283537?e[4]>4.06899022722607?-.027653216441781994:e[4]>1.2424533248940002?-.0074990353344818825:-.047274115298751654:e[3]>4.350257124271638?-.021535524001034215:e[7]>.9626084674797213?e[6]>3.314020688089767?.008343192891130257:e[3]>2.602003343538398?-.029175290449111352:e[19]>1e-35?-.0982821612709299:.07967468666491928:e[3]>2.012675845367575?e[1]>1e-35?e[141]>1e-35?-.050000478457880464:e[99]>1e-35?.03066844761711629:.00757148708610041:e[14]>1e-35?.030325269400598688:e[138]>1e-35?.029925649226634522:-.005865781126590595:e[7]>.14547530463198097?-.006746433384005582:-.03419211369300411,T=e[7]>.8453853180651066?e[9]>1e-35?e[204]>1e-35?e[5]>3.979637980058199?.03492440471960614:.10640952227810228:.024674544399570984:e[21]>1e-35?-.03056548710005192:e[24]>1e-35?.04417102228084844:e[18]>1e-35?e[5]>3.417592293073651?-.01915628728670732:.08218968786016527:e[22]>1e-35?-.015022557207326592:e[7]>.9941118339384912?.024199625103362956:e[135]>1e-35?-.01204089678887213:e[5]>3.156774023138548?e[14]>1e-35?.03343354440638259:e[144]>1e-35?-.06832894943893354:.0114980261254499:e[12]>1e-35?e[100]>1e-35?.09915326976032354:-.011405707270850872:.05400113313957842:e[138]>1e-35?.029070115198082648:e[7]>.11348809759407426?e[9]>1e-35?.0124381999772114:e[14]>1e-35?.021548670539672424:e[152]>1e-35?.02386756199239544:e[155]>1e-35?.024879667358339554:e[217]>1e-35?.014495299809094343:e[17]>1e-35?.023665548251738264:e[21]>1e-35?-.04352613176288253:e[142]>1e-35?-.041479100066479035:e[47]>1e-35?-.054730987834988636:e[135]>1e-35?-.02041552814087628:e[12]>1e-35?.00599257601351913:e[19]>1e-35?.017289098956116435:-.005346146967029123:-.015035114021856248,S=e[2]>2.524928003624769?e[39]>1e-35?-.054727205204329936:e[2]>5.1209788959100075?e[3]>1.7005986908310777?-.006846267565269392:e[5]>6.826002629905951?-.031164989612379426:-.002741497453668024:e[91]>1e-35?-.09671408062751485:e[4]>1.4978661367769956?e[1]>1e-35?e[3]>2.249904835165133?.01457038163563883:e[7]>.1998775237752378?.0022386178156093236:-.023878153904868322:e[138]>1e-35?.02577301491883366:e[134]>1e-35?.012196636151923639:-.011620066788940737:-.02547345266933859:e[3]>1e-35?e[2]>1e-35?e[1]>1e-35?e[125]>1e-35?-.054140900037670386:e[5]>3.5694334999727624?.011956526123643832:e[3]>2.602003343538398?-.02114925328017154:e[7]>.9662372103242399?.08782010508103752:-.017223208918198857:e[138]>1e-35?.03552967765214556:e[134]>1e-35?.02029988465200251:-.0027071098830831453:-.010563423003945922:e[2]>1.2424533248940002?e[1]>1e-35?e[5]>3.156774023138548?.020789754957971127:e[8]>1e-35?.09676607622337308:-.13431522143386382:-.04328684841078818:e[6]>5.427147823217923?e[2]>.8958797346140276?.04286558286931383:.0632450248289209:e[4]>.8958797346140276?e[8]>1e-35?e[4]>3.676220550121792?-.12134536828900527:-.0021406313647826976:.02703554321037796:-.10987991092748431,x=e[3]>3.238486181444842?e[30]>1e-35?.009506310623811853:e[39]>1e-35?-.0390989997202559:e[187]>1e-35?-.07249802958837052:e[46]>1e-35?-.05080833699879983:e[143]>1e-35?-.06014247774751084:e[219]>1e-35?-.05179602905357869:e[6]>6.1537953943602615?e[15]>1e-35?-.025022238573512268:.0011147676050071987:-.013840284878987585:e[7]>.9626084674797213?e[5]>3.417592293073651?e[3]>1e-35?e[6]>3.9219243190762363?.008593726678003006:.05272960047875293:e[5]>4.424828703319957?.03164186747443643:-.019512539098210834:e[3]>2.602003343538398?-.0016290671598964486:e[3]>1.2424533248940002?e[8]>1e-35?-.1920669264002081:.09024848315677546:e[8]>1e-35?.06434775905745808:e[44]>1e-35?.11389595321585716:-.036695137521575945:e[6]>4.987019604243537?e[141]>1e-35?-.03813401544172915:e[138]>1e-35?.029859363038130183:e[58]>1e-35?-.06135288076045784:e[39]>1e-35?-.04609789446034826:e[7]>.14547530463198097?e[11]>1e-35?.0007666746170242386:e[129]>1e-35?-.04984156530077896:e[18]>1e-35?-.01554744241744757:e[10]>1e-35?e[219]>1e-35?-.043774129950223145:.0062051346459236715:.014331149613197688:-.004868728135790881:-.009310258638274059,k=e[0]>1e-35?e[2]>1.7005986908310777?e[2]>3.817651943129708?e[3]>1.8688348091416842?.0015603015891380355:-.018128739944024166:e[5]>3.5694334999727624?e[6]>5.427147823217923?.017445711714402918:-.006013735620008879:e[3]>1.2424533248940002?.08568755276415789:e[4]>2.602003343538398?.03195371214541369:e[6]>2.970085626360216?-.3506562612672139:-.038898555979475155:e[6]>5.391349638084432?e[2]>.8958797346140276?.04755052122467952:e[3]>1.4978661367769956?.03861414711908666:.08185303441168128:e[8]>1e-35?e[5]>4.424828703319957?.016473058697350277:-.08025494910794358:e[219]>1e-35?-.06606152909975703:.033955083083682974:e[153]>1e-35?-.022769519242142378:e[155]>1e-35?.021917770434351808:e[3]>4.051747139190486?-.016298405734735375:e[4]>1.2424533248940002?e[156]>1e-35?-.023334559703496013:e[91]>1e-35?-.07354920004445119:e[21]>1e-35?-.03472005783841508:e[9]>1e-35?.0088614848397155:e[152]>1e-35?.01650058356046536:e[50]>1e-35?-.08689386936995537:e[219]>1e-35?-.025293957964644554:e[22]>1e-35?-.02911571993589908:e[52]>1e-35?-.10060771324188006:e[151]>1e-35?-.11187645020980451:e[49]>1e-35?-.07269389735370566:.00010096962399904588:-.0308050484468705,I=e[0]>1e-35?e[2]>1.7005986908310777?e[2]>3.1132683346437333?e[2]>5.589117819455554?-.01634394676179118:e[135]>1e-35?-.025978770194490092:.003478202132522329:e[5]>3.772694874805912?e[6]>5.55101783490842?.0201238113260563:-.003889163967162744:.0619995705843029:e[6]>5.391349638084432?e[2]>.8958797346140276?.04441301244720888:.07580163057048642:e[5]>4.424828703319957?.030400021609279876:e[135]>1e-35?e[6]>4.03420147928485?-.1614949959350695:.011868201115510678:e[144]>1e-35?-.24480189212017833:.00743113235503554:e[135]>1e-35?-.02500550080046047:e[155]>1e-35?.019914668189284807:e[14]>1e-35?.016272311078771865:e[2]>4.436734027666816?-.010942143677155697:e[152]>1e-35?.01655515192923104:e[5]>3.276966702012906?e[208]>1e-35?.01544696196221499:e[209]>1e-35?.011686634595667988:e[204]>1e-35?.012948259428096241:e[54]>1e-35?-.0987840586310838:e[17]>1e-35?.019642065140602974:e[9]>1e-35?.002408217148588979:e[129]>1e-35?-.051760999013377655:e[53]>1e-35?-.12326801905337725:e[156]>1e-35?-.027148214121600067:-.00591946140033722:e[141]>1e-35?.08076229481403298:e[100]>1e-35?.09029873540689846:.004633440115146894,A=e[1]>1e-35?e[4]>2.138333059508028?e[9]>1e-35?e[7]>.9738681190948303?e[4]>2.249904835165133?.0335386338744903:.08871810783567416:.019225035967642936:e[7]>.5866799179067689?e[44]>1e-35?-.028577747938027556:e[22]>1e-35?-.017080349342057245:e[123]>1e-35?-.06459630434555787:.01496396100048332:e[7]>.04507521918085865?.0037545927605624665:-.024364818555823085:e[7]>.3301972011875425?e[4]>.8958797346140276?.003955118988355861:-.024852972286710795:e[210]>1e-35?-.06918033561606161:-.016436360434421187:e[219]>1e-35?-.07074619361594191:e[14]>1e-35?.02288621182895308:e[30]>1e-35?.009951065285890723:e[4]>3.0677824455408698?e[48]>1e-35?-.08645289278185848:e[18]>1e-35?-.07128859518483391:e[46]>1e-35?-.059012415377229614:e[51]>1e-35?-.09897820075751956:e[143]>1e-35?-.0658809793369211:e[39]>1e-35?-.05072244120975425:e[145]>1e-35?-.1041573357946847:e[21]>1e-35?-.07265724033978356:e[121]>1e-35?.032340406020414894:e[150]>1e-35?-.12780465144045577:e[50]>1e-35?-.10084067045905792:-.008282579596590931:e[31]>1e-35?.09475423612489574:e[134]>1e-35?.016436600209473996:-.0032052350949025154,P=e[0]>1e-35?e[1]>1e-35?e[6]>5.980149988077803?e[3]>1e-35?.016868562767356994:e[7]>.9480659774309611?.0490126593301439:.03183712887814021:e[4]>.8958797346140276?e[8]>1e-35?-.018344689935240077:e[7]>.5762123732244849?.027823839417468396:.0022237549483396734:-.049221463486990365:e[30]>1e-35?.024881540664409785:e[4]>3.0677824455408698?-.012956173562801246:.010844244442972509:e[153]>1e-35?-.021011529883710918:e[135]>1e-35?-.022862755771243214:e[91]>1e-35?-.06523564179230792:e[3]>4.3372693810700085?-.01836396186345982:e[4]>1.2424533248940002?e[14]>1e-35?.018063557788938384:e[1]>1e-35?e[58]>1e-35?-.05666864992513037:e[37]>1e-35?-.09859173931566362:e[140]>1e-35?-.026368697925604742:e[139]>1e-35?-.06458698835998881:e[3]>2.4414009612931857?e[8]>1e-35?-.012750470980894203:e[128]>1e-35?-.06062526587440112:.011637315217958607:e[7]>.9569480028661056?e[6]>3.314020688089767?e[6]>8.256477558772088?-.01867324944649552:.013333709765106694:e[19]>1e-35?-.0862336521704207:.06263843669460754:-.005209374987876728:e[29]>1e-35?-.05314556259108334:e[144]>1e-35?-.06747511467043471:-.0032459743896180644:-.025647852465095045,R=e[0]>1e-35?e[2]>1.4978661367769956?e[2]>2.802901033147999?e[153]>1e-35?-.028446025186518367:e[135]>1e-35?-.030498458478750823:e[4]>1.4978661367769956?.0028332406263713176:-.029966327008991617:.018714561890725637:e[6]>5.033695261903033?e[2]>.8958797346140276?.041738631496127304:.0701395739744944:e[7]>.9811887196001154?e[28]>1e-35?e[194]>1e-35?-.6270617037879163:-.14198370205598315:-.008029082191082339:.03966126215239892:e[153]>1e-35?-.018792731305353614:e[135]>1e-35?-.020500053366640306:e[156]>1e-35?e[11]>1e-35?-.05063175110475535:-.0120172710473678:e[147]>1e-35?-.06181360325166399:e[7]>.06275229375044648?e[52]>1e-35?-.09381845963236321:e[4]>4.424828703319957?-.015836182358134197:e[4]>1.2424533248940002?e[48]>1e-35?-.047387335727107405:e[50]>1e-35?-.07061356901704502:e[151]>1e-35?-.09680213548388712:e[46]>1e-35?-.028970851669790916:e[123]>1e-35?-.035197840867969954:e[49]>1e-35?-.06299268464836878:e[149]>1e-35?-.10197175263174806:e[58]>1e-35?-.03908263666673043:e[22]>1e-35?-.021903737116021876:e[2]>.8958797346140276?.005307704388235018:-.0020984759645931708:-.021935509998616008:-.01887705116018838,N=e[2]>2.4414009612931857?e[2]>4.749261159734808?e[219]>1e-35?-.0427111578574511:e[153]>1e-35?-.030189831687705213:e[135]>1e-35?-.03512251542671204:-.005813108237155817:e[39]>1e-35?-.03612853474204475:e[91]>1e-35?-.07347487395456895:e[142]>1e-35?-.04314124434818331:e[21]>1e-35?-.03933135423264962:e[29]>1e-35?e[6]>4.3882378946731615?e[1]>1e-35?-.0015250307417007892:-.0490054084929899:e[209]>1e-35?-.19107169934362123:-.032434842765588306:e[18]>1e-35?-.04413318629193353:e[5]>3.772694874805912?.004026864766696988:e[7]>.9705672697050661?e[4]>2.602003343538398?-.0184663870129198:.08888448773905216:-.0040785146358560806:e[29]>1e-35?e[2]>1.2424533248940002?e[1]>1e-35?e[5]>3.156774023138548?.012676257607559291:e[4]>2.012675845367575?.07794141958502514:-.23905004122480836:-.03904279404529968:e[6]>5.818597045157784?e[1]>1e-35?.04439337662833094:-.009601154125838422:e[28]>1e-35?e[7]>.9926276364955392?e[156]>1e-35?.08495906118788314:e[153]>1e-35?.09808912606252018:-.41470362752984724:.024659633328041372:e[6]>4.3882378946731615?.02348696158531392:-.011219631635525798:e[2]>.8958797346140276?.00764827947682953:-.002636723662133651,O=e[0]>1e-35?e[138]>1e-35?.04040206743401164:e[7]>.47159631571429605?e[39]>1e-35?-.04204265697956852:e[18]>1e-35?-.02345608311313191:e[46]>1e-35?-.07250113205332377:e[47]>1e-35?-.06901706560471924:e[123]>1e-35?-.02471508138476658:e[91]>1e-35?-.08527667683257537:e[6]>5.519456907163478?e[7]>.9811887196001154?.033642311398086024:.019968221974742344:e[6]>3.540854293052788?e[28]>1e-35?e[7]>.9914949911911836?-.17171139407761582:.033182911468765224:.0060896749985828915:e[7]>.9626084674797213?.050178751374534494:-.008697473314227091:e[6]>5.957131031247307?.008840008772752947:-.00839587224544437:e[57]>1e-35?-.11000065936717814:e[187]>1e-35?-.039919217528968265:e[135]>1e-35?-.01777859479698383:e[7]>.841541958453746?e[6]>8.681774988134558?-.006645633391127337:.005363553180866138:e[7]>.06275229375044648?e[141]>1e-35?-.028575934798358252:e[147]>1e-35?-.06523418671938815:e[53]>1e-35?-.12439699935111644:e[47]>1e-35?-.04201034294282216:e[21]>1e-35?-.029998534764449716:e[11]>1e-35?-.008349262144218515:e[10]>1e-35?e[152]>1e-35?.03211843381827455:-.009616753935387912:.001507728277179471:-.018453367252451447,L=e[2]>2.4414009612931857?e[155]>1e-35?.02097415247337288:e[2]>5.1209788959100075?e[219]>1e-35?-.04107586321461544:e[153]>1e-35?-.030708779452328257:-.008547089256234949:e[24]>1e-35?e[113]>1e-35?.10372474211849725:.010871474495452506:e[46]>1e-35?-.048875079231930615:e[152]>1e-35?.0169028183837229:e[91]>1e-35?-.06545106192484919:e[7]>.5395500104437768?e[21]>1e-35?-.03634133884877529:e[123]>1e-35?-.04524486315275367:.0007726000210664368:e[153]>1e-35?-.026631444280113794:-.005897540198114922:e[29]>1e-35?e[2]>1.2424533248940002?e[141]>1e-35?.06938494238244022:e[1]>1e-35?e[4]>2.602003343538398?e[7]>.21160651352969054?.016731168841731828:-.009280453313693341:-.006549806005743951:-.035447929694275064:e[8]>1e-35?-.0032912467465369953:e[4]>1.2424533248940002?e[1]>1e-35?e[2]>.8958797346140276?.024369266212637037:e[138]>1e-35?.06205121318768558:.03811769435016647:-.009452348851889555:-.025248141993897872:e[2]>1e-35?e[57]>1e-35?-.12191990737301042:e[4]>3.3842466058243152?.00020591213976092076:e[141]>1e-35?-.03252260939244301:e[186]>1e-35?-.13818838492678748:.009368844137034227:-.007973426105216213,D=e[2]>2.3502401828962087?e[14]>1e-35?.015015656987761437:e[30]>1e-35?e[210]>1e-35?e[7]>.6876768869498817?.00543900892248828:-.04253496769494065:e[141]>1e-35?-.052958350924390156:e[140]>1e-35?-.10364099832282586:.010452960405207413:e[24]>1e-35?e[113]>1e-35?.09898709072741292:e[209]>1e-35?e[7]>.9821472231924556?-.26615665549082984:.09636256138859388:.01708542025496261:e[217]>1e-35?.008049408683788317:e[21]>1e-35?-.04590265539954756:e[90]>1e-35?-.13784770816769107:e[142]>1e-35?-.04628126597884301:e[47]>1e-35?-.05827975565933709:e[135]>1e-35?-.0223224900840969:e[18]>1e-35?-.03220713396184497:e[91]>1e-35?-.06447405488640102:e[58]>1e-35?-.05284544446869763:e[48]>1e-35?-.06649148594881385:e[123]>1e-35?-.04383701454842744:e[7]>.07815070294696584?e[52]>1e-35?-.11846610284210293:e[50]>1e-35?-.08907531725085399:e[156]>1e-35?-.018270336483319834:e[150]>1e-35?-.1090721461891663:e[151]>1e-35?-.12157322199183473:-.001565820654257863:-.02380240397829804:e[7]>.7957410883753849?.01267070049428537:e[9]>1e-35?.012970301396505988:.0031136826722851885,M=e[0]>1e-35?e[2]>1.4978661367769956?e[2]>3.817651943129708?e[29]>1e-35?-.01811927921170173:-.0007182192063435364:e[30]>1e-35?.024303187146750442:e[1]>1e-35?.011106265465270054:e[134]>1e-35?.029835980521591587:-.011058553872914158:e[29]>1e-35?e[4]>.8958797346140276?e[2]>.8958797346140276?.038081831260496:e[7]>.9761943980359399?e[7]>.9974623466432676?.0678338591810893:.02371719224774027:.0682898584583309:-.023148464063014726:e[30]>1e-35?.04610988679672867:.003060113702583105:e[29]>1e-35?e[2]>.8958797346140276?e[4]>2.4414009612931857?e[7]>.9587163092581167?.01081564552001606:-.006807357600587744:-.02409609521595022:-.033329165496176885:e[4]>4.051747139190486?-.01130115168237245:e[129]>1e-35?-.04589370141507604:e[21]>1e-35?-.029442074982620643:e[14]>1e-35?.016895124578179443:e[186]>1e-35?-.11907557430036886:e[1]>1e-35?e[139]>1e-35?-.06194447560538838:e[133]>1e-35?-.0758465323292204:e[58]>1e-35?-.04330766372695393:e[138]>1e-35?-.04155491116231014:e[156]>1e-35?-.04841608169206507:e[44]>1e-35?-.01948221703985556:.006580878599054945:e[217]>1e-35?.022433802380447482:-.00412091757515532,B=e[0]>1e-35?e[2]>1.4978661367769956?e[2]>2.970085626360216?e[153]>1e-35?-.024502725801264887:e[2]>5.589117819455554?-.01230190569981064:.0013078979950003464:e[1]>1e-35?.016172143068823742:.0006345060509537773:e[2]>.8958797346140276?.030005982109869073:e[7]>.9811887196001154?e[7]>.9983480540068196?.0671951915420627:e[4]>.8958797346140276?e[204]>1e-35?e[4]>2.4414009612931857?.044068636573383585:-.6634026033584294:e[28]>1e-35?e[194]>1e-35?-.3139210817530322:-.030502668897116853:.02841326513237545:-.12080826254458728:.05983169094937563:e[25]>1e-35?-.03468266531519899:e[17]>1e-35?.018557285805987474:e[91]>1e-35?-.051420462987159146:e[153]>1e-35?e[24]>1e-35?.04301006671297924:e[57]>1e-35?-.09748386515224282:e[7]>.43956365248689394?-.00756781004151352:-.03008603678955382:e[40]>1e-35?-.06712212199178254:e[9]>1e-35?e[99]>1e-35?.02709638137622776:.00311232737924217:e[219]>1e-35?-.021650545703290135:e[129]>1e-35?-.04139534817677377:e[4]>4.482986592105174?-.01666373169408667:e[7]>.14547530463198097?e[28]>1e-35?.0203181446326991:e[24]>1e-35?.019321702534414745:-.0013149142637674523:-.010572437649803333,F=e[1]>1e-35?e[99]>1e-35?.024922390516579074:e[7]>.6223082132708274?e[5]>8.674624195715621?-.0013697481432616754:e[8]>1e-35?e[5]>3.0201273556387074?e[5]>4.855921334140645?-.0034268395365245545:-.034186463672076346:e[29]>1e-35?.07759914281958613:-.07773573805144608:e[22]>1e-35?-.0175879419801366:e[7]>.9626084674797213?.016773359142537643:.008028381804196754:e[133]>1e-35?-.0535216100744091:-.0005000628423357899:e[38]>1e-35?e[14]>1e-35?.05090247458630403:.007750826606170666:e[30]>1e-35?.007698939719746262:e[121]>1e-35?.02303487268261317:e[56]>1e-35?.04301822779572479:e[219]>1e-35?-.061056125991793546:e[49]>1e-35?-.08519783826666813:e[54]>1e-35?-.11098408863832084:e[51]>1e-35?-.07495147940928196:e[52]>1e-35?-.10268521021357209:e[143]>1e-35?-.050337621945760906:e[50]>1e-35?-.08215637358309871:e[135]>1e-35?-.037923453156281546:e[29]>1e-35?-.03275476659364492:e[118]>1e-35?-.05655325181162936:e[46]>1e-35?-.03579874818682071:e[55]>1e-35?-.10858775815345066:e[98]>1e-35?-.02949179817285505:e[91]>1e-35?-.06114394873657414:-.0024381269826722327,j=e[0]>1e-35?e[138]>1e-35?.03188433658945665:e[6]>5.957131031247307?e[29]>1e-35?.02161439640262312:e[46]>1e-35?-.05856082884648366:.00579188508436574:e[5]>3.417592293073651?-.0023781291067078423:e[6]>2.524928003624769?e[29]>1e-35?-.009165058612451055:.06060298049441096:-.024654633200924148:e[29]>1e-35?e[141]>1e-35?.047057536167451744:e[5]>7.751690325550034?-.014630738159823437:e[6]>1e-35?-.0022830386545257364:-.1244934159203967:e[141]>1e-35?-.03108265181870111:e[151]>1e-35?-.0899976208431091:e[53]>1e-35?-.10125439914522794:e[57]>1e-35?-.08285049636367613:e[48]>1e-35?-.04071723813859757:e[147]>1e-35?-.05043191744833317:e[49]>1e-35?-.05480244282058292:e[52]>1e-35?-.07341553831872409:e[91]>1e-35?-.04164336745260387:e[50]>1e-35?-.05943962674275153:e[40]>1e-35?-.054773037913883875:e[129]>1e-35?-.03640370706396673:e[54]>1e-35?-.07483146938849299:e[22]>1e-35?-.02027834075472462:e[186]>1e-35?-.08116240011202293:e[143]>1e-35?-.028437692949603324:e[21]>1e-35?-.02421670339700474:e[46]>1e-35?-.02303808594532841:.0030552215125396933,U=e[0]>1e-35?e[1]>1e-35?e[4]>2.138333059508028?e[9]>1e-35?.02933727780739186:e[6]>4.722943345003718?e[7]>.9246495578512688?.024680404379144982:.012015730636539185:e[113]>1e-35?.09112392780348796:e[135]>1e-35?e[7]>.990877425524446?-.11617284449593282:-.005246041787488675:-.011069319481086321:e[90]>1e-35?-.2763006993902732:e[7]>.9546729796082215?e[6]>3.0677824455408698?.009233858920042097:.08920751503262825:-.008824102277148265:e[138]>1e-35?.02736126919460762:e[4]>2.917405368531303?e[30]>1e-35?.013112272135200274:e[217]>1e-35?.035799930603658235:-.015618218537266096:.010656981322113845:e[14]>1e-35?.01147191978691208:e[17]>1e-35?.016681596753170068:e[135]>1e-35?-.017396147137824756:e[4]>1.8688348091416842?e[4]>4.03420147928485?-.008863534867945834:e[31]>1e-35?.05416038384474034:e[113]>1e-35?.012656827040897288:e[204]>1e-35?.011410879858785482:e[208]>1e-35?e[1]>1e-35?.02085606775425661:-.008618410086291444:e[53]>1e-35?-.09674487817291225:e[155]>1e-35?.010841012663281826:-.0027234799964982103:e[100]>1e-35?e[6]>4.226807104886684?-.02684998739505702:.09196076999373319:-.014557367931257406,$=e[1]>1e-35?e[4]>2.4414009612931857?e[140]>1e-35?-.020508725755139606:e[9]>1e-35?.014160204295049248:e[37]>1e-35?-.06190233326923697:e[6]>1e-35?.005164496028342236:-.11389189550910446:e[141]>1e-35?-.04125881484049697:e[186]>1e-35?-.17160163910476212:e[29]>1e-35?e[6]>3.676220550121792?-.010283419868136159:e[7]>.9626084674797213?-.1716178372310524:-.008856137283327148:e[28]>1e-35?.05315666786902214:e[129]>1e-35?-.04136913767615559:e[7]>.9705672697050661?e[6]>3.540854293052788?.00751812285476753:e[8]>1e-35?-.11960098941111366:.06631760098044483:e[210]>1e-35?e[30]>1e-35?-.05338190010412709:.017275201286894953:e[30]>1e-35?.014424216946760394:e[99]>1e-35?.027062693955934525:-.006762492910108134:e[219]>1e-35?-.0534489198792768:e[138]>1e-35?.017328465617667224:e[4]>2.970085626360216?e[144]>1e-35?-.0662951231725991:e[143]>1e-35?-.04739088646917139:e[145]>1e-35?-.07635546796992515:e[14]>1e-35?.012433708195861912:e[217]>1e-35?.021046036228368578:e[51]>1e-35?-.07024391932712475:-.007585229386863768:e[127]>1e-35?.0788172427657374:.0036475442240054556,q=e[0]>1e-35?e[2]>1.4978661367769956?e[2]>2.802901033147999?e[153]>1e-35?-.02488671343402725:e[135]>1e-35?-.026342401137212534:e[4]>1.4978661367769956?-.0002120610158998857:-.02619014803287452:e[5]>3.772694874805912?.00791871819482647:.05245006986819034:e[5]>5.431533816254341?e[2]>.8958797346140276?.026755493155023333:.05657996196424821:e[5]>4.424828703319957?e[28]>1e-35?-.12833948112036647:.02009706276124955:e[135]>1e-35?-.1062651205805238:-.014392542658357654:e[156]>1e-35?e[11]>1e-35?-.0426876288098691:-.009210886749467585:e[25]>1e-35?-.029685120249418873:e[153]>1e-35?e[24]>1e-35?.039675921298659045:-.01470247025894634:e[135]>1e-35?-.013162475027411236:e[2]>1e-35?e[22]>1e-35?-.01924589513592333:e[21]>1e-35?-.02301719200164619:e[5]>8.75754777636908?e[4]>2.602003343538398?-.0007468484638490539:-.0158247553028744:e[1]>1e-35?e[99]>1e-35?.024493682002973784:e[42]>1e-35?-.07469088345156226:e[45]>1e-35?-.03838380763638677:e[114]>1e-35?.02409327545276692:e[154]>1e-35?-.038977286951036944:e[208]>1e-35?.021915882358345885:.003839964304606302:-.0014382346596150915:-.008713493537728363,H=e[0]>1e-35?e[2]>1.4978661367769956?e[2]>4.119004124609202?e[3]>1.2424533248940002?-.0017308950709495397:-.020269742816377157:e[5]>3.5694334999727624?e[6]>6.468474521450064?.007854184286630537:-.005163758444496073:e[3]>1.2424533248940002?e[12]>1e-35?-.009039854020477722:.08762320620103459:e[194]>1e-35?-.3433922378591172:e[24]>1e-35?-.2523113760729937:-.000461371156912453:e[5]>5.692045796563381?e[3]>1.4978661367769956?.007177758561499448:e[2]>.8958797346140276?.03195343200682438:.059909349900388334:e[5]>4.424828703319957?e[28]>1e-35?-.10695282804536732:.019125081292682575:e[135]>1e-35?-.09257011968677195:-.012855523323410875:e[14]>1e-35?.010052176448775013:e[152]>1e-35?.011482760058014926:e[156]>1e-35?-.017677609761538152:e[24]>1e-35?.01670301885059328:e[39]>1e-35?-.02425844450882272:e[12]>1e-35?e[3]>1.2424533248940002?e[6]>5.980149988077803?.01117036123239103:e[3]>1.4978661367769956?-.005154239762347923:.06349844063391799:-.011876368966362884:e[4]>3.772694874805912?-.010120762110714197:e[5]>3.276966702012906?e[4]>2.4414009612931857?e[4]>3.1132683346437333?-.0035902728428789336:.003411450739155564:e[5]>8.17933999189099?-.018866709049095685:-.0038747233097564068:.024379138339081993,V=e[7]>.5866799179067689?e[11]>1e-35?e[217]>1e-35?.01816196279626246:-.008720340174685528:e[14]>1e-35?.017422275374961747:e[3]>2.802901033147999?e[6]>6.0026509725338455?e[18]>1e-35?-.035421013136394335:e[219]>1e-35?-.03997357699142973:e[3]>4.993822430271426?-.03250278247092862:.004080430247607075:-.010055330454519094:e[5]>9.345963324807864?-.008136951493137817:e[90]>1e-35?-.16414188828180187:e[45]>1e-35?-.0395103723535772:e[17]>1e-35?e[6]>3.314020688089767?.03144428117941763:-.12305809642153893:e[5]>3.417592293073651?.006863569747629234:e[7]>.9626084674797213?e[204]>1e-35?.08986402088848823:e[100]>1e-35?.09658177526577977:e[141]>1e-35?.06795495668113817:e[28]>1e-35?e[3]>1e-35?.10311172778826272:-.12367638872784459:e[209]>1e-35?.06796205879581844:e[6]>3.0677824455408698?e[3]>2.012675845367575?-.1815028770626217:-.027600842388305583:.013979123567456554:-.003475039039176338:e[6]>4.3882378946731615?e[3]>3.6242520361853052?-.008151073332139989:e[3]>2.4414009612931857?e[48]>1e-35?-.05732062477153205:.0038104987226822806:e[7]>.14547530463198097?-.0015360108147469411:-.014797616303672155:e[3]>.8958797346140276?-.010446976011382926:-.039018423658353285,z=e[0]>1e-35?e[2]>1.4978661367769956?e[2]>4.620046665062766?e[3]>1.8688348091416842?-.0031733808376565214:-.019463570735432378:.0032566959999593536:e[5]>5.692045796563381?e[3]>1.4978661367769956?.006472511895453073:e[2]>.8958797346140276?.029439910335277677:.05703290277034656:e[219]>1e-35?-.06489530937321614:e[5]>4.424828703319957?.017756995160153607:e[125]>1e-35?-.13863131633711023:-.011337464460106939:e[29]>1e-35?e[2]>.8958797346140276?e[3]>1e-35?-.04822012795561216:e[125]>1e-35?.06083023155995546:e[141]>1e-35?.04503531231698771:e[5]>7.751690325550034?-.008826435995092507:.0004769856196102064:e[5]>5.895778350950796?-.03439788269853701:.0012862199645308793:e[141]>1e-35?e[3]>3.0677824455408698?.0046610227653059695:-.04504560149384845:e[3]>4.3372693810700085?-.011924612526365003:e[151]>1e-35?-.07909878419302184:e[40]>1e-35?-.04837106565429512:e[52]>1e-35?-.06478730352567258:e[18]>1e-35?e[46]>1e-35?.060888920864590634:e[5]>3.5694334999727624?-.02601024872439008:.07960150564774994:e[46]>1e-35?-.027213119561154103:e[51]>1e-35?-.054081846676903716:e[54]>1e-35?-.07375359621246233:e[50]>1e-35?-.0570341640965886:.0021129818482267812,K=e[2]>2.861792550976191?e[11]>1e-35?e[58]>1e-35?-.09222476830824185:e[156]>1e-35?-.044357001480428:-.009033627105152873:e[8]>1e-35?e[5]>7.429817490674132?-.007435399919321396:-.025630334739367253:e[155]>1e-35?.02064199664419035:e[5]>8.75754777636908?e[2]>4.119004124609202?-.012759040985224594:-.0009375109950390992:e[21]>1e-35?-.028664595543047417:e[187]>1e-35?-.03837361994986333:e[22]>1e-35?-.027274995074267547:e[14]>1e-35?.016392245342055616:e[17]>1e-35?.022509678093313362:e[28]>1e-35?.025145343126000193:e[39]>1e-35?-.02939647868188604:.00042395552644239256:e[29]>1e-35?e[2]>2.012675845367575?-.0030925701821976686:e[5]>6.0390628155997765?e[2]>.8958797346140276?.010736817315927911:.02426980448005241:e[28]>1e-35?e[194]>1e-35?-.3070569158934055:e[196]>1e-35?-.5506885961570867:-.033353293982668515:.006553036790621832:e[2]>1.2424533248940002?e[5]>3.5694334999727624?e[155]>1e-35?.02102370525016274:.003409533559556135:e[204]>1e-35?.08873962123163927:e[24]>1e-35?.10555359938821945:e[28]>1e-35?.09719645392539251:e[196]>1e-35?.08224623369607056:-.020134405544960793:-.0015937623030202052,W=e[0]>1e-35?e[2]>1.8688348091416842?e[3]>1.4978661367769956?e[3]>3.540854293052788?-.0076758153562413375:e[18]>1e-35?-.04295196457825341:e[51]>1e-35?-.13248011320062422:.008952360414023641:e[7]>.987306237235768?.006439776900137331:-.012660562195035134:e[3]>2.861792550976191?e[30]>1e-35?.026757175255811883:-.01062556784320532:e[2]>.8958797346140276?.02114926571950188:e[8]>1e-35?e[7]>.9738681190948303?e[7]>.996914501566243?.039844832378913425:-.06690456482695102:.05010759067838343:e[7]>.9901971344332651?e[204]>1e-35?e[7]>.9945060383544003?.03772632631184001:-.28522617893050056:e[28]>1e-35?-.060992612788434375:.03341245674945403:.051288950777861456:e[8]>1e-35?-.010769283931178146:e[29]>1e-35?e[2]>.8958797346140276?e[1]>1e-35?e[7]>.98482287934795?.009069204772381522:-.004081394384581673:-.03594060084257492:e[7]>.9216401592048815?-.00442206228805168:-.03576891499137606:e[55]>1e-35?-.08223884312902127:e[57]>1e-35?-.0742535346669798:e[149]>1e-35?-.07940704728071792:e[39]>1e-35?-.017161105634171125:e[49]>1e-35?-.04763279499691125:e[139]>1e-35?-.027192821855546695:e[10]>1e-35?-.0036316338579956914:.0026484338648234077,G=e[0]>1e-35?e[2]>1.4978661367769956?e[2]>5.527441013321604?-.012306712525171806:e[7]>.26911173821332884?e[18]>1e-35?-.027850707388722303:e[91]>1e-35?-.07216882827488169:e[2]>2.740319461670996?e[3]>1.4978661367769956?.005596837686865309:-.0059429747278747225:.009524033665726878:-.0077898166249992535:e[6]>5.912149824839399?e[3]>1.4978661367769956?e[30]>1e-35?.032201880996274065:-.009587971174292791:e[2]>.8958797346140276?.02761965407835318:.05238312639482409:e[7]>.990877425524446?e[28]>1e-35?e[156]>1e-35?.08220352701195494:-.16200772313735304:e[135]>1e-35?e[6]>4.310776603370241?-.03126230621131264:-.15437767199900418:e[219]>1e-35?e[2]>.8958797346140276?.018944713961164792:e[3]>1e-35?.06629929139668997:-.16790799717043633:e[192]>1e-35?-.3320398525405097:.009790162291004705:e[125]>1e-35?-.0996239956884951:.017982806591038288:e[25]>1e-35?-.02642518530716432:e[6]>9.286096980078398?e[3]>2.740319461670996?-.0027582177390145703:-.02047492290459601:e[17]>1e-35?.01622159988588393:e[7]>.5866799179067689?.0012556670436606133:e[3]>2.3502401828962087?e[3]>3.314020688089767?-.00567335909535631:.0036605424249172938:e[7]>.085616240166877?-.00662352094724046:-.024196995936398374,Q=e[0]>1e-35?e[2]>1.2424533248940002?e[2]>2.802901033147999?e[3]>1.8688348091416842?e[4]>3.6242520361853052?-.008283589876968955:.005263882290960596:e[7]>.9662372103242399?.0028703212438091555:-.014488335095453487:e[5]>3.5694334999727624?.006182444666070272:.04834325475124454:e[5]>5.821564412917691?e[3]>1.4978661367769956?.006862035478899274:e[2]>1e-35?.03694434517261685:.06818308291563471:e[8]>1e-35?e[4]>3.979637980058199?-.14792403668068005:e[5]>4.297262267176281?.04085199387960594:-.08112459203056922:e[7]>.990877425524446?e[204]>1e-35?e[4]>2.4414009612931857?.040094872099644886:-.37432021591644105:e[128]>1e-35?e[17]>1e-35?.11216772098992614:-.39517539261887863:-.006202508512715542:.031730389306944315:e[8]>1e-35?e[5]>3.156774023138548?-.011787620507206525:e[3]>1.2424533248940002?-.0681989521208321:.06597717957453096:e[2]>1e-35?e[25]>1e-35?-.024543929344106336:e[5]>8.193814844759492?e[4]>2.602003343538398?e[2]>5.167634984480833?-.00996811570890536:.001134417943860963:-.013004815776467261:e[1]>1e-35?e[22]>1e-35?-.019057324908699217:e[141]>1e-35?-.026707851278989517:.005608056403567553:-.0017699070677530831:e[3]>1.4978661367769956?-.005457163739006659:-.02994467745413277,J=e[11]>1e-35?e[154]>1e-35?-.07640004589975245:e[153]>1e-35?-.027921183286970398:e[156]>1e-35?-.02508900369371103:e[47]>1e-35?-.09621039139423637:e[46]>1e-35?-.05890206826599292:-.0018521707885188695:e[7]>.1998775237752378?e[39]>1e-35?-.02026563108381904:e[91]>1e-35?-.03979999802398471:e[14]>1e-35?e[134]>1e-35?.044705853812635206:.01112016315736189:e[24]>1e-35?e[6]>3.417592293073651?.01585670681557334:.0820229237073549:e[9]>1e-35?e[204]>1e-35?e[6]>3.9219243190762363?.01475544028693712:e[30]>1e-35?.10219265831102325:-.0567832116465987:e[154]>1e-35?-.04682869193620295:.0058147572533605784:e[123]>1e-35?-.04011640490395746:e[17]>1e-35?e[6]>3.314020688089767?.016472642951500794:-.10372235311156908:e[19]>1e-35?.013619887374131652:e[28]>1e-35?e[6]>3.1984648276080736?e[6]>5.5816130673839615?.021404525777064917:-.022090537029637168:.07927547222505857:e[129]>1e-35?-.0315112950229846:e[90]>1e-35?-.08016175793969123:e[60]>1e-35?-.044255594885932:e[150]>1e-35?-.0643645650066138:18071436579202054e-21:e[6]>6.132312266239896?.00017227075512669227:-.010904669702571911,Y=e[0]>1e-35?e[1]>1e-35?e[7]>.30853255358841714?e[154]>1e-35?-.053460642910797676:.009652079082741289:-.0017676195976280011:e[134]>1e-35?.01746182064829904:e[32]>1e-35?.033149881191962445:e[138]>1e-35?.02149173543949675:e[37]>1e-35?.028519159270523897:e[152]>1e-35?.023352031441951773:e[217]>1e-35?.02290558132732214:-.01850975101703459:e[152]>1e-35?.010488854074509982:e[155]>1e-35?e[12]>1e-35?.027490522294963154:.002575743497494008:e[131]>1e-35?-.07138027268500055:e[57]>1e-35?-.06658662137088783:e[28]>1e-35?.015141080652315508:e[55]>1e-35?-.07156337757427284:e[204]>1e-35?.008085415901726045:e[99]>1e-35?e[1]>1e-35?.01803019280250009:-.012275416064615064:e[113]>1e-35?.007680714218522011:e[102]>1e-35?.01923593781092882:e[38]>1e-35?.00598208846998872:e[112]>1e-35?.00895148693111358:e[217]>1e-35?.004322676779141819:e[114]>1e-35?e[1]>1e-35?.019173900241286065:e[18]>1e-35?-.1302545616586715:-.012219608237225175:e[89]>1e-35?.019080595932083305:e[95]>1e-35?.009182530113836561:-.006531048204768366,X=e[2]>4.135134555718313?e[47]>1e-35?-.06057129526622943:e[5]>6.805168536739806?e[3]>2.4414009612931857?e[1]>1e-35?e[32]>1e-35?-.09672976728291365:e[217]>1e-35?-.09138286775903748:e[114]>1e-35?.034435801312936894:.003550781249532139:e[56]>1e-35?.06582022232543998:e[144]>1e-35?-.08601101006110747:-.006766914059699758:e[217]>1e-35?.001822103802069182:-.013646878234832634:e[8]>1e-35?-.02495807137678248:e[1]>1e-35?.009517017217557915:-.007488737506950444:e[6]>6.1537953943602615?e[140]>1e-35?-.013180308369805589:e[51]>1e-35?-.0496089337787575:e[15]>1e-35?e[30]>1e-35?.017032153502995334:-.01330098154550191:e[10]>1e-35?e[56]>1e-35?.04713518460375107:-.0016223104582873055:e[131]>1e-35?-.07291331059881433:e[27]>1e-35?-.015619378359486803:.006051005570772542:e[3]>3.1132683346437333?e[8]>1e-35?-.02945681137428643:-.00725026522062693:e[6]>1e-35?e[3]>1.2424533248940002?.0035081297381004684:e[194]>1e-35?e[5]>3.772694874805912?-.03142097937872678:-.17253564001853064:e[5]>3.156774023138548?-.004860170522962415:e[12]>1e-35?-.04169370739781986:.05886396855048806:-.10415236736977414,Z=e[2]>2.3502401828962087?e[11]>1e-35?e[58]>1e-35?-.07548370555339029:-.009060327134219393:e[21]>1e-35?-.02536204329245056:e[155]>1e-35?.01626198918750622:e[142]>1e-35?-.029262265693304763:e[4]>1.8688348091416842?e[48]>1e-35?-.0522966414357639:e[47]>1e-35?-.03867213359133592:e[149]>1e-35?-.10392339919606915:e[135]>1e-35?-.010541433982611018:e[51]>1e-35?-.06273170107556418:e[54]>1e-35?-.08769404750229767:e[18]>1e-35?e[1]>1e-35?.0022966362330231133:e[31]>1e-35?.19571528454816625:-.04919246049942885:e[50]>1e-35?-.06766114512966344:e[7]>.9793410316570949?.00837983401462093:.0007986280224776339:e[186]>1e-35?-.16446174535054356:e[62]>1e-35?.06508947502037822:-.010260699234562241:e[6]>5.486867329823672?e[140]>1e-35?-.01589822136096899:e[125]>1e-35?-.025465846683560996:e[190]>1e-35?-.03671457167643481:e[91]>1e-35?-.03821691103237143:e[57]>1e-35?-.07502589184745939:e[50]>1e-35?-.05395522531288487:.005241788285288346:e[4]>3.1132683346437333?-.008741587825172916:e[12]>1e-35?e[100]>1e-35?.06608964318040904:-.012827641806975033:.004744161815471635,ee=e[4]>.8958797346140276?e[2]>5.4049245766661995?e[5]>6.0051201133541365?-.008352440702113342:.00818161196788124:e[123]>1e-35?-.02387242845183433:e[190]>1e-35?-.03574127589374163:e[152]>1e-35?.01262147105943106:e[11]>1e-35?e[58]>1e-35?-.05955906348417553:-.003717083835106387:e[6]>6.0026509725338455?e[15]>1e-35?e[30]>1e-35?.023589988800048537:-.01290090410411923:e[38]>1e-35?.015295369946508892:e[1]>1e-35?e[4]>2.740319461670996?e[22]>1e-35?-.01614208413608714:e[42]>1e-35?-.05454658382875832:.008894057269932708:e[141]>1e-35?-.029660896741885025:.0007918628584206305:e[12]>1e-35?.010735865892076339:e[218]>1e-35?.06499398466334683:e[29]>1e-35?-.02987220407530282:e[118]>1e-35?-.05994319680494358:-.0022119035344297464:e[113]>1e-35?e[24]>1e-35?.09992180359591052:.003953091072683087:e[204]>1e-35?e[4]>2.249904835165133?.0012737346185997833:e[5]>3.979637980058199?.012350990163327259:e[29]>1e-35?-.4173182186315585:.09483857671510697:-.0034771114722081282:e[19]>1e-35?.04818172610227253:e[158]>1e-35?.09085872490042819:e[123]>1e-35?.046170414156546824:-.030833991141721785,te=e[0]>1e-35?e[2]>1.2424533248940002?e[2]>2.138333059508028?e[3]>1.4978661367769956?e[3]>4.197173680708697?-.015067858446918237:e[5]>3.979637980058199?.0025493966284458503:e[24]>1e-35?.10170949517680355:e[3]>2.3502401828962087?-.010182198776560389:e[7]>.9662372103242399?.0855616171705204:-.0044290837387121786:e[7]>.992067132663463?.006950766900495411:-.011703657118613042:e[3]>3.314020688089767?-.007590151825214328:.011931088318037653:e[5]>4.424828703319957?e[3]>1.4978661367769956?.003895993078605918:e[2]>1e-35?e[5]>5.859359688974663?.03311360926528595:e[7]>.9936484368123463?e[28]>1e-35?-.1296383065201116:e[18]>1e-35?-.2304238024287801:-.0007035160942990814:.03872938637191365:.05931958562003542:e[204]>1e-35?e[7]>.9926276364955392?-.2503820824196552:.01514980593659256:e[135]>1e-35?e[7]>.990877425524446?-.12146435764173391:.03579230653026111:e[125]>1e-35?-.11990587076136816:-.0017264106529335022:e[2]>.8958797346140276?e[3]>4.878999622893762?-.028006872909888104:e[17]>1e-35?.015327119563713427:e[14]>1e-35?.008966123864441086:e[24]>1e-35?.014884319812071584:-.0008180929266082377:e[29]>1e-35?e[5]>5.895778350950796?-.02927173520516398:.004256706136162408:-.0030692852485265805,re=e[39]>1e-35?-.019116728566000912:e[152]>1e-35?.011159312353677259:e[52]>1e-35?-.06556505864685434:e[7]>.14547530463198097?e[187]>1e-35?-.02203060071288757:e[48]>1e-35?-.03406851575382452:e[10]>1e-35?e[219]>1e-35?-.026242020752538932:-.0026163734864036088:e[21]>1e-35?-.016803181860075653:e[8]>1e-35?e[5]>3.0201273556387074?e[6]>4.722943345003718?e[125]>1e-35?-.07907862980413462:-.0024968534057976956:e[141]>1e-35?.01751368963010255:-.035334686232177996:e[3]>1e-35?-.049727650261844114:.06649006602788514:e[51]>1e-35?-.047051279496267896:e[58]>1e-35?e[19]>1e-35?.06794814379814933:-.033933057704283995:e[6]>8.681774988134558?-.001906867260604815:e[3]>3.3842466058243152?e[23]>1e-35?.029126145919054786:e[12]>1e-35?e[59]>1e-35?.06547842372312768:.005706402727440608:e[89]>1e-35?.05238448470974841:-.003970577798047124:e[141]>1e-35?e[3]>1e-35?-.02994666941636212:.029175297065511276:e[139]>1e-35?-.03926804943552878:e[7]>.9626084674797213?.010270060885238803:e[6]>4.5379471377116305?.0051640733904868355:-.006326617548806485:e[3]>2.3502401828962087?-.001064039369711557:-.015232776877478657,ne=e[4]>.8958797346140276?e[0]>1e-35?e[3]>3.540854293052788?e[138]>1e-35?.020620751195117866:-.007657642824282572:e[9]>1e-35?.013255738783000171:e[123]>1e-35?-.04553588467808997:e[14]>1e-35?.020257942633657516:e[17]>1e-35?.02379466680602821:e[7]>.26911173821332884?.004563013176326579:-.006044878247080096:e[208]>1e-35?e[1]>1e-35?.016583051243963785:-.005473696128326885:e[53]>1e-35?-.07392011100318682:e[3]>4.840234496705036?-.022277334024938686:e[49]>1e-35?-.04140311782670083:e[40]>1e-35?-.041278341040658334:e[156]>1e-35?-.01087788432462589:e[8]>1e-35?e[141]>1e-35?.032404890147508435:-.008762958389316138:e[153]>1e-35?e[18]>1e-35?.03064796696780178:e[19]>1e-35?.025912082684934896:e[7]>.9033253454895247?.00010665286308939541:-.019390651252802232:e[133]>1e-35?-.013215417920201165:e[35]>1e-35?-.07409193965805899:e[16]>1e-35?.010595288788401727:.0004445963442680354:e[19]>1e-35?.043800560164078434:e[62]>1e-35?.08440762960688118:e[123]>1e-35?.04196062757398021:e[44]>1e-35?e[7]>.9880960409521241?-.14025705728324367:.07605327900446729:-.030453882536033008,ie=e[14]>1e-35?e[134]>1e-35?.03807815059641535:.007895137847547357:e[39]>1e-35?-.019172673927560828:e[138]>1e-35?.009207480510332959:e[152]>1e-35?e[10]>1e-35?.029310247627617716:.006422126177312616:e[3]>3.5114340430413216?e[155]>1e-35?.02869511059037871:e[137]>1e-35?.048763707543632046:e[218]>1e-35?.0393143924208134:-.0065205942363783:e[4]>2.4414009612931857?e[113]>1e-35?.016047178137914484:e[35]>1e-35?-.09486179869071369:e[118]>1e-35?-.032706818831570415:e[0]>1e-35?.004733859562945298:-4345884264792552e-20:e[29]>1e-35?e[204]>1e-35?e[4]>2.3502401828962087?-.23804773582311067:.0015066742334155967:e[194]>1e-35?e[4]>1.7005986908310777?-.013296404682101122:-.14340192620927933:e[196]>1e-35?-.17446678790111786:-.01140535620661492:e[141]>1e-35?-.03362328403627273:e[99]>1e-35?.02082592497315901:e[196]>1e-35?.02125156827172031:e[204]>1e-35?.018738441981476887:e[194]>1e-35?.022230335367621302:e[114]>1e-35?.017460982004618885:e[210]>1e-35?e[11]>1e-35?-.07421933796695453:-.02600449772874995:e[62]>1e-35?.0435295764572802:-.0036358741919687645,oe=e[2]>4.749261159734808?e[5]>6.826002629905951?e[29]>1e-35?-.012866931871530748:e[47]>1e-35?-.06511122680099479:-.0033152297369715466:e[1]>1e-35?.00634942519508748:-.008516826211528918:e[6]>6.1537953943602615?e[11]>1e-35?e[121]>1e-35?e[1]>1e-35?-.06214080664476329:.037029947625630194:e[47]>1e-35?-.08203414630098728:-.0044122376347199765:e[15]>1e-35?e[30]>1e-35?.012452689013210465:-.011970977023212193:e[10]>1e-35?e[152]>1e-35?.02888624440861723:-.0026872248277927456:e[27]>1e-35?-.01471521834054285:e[21]>1e-35?-.014970363019863132:e[13]>1e-35?-.0057151868439017945:e[38]>1e-35?.01633003881478886:.005850603591179588:e[113]>1e-35?e[5]>3.979637980058199?.006600693642185256:e[6]>3.1984648276080736?.07576534772024612:-.013028252220942527:e[204]>1e-35?e[9]>1e-35?e[6]>3.9219243190762363?.01266221511189265:e[29]>1e-35?-.20167612409830682:.09361829582187109:.0016303497789744046:e[6]>4.310776603370241?-.0015960016142716584:e[141]>1e-35?e[2]>2.249904835165133?e[6]>2.970085626360216?-.05054316446311788:.06528096075929847:e[29]>1e-35?.07763431964140277:-.017239135292908336:-.011068823413100247,se=e[91]>1e-35?-.03524202222673902:e[55]>1e-35?-.07505808762820981:e[47]>1e-35?-.026314216162986376:e[49]>1e-35?-.045488810456426665:e[54]>1e-35?-.06424779605129435:e[0]>1e-35?e[39]>1e-35?-.03267263134559766:e[46]>1e-35?-.049285436356671077:e[51]>1e-35?-.09277060040547602:e[4]>.8958797346140276?e[123]>1e-35?-.027164727231258436:e[7]>.4232249052377311?e[14]>1e-35?.021561483416797714:e[9]>1e-35?e[58]>1e-35?-.08387877475105178:.014404401501386124:.004694473365260974:-.0001897538693116325:-.017140588284242805:e[5]>9.119594757170685?e[3]>2.740319461670996?-.0007153953072197825:-.010378474356201449:e[8]>1e-35?e[5]>3.276966702012906?e[125]>1e-35?-.06966241558514917:e[4]>4.82429765145367?-.05703428861212874:-.007549683006633188:e[3]>1.2424533248940002?-.05340556429257431:.0524214727387076:e[22]>1e-35?-.012756524179901607:e[186]>1e-35?-.06578146880564559:e[208]>1e-35?.011189277267677045:e[11]>1e-35?e[58]>1e-35?-.05051984734793551:e[3]>1.2424533248940002?-.0002576217567062796:e[134]>1e-35?-.07452351335236179:-.010366062496356129:e[94]>1e-35?-.04206673603732986:.0017654268359667174,ae=e[2]>2.3502401828962087?e[28]>1e-35?.018743416209068924:e[142]>1e-35?-.027628078748284907:e[4]>1.7005986908310777?e[123]>1e-35?-.039485087567133176:e[48]>1e-35?-.04707407726639779:e[49]>1e-35?-.0644727439161007:e[47]>1e-35?-.03586301268310228:e[52]>1e-35?-.08213761833929575:e[60]>1e-35?-.036939376764301805:e[22]>1e-35?-.02264827779335228:e[153]>1e-35?e[24]>1e-35?.03651632275248908:-.010403215174169965:e[18]>1e-35?e[31]>1e-35?.17011943799802248:-.024083374989820074:e[147]>1e-35?-.05792387046048145:e[39]>1e-35?-.019000152117179:e[54]>1e-35?-.09256681585621543:e[50]>1e-35?-.06535283940797192:e[187]>1e-35?-.023020538580498528:e[149]>1e-35?-.09670391878996044:e[8]>1e-35?e[6]>5.865049616265698?.0007122257672540384:-.024203929126070334:e[55]>1e-35?-.10687519344783902:e[21]>1e-35?-.019836359134795922:.0028141634686288143:e[153]>1e-35?-.044827592367532504:-.009894012855110334:e[140]>1e-35?e[18]>1e-35?.060584003745668275:-.015006980258423744:e[6]>5.161920636569023?e[125]>1e-35?-.021624709427283298:.0035264081894521636:-.0030260520850755417,ce=e[57]>1e-35?-.06665941268716478:e[2]>5.4049245766661995?-.0048763725607228565:e[17]>1e-35?.012937023835595996:e[91]>1e-35?-.032642493399923284:e[40]>1e-35?-.04355571234278559:e[14]>1e-35?e[217]>1e-35?-.030555708374197955:.010895997063478696:e[1]>1e-35?e[99]>1e-35?.016029829045206837:e[114]>1e-35?.017475123428921584:e[139]>1e-35?-.042037981483985604:e[210]>1e-35?e[29]>1e-35?.015395913258454092:-.024779051599098958:e[90]>1e-35?-.09436512907953146:e[25]>1e-35?-.0385103760507401:e[113]>1e-35?.014955995782471:e[208]>1e-35?.01363101947809469:.0004708078358576994:e[29]>1e-35?-.02567148566035587:e[217]>1e-35?.017896286118860596:e[118]>1e-35?-.04366196842115269:e[144]>1e-35?-.04332564222613586:e[54]>1e-35?-.08095356842154083:e[31]>1e-35?e[15]>1e-35?-.12797365603832508:.05407709367007049:e[56]>1e-35?.030874690971051524:e[148]>1e-35?-.06664437092250396:e[50]>1e-35?-.05710031053092695:e[114]>1e-35?e[18]>1e-35?-.12348764088627251:-.014081947133593207:e[147]>1e-35?-.044629298717173554:-.000742893245658901,le=e[138]>1e-35?.008266725465725232:e[1]>1e-35?e[37]>1e-35?-.06288072801700428:e[114]>1e-35?.01701875404216428:e[128]>1e-35?-.022207708344996902:e[113]>1e-35?e[24]>1e-35?.08078133512323216:.010126216487392538:e[11]>1e-35?e[58]>1e-35?-.0542116306120395:-.004962440421854299:e[155]>1e-35?e[30]>1e-35?.02107443326718807:-.01069225359959257:.0009105709984003484:e[218]>1e-35?.05160355321154702:e[134]>1e-35?.006114948378400552:e[121]>1e-35?.016106484014031797:e[89]>1e-35?.01912348851711998:e[56]>1e-35?.029777849606436514:e[157]>1e-35?.04060172642469715:e[31]>1e-35?.040190765597096945:e[115]>1e-35?.038285461163007885:e[144]>1e-35?-.04397941351839926:e[53]>1e-35?-.09153555712989248:e[34]>1e-35?.05063635650139542:e[145]>1e-35?-.05531793235403996:e[18]>1e-35?e[142]>1e-35?.050915836711889595:-.038668153033606156:e[142]>1e-35?-.03161888799270195:e[21]>1e-35?-.039152400008548416:e[147]>1e-35?-.06369054146375448:e[146]>1e-35?-.06687062048733548:e[143]>1e-35?-.0374398909044375:-.004075281311375503,ue=e[19]>1e-35?.011138060439416179:e[7]>.054053454943712505?e[17]>1e-35?e[30]>1e-35?.031458353209402545:.006712963530887799:e[135]>1e-35?-.008268741342836259:e[60]>1e-35?-.026373116795568554:e[7]>.8375851232899904?e[3]>2.602003343538398?e[6]>4.832297822126891?.001164103411669833:e[8]>1e-35?-.04419920795209664:-.007580602414427876:e[6]>3.417592293073651?e[6]>8.80963889693121?-.00653283113371423:e[8]>1e-35?e[125]>1e-35?-.10156793652811894:-.004200534838133274:e[18]>1e-35?-.01192673279840267:.007421951916920296:e[7]>.9626084674797213?e[29]>1e-35?e[6]>2.970085626360216?-.0032059430383565256:.05159315082197918:e[8]>1e-35?-.0890031715943104:e[22]>1e-35?-.16814104441488775:e[12]>1e-35?e[100]>1e-35?.1021284677424052:-.13655977142603173:.09393254504800182:-.0008030674521708154:e[153]>1e-35?e[18]>1e-35?.028570793527563892:-.01146507406243734:e[125]>1e-35?e[3]>1e-35?-.04344386283066575:.049543778722220704:e[47]>1e-35?-.025602694767462936:41633336342102227e-21:e[3]>2.3502401828962087?e[3]>3.3497501700808394?-.018924000087166926:.005374758944061522:e[14]>1e-35?.02825013192303339:-.028367959366723622,de=e[190]>1e-35?-.033259392758942484:e[4]>2.4414009612931857?e[123]>1e-35?-.030965448877928344:e[150]>1e-35?-.05353588365501967:e[53]>1e-35?-.07322459471644706:e[0]>1e-35?e[6]>6.9012339353508745?.007566110700214329:e[4]>3.0677824455408698?e[7]>.5242163672259389?e[8]>1e-35?e[6]>4.722943345003718?-.00508197369229565:e[4]>3.5694334999727624?-.09566908841488272:-.009799018561370653:e[29]>1e-35?.01134634874419129:-.008480456528154491:-.010775036248093376:.006611525544742429:e[23]>1e-35?.01761735039511882:e[19]>1e-35?.01278442042249664:-.0002242132003162585:e[186]>1e-35?-.1282956565830828:e[99]>1e-35?.018493666625505303:e[141]>1e-35?-.026024552608676074:e[29]>1e-35?e[5]>3.5694334999727624?e[217]>1e-35?.010089877008871859:e[7]>.9569480028661056?-.0021891593882122327:-.019455050281455402:e[7]>.960816451500545?-.13777176433158442:.02722608122697913:e[28]>1e-35?e[194]>1e-35?.09549833737461155:.012447932823540411:e[129]>1e-35?e[26]>1e-35?.147381625399948:-.03418523266130075:e[7]>.26911173821332884?.0014660191124088442:e[217]>1e-35?-.08282397562490618:e[210]>1e-35?-.0386848317545183:-.001892646396528824,pe=e[57]>1e-35?-.059790543460520464:e[55]>1e-35?-.06524069243313577:e[3]>4.283562780082224?e[37]>1e-35?-.054605342954169904:-.006343751747681404:e[17]>1e-35?.011961708215735271:e[40]>1e-35?-.04296088601962452:e[6]>1e-35?e[24]>1e-35?e[113]>1e-35?e[6]>4.460127707454046?-.026498922218692673:.10501477027016158:e[6]>4.03420147928485?.012792216148037112:e[7]>.9830997303909479?-.2271005546552327:-.008348690537914538:e[9]>1e-35?e[153]>1e-35?e[7]>.20588252599634785?-.004842123367456505:-.03575275485660392:e[99]>1e-35?e[1]>1e-35?.032397176999597294:-.0033271937210452387:e[204]>1e-35?.02154799118278769:.0034498877728340095:e[28]>1e-35?e[6]>3.0677824455408698?e[6]>5.5816130673839615?.01602715871650751:e[7]>.9901971344332651?e[194]>1e-35?-.21161676626091178:e[127]>1e-35?-.4024450297968636:-.030976570087232314:.0031980605341801454:.07943810970798848:e[135]>1e-35?-.00869354055420051:e[123]>1e-35?-.022241787113206086:e[62]>1e-35?.037165483434744594:e[7]>.04507521918085865?e[21]>1e-35?-.013433718654288605:e[155]>1e-35?.00919342834132915:-.0002729025327531227:-.012537468897218136:-.07894994665155514,he=e[4]>.8958797346140276?e[14]>1e-35?.007800140351631253:e[138]>1e-35?.007294945388686309:e[1]>1e-35?e[32]>1e-35?e[28]>1e-35?.09462192942805535:-.06376046128949985:e[37]>1e-35?-.06442220885770956:e[140]>1e-35?e[30]>1e-35?-.09261012186873348:-.015294712278584928:e[98]>1e-35?.019329173498247088:e[58]>1e-35?-.026405515460271967:e[5]>8.608586615680721?e[4]>2.602003343538398?6125118307170923e-20:-.009497787119169794:e[40]>1e-35?-.05491317248554455:e[7]>.30853255358841714?.003951848833690266:-.0021827028977256715:e[219]>1e-35?-.03918852409108207:e[98]>1e-35?-.025490621458423603:e[218]>1e-35?.04685239586600909:e[4]>2.970085626360216?e[152]>1e-35?.019288400231624092:e[132]>1e-35?.04845025214421127:e[157]>1e-35?.03681235344369351:e[18]>1e-35?-.034132162265456074:e[48]>1e-35?-.04861483835690636:e[142]>1e-35?-.031057400959951156:e[148]>1e-35?-.06903688486009983:-.004426858558248682:e[31]>1e-35?.06983425899920179:.002335587968443938:e[19]>1e-35?.04178364096434334:e[123]>1e-35?.03954255208630935:e[62]>1e-35?.07169067239737285:-.022094630155173406,fe=e[190]>1e-35?-.029705030481716018:e[2]>2.4414009612931857?e[125]>1e-35?e[3]>1e-35?-.052080713549693486:.015237248725743169:e[49]>1e-35?-.05738028956460733:e[28]>1e-35?.015629889576502864:e[14]>1e-35?.007178838639724632:e[217]>1e-35?.006873744757442591:e[3]>.8958797346140276?-.0009297977761919447:e[4]>2.740319461670996?-.0032588616048005344:e[209]>1e-35?-.09352716353634213:-.015820890219545396:e[0]>1e-35?e[2]>.8958797346140276?e[30]>1e-35?.019248760742983276:e[3]>2.861792550976191?e[6]>8.372051799062541?.011687619771455333:-.014380012538782239:.007119108038702808:e[5]>4.424828703319957?e[3]>2.249904835165133?-.004571416888569663:e[4]>.8958797346140276?e[2]>1e-35?.03291298609827498:.056149641245301286:e[6]>5.66469358412419?.03259771207074825:-.09357704176112766:e[135]>1e-35?e[4]>3.1132683346437333?e[4]>3.276966702012906?-.061655392996083594:-.32745698278768204:.05791789791717941:-.018505458368810124:e[2]>1.2424533248940002?.0026761409362875913:e[3]>1e-35?e[30]>1e-35?e[210]>1e-35?-.039544237504098204:-.00840469876565937:e[138]>1e-35?-.03964217397514852:-4.311139741723525e-7:e[5]>6.136645972583987?-.022772355719852342:.00817231129409795,ge=e[91]>1e-35?-.028069212077752072:e[2]>5.1209788959100075?e[25]>1e-35?e[4]>3.314020688089767?-.07374751231467579:-.012603466600012023:-.003323309316995181:e[0]>1e-35?e[2]>1.2424533248940002?e[11]>1e-35?-.008138434386494645:e[2]>1.8688348091416842?e[18]>1e-35?-.021752576521312197:e[142]>1e-35?-.03703704004008216:e[21]>1e-35?-.031901873695323615:.0007949433315561949:e[156]>1e-35?.04622194605125366:.007164185384903575:e[156]>1e-35?.05649230717257425:e[192]>1e-35?-.14560972428612223:e[144]>1e-35?-.0847860756426489:e[4]>.8958797346140276?e[2]>.8958797346140276?.009443385055723438:e[9]>1e-35?.0384706300742172:e[7]>.9738681190948303?e[7]>.9983480540068196?.03566002120217884:e[125]>1e-35?-.08601531943220733:e[28]>1e-35?-.07136595081940608:.005430826378707227:.026279964393698674:e[2]>.8958797346140276?.025916235406054845:-.05093685243097706:e[2]>.8958797346140276?e[4]>2.4414009612931857?e[22]>1e-35?-.018458649485324576:e[123]>1e-35?-.027048533130577097:e[9]>1e-35?.005768627348361876:.0011976274380886302:e[196]>1e-35?.024074476840894424:-.0040891042038809855:e[156]>1e-35?-.03722816735059365:-.004021663177778795,me=e[57]>1e-35?-.054174378986311306:e[55]>1e-35?-.05937408126377534:e[35]>1e-35?-.06355743050048665:e[52]>1e-35?-.049028563645544726:e[10]>1e-35?e[152]>1e-35?.023779508772836917:e[217]>1e-35?.00760039749111183:-.005758267779536595:e[6]>1e-35?e[50]>1e-35?-.03899686693288482:e[53]>1e-35?-.06158372699069763:e[19]>1e-35?.009506113370718208:e[154]>1e-35?-.021220440237800273:e[129]>1e-35?e[26]>1e-35?.12643307498280917:-.02322694568396696:e[49]>1e-35?-.03489161935560748:e[173]>1e-35?-.041310484369004336:e[116]>1e-35?-.026931019221510855:e[150]>1e-35?-.04336081700276943:e[46]>1e-35?-.01503021840754708:e[21]>1e-35?-.011723313966476847:e[187]>1e-35?e[30]>1e-35?.029035482597327224:-.020238143126606493:e[22]>1e-35?-.0092659038594408:e[6]>8.954867306462836?-.002270298325316596:e[25]>1e-35?e[1]>1e-35?e[152]>1e-35?.025059955137215612:-.058962720741665454:4061285457160542e-20:e[7]>.787025207541384?.0045073893285534905:e[156]>1e-35?-.00956127321029558:e[153]>1e-35?-.006428735642845697:.0020065887307204903:-.07142994726664682,ye=e[190]>1e-35?-.026482483927372538:e[11]>1e-35?e[153]>1e-35?-.019448665116575673:e[46]>1e-35?-.046207503035123526:e[143]>1e-35?-.060693025841649276:e[125]>1e-35?-.0635615784828548:-.0020226769939179086:e[10]>1e-35?e[152]>1e-35?.021657999498329004:e[217]>1e-35?.006867901248533881:e[186]>1e-35?-.17526174685635476:e[7]>.3736576099860928?e[125]>1e-35?-.06860813037660739:-.0030373931794416857:e[153]>1e-35?-.036659407900460406:-.009138716679401575:e[8]>1e-35?e[141]>1e-35?.022488528656368925:-.004824813956579289:e[155]>1e-35?e[29]>1e-35?-.0923825728762917:.013279779321478072:e[13]>1e-35?e[29]>1e-35?-.02015430689927317:-.0014075476679032272:e[21]>1e-35?-.010052866682366596:e[15]>1e-35?e[127]>1e-35?-.11613127921904604:-.004425492436566155:e[61]>1e-35?-.04761391619756717:e[38]>1e-35?.010790742168686546:e[138]>1e-35?e[25]>1e-35?-.03936956646884221:.012187893435100131:e[18]>1e-35?e[46]>1e-35?.052404637972043124:e[29]>1e-35?e[219]>1e-35?-.026128288926960785:.01402455905339408:-.018095204676971146:.002238241111198228,ve=e[3]>4.993822430271426?-.021704560089024494:e[39]>1e-35?-.012978601337522922:e[57]>1e-35?-.04850734344953324:e[190]>1e-35?-.02323817835232452:e[55]>1e-35?-.054265924680079236:e[144]>1e-35?-.020797331827991154:e[52]>1e-35?-.04407078296749134:e[50]>1e-35?-.03531075513550682:e[14]>1e-35?e[217]>1e-35?-.02603818360896512:.00845420085528292:e[90]>1e-35?e[3]>3.5114340430413216?.010289606334961197:-.10259966877314837:e[139]>1e-35?-.01903913128660918:e[17]>1e-35?e[30]>1e-35?.027295226228104732:e[38]>1e-35?.036847447575421244:e[3]>2.861792550976191?-.016454620470329126:.010475083165212631:e[19]>1e-35?.008675111927467:e[40]>1e-35?-.036362054443170776:e[9]>1e-35?.0031294075955568394:e[123]>1e-35?-.02131953072683769:e[24]>1e-35?e[113]>1e-35?e[3]>2.602003343538398?-.005045224468848018:e[3]>2.3502401828962087?.1006727710215487:-.21606952724358763:e[209]>1e-35?-.07903381656359819:.0099843967860757:e[28]>1e-35?.009909672751437115:e[155]>1e-35?e[3]>3.941534675652877?.04961274235179155:.005113567009198253:e[158]>1e-35?.031566828492110836:-.0012534895812835874,_e=e[4]>2.4414009612931857?e[123]>1e-35?-.022743199998420272:e[47]>1e-35?-.02199867034393067:e[3]>3.238486181444842?e[155]>1e-35?.015256601991879549:e[23]>1e-35?.01997791344831838:e[97]>1e-35?.024977281654938052:e[218]>1e-35?.031730655567930977:e[32]>1e-35?e[1]>1e-35?-.05855958691798028:-.009630189044251312:e[195]>1e-35?-.009842090802252708:e[125]>1e-35?-.030084333742373532:-.0009935375527704107:e[135]>1e-35?-.006040875366017567:e[43]>1e-35?-.03616920022546756:e[44]>1e-35?-.014787601622259254:e[0]>1e-35?.005949240867095038:.0018435357767462809:e[141]>1e-35?e[3]>1e-35?-.030610116678182732:.01960307197844505:e[3]>1.2424533248940002?e[101]>1e-35?-.04366907994393087:e[28]>1e-35?e[194]>1e-35?.0927536258129216:.00806369969474508:e[198]>1e-35?.03402296877725087:-.00033907517363096143:e[194]>1e-35?e[19]>1e-35?-.16957712930341856:e[28]>1e-35?-.2078243840685859:-.01982072284112783:e[134]>1e-35?-.059093837808976674:e[155]>1e-35?-.11429749518431415:e[1]>1e-35?e[123]>1e-35?.04159085402090426:-.0053579302271092874:-.038428527597709254,be=e[2]>2.249904835165133?e[53]>1e-35?-.09149569302330776:e[142]>1e-35?-.020143603866796752:e[29]>1e-35?e[1]>1e-35?e[4]>2.740319461670996?e[0]>1e-35?-.005838073295705989:.0025448179376697196:e[217]>1e-35?.010391363152324442:e[6]>3.9219243190762363?e[7]>.9546729796082215?.00016709708501075782:-.019274537854809464:e[7]>.9717523368299734?e[2]>4.848108675189105?.0038332904395533517:e[141]>1e-35?e[6]>3.0677824455408698?-.12592300140122323:-1.2073741246841418:-.17682453022795175:-.004373737265888883:-.032810714691009164:e[18]>1e-35?-.024280045660709612:e[156]>1e-35?-.023509654115095334:e[1]>1e-35?e[141]>1e-35?-.032438707623116556:e[32]>1e-35?-.061272201063817755:.004415514992097752:-.0017176659108089432:e[0]>1e-35?e[6]>6.288787065535392?e[2]>.8958797346140276?.008680085548304642:e[29]>1e-35?.03767506445697859:-.0007537359215762705:e[4]>.8958797346140276?.0002799056937607271:-.039667032027283916:e[2]>1.2424533248940002?.002506908961838236:e[29]>1e-35?e[7]>.950335336459789?.0027367426972748597:-.021265206402010337:e[30]>1e-35?e[210]>1e-35?-.03496264625173957:-.007705718616493613:e[138]>1e-35?-.035840689909527164:.0006855012949462712,we=e[2]>5.418317700738354?e[5]>6.0051201133541365?e[156]>1e-35?-.024776046248283234:-.004761578172448051:e[8]>1e-35?-.025343070913887773:.012224469039913016:e[150]>1e-35?-.04079051452350429:e[10]>1e-35?e[152]>1e-35?.019743419118584654:e[186]>1e-35?-.15575093795294756:e[217]>1e-35?.0056968023991711995:-.004356449942923164:e[5]>6.0051201133541365?e[125]>1e-35?-.01597803134795572:e[151]>1e-35?-.05058454115923059:e[50]>1e-35?-.03619853041443809:e[49]>1e-35?-.03261722685392842:e[24]>1e-35?.011909155984778505:e[2]>2.012675845367575?.0004933624031973823:e[219]>1e-35?.015579421213152617:.002812703494519415:e[113]>1e-35?e[24]>1e-35?.09675188599473092:.0008025077587732017:e[204]>1e-35?e[9]>1e-35?e[5]>3.772694874805912?.02609533140492082:e[29]>1e-35?-.21256031284758028:.09442590919716193:-.004086903422513798:e[24]>1e-35?e[5]>3.979637980058199?-.011071875945121415:e[209]>1e-35?-.19367443751378252:-.04414838576908475:e[178]>1e-35?-.06538606241685795:e[100]>1e-35?e[5]>3.772694874805912?-.01294941588968201:e[5]>2.673553765358735?.08150000027300734:-.08989919051554107:-.0032151101072856354,Ce=e[35]>1e-35?-.05704221149718709:e[91]>1e-35?-.023832002943165256:e[102]>1e-35?.015441451551750014:e[3]>4.993822430271426?-.020159490027748073:e[4]>2.3502401828962087?e[144]>1e-35?-.022873219553742163:e[22]>1e-35?-.01287591196884623:e[47]>1e-35?e[18]>1e-35?.07657102696661595:-.0243921910773003:e[150]>1e-35?-.043982850497096056:e[138]>1e-35?e[25]>1e-35?-.03740348349716821:.008237493112057112:e[49]>1e-35?-.03254806921800082:e[53]>1e-35?-.057370285686186163:e[3]>4.085941003063911?e[37]>1e-35?-.04084726667137505:e[155]>1e-35?.0323666619020495:-.0038866525930422893:e[118]>1e-35?e[18]>1e-35?-.0975422096275863:-.014038224866250074:e[136]>1e-35?-.03199938604211209:.0014268928516615767:e[99]>1e-35?.018668567929263327:e[5]>7.334002872979111?e[156]>1e-35?-.05380541629812827:e[210]>1e-35?e[30]>1e-35?-.047112416583853595:.00900546030963941:e[208]>1e-35?.02334424121914086:e[158]>1e-35?.04595592178250823:-.006709820970668842:e[204]>1e-35?e[5]>3.772694874805912?.009489783712825852:e[3]>2.249904835165133?.09999429949553015:-.03961464289941561:-.001190853283470586,Ee=e[39]>1e-35?-.011391872842603505:e[190]>1e-35?-.021093147889461955:e[51]>1e-35?e[18]>1e-35?.08723256651643213:-.04233732133209843:e[19]>1e-35?.008078856044745801:e[4]>.8958797346140276?e[60]>1e-35?-.022165860715145688:e[129]>1e-35?e[3]>3.314020688089767?.019990677612126993:-.035520772730423776:e[153]>1e-35?e[2]>.8958797346140276?-.006946377120973384:e[0]>1e-35?e[8]>1e-35?e[5]>5.692045796563381?.04230611914121616:-.1152833284663223:.03987788751961305:-.02748865099804465:e[46]>1e-35?e[18]>1e-35?.047655531405650486:-.022707509947190632:e[18]>1e-35?e[3]>.8958797346140276?e[31]>1e-35?.1425984397283696:e[143]>1e-35?.05597721538261218:-.02117927246804007:.011077153043550766:e[143]>1e-35?-.0158979963012007:e[187]>1e-35?e[30]>1e-35?.02515771028113912:-.019084229614362958:e[49]>1e-35?e[1]>1e-35?.014623537050735559:-.05320125987679328:e[58]>1e-35?e[3]>3.1132683346437333?.021421346835282216:-.03287702034784505:e[16]>1e-35?.008645735809593434:e[3]>4.993822430271426?-.01889537207927676:.00131546333396141:e[153]>1e-35?-.09822789507794744:-.010292962989428067,Te=e[11]>1e-35?e[156]>1e-35?e[4]>3.1132683346437333?-.009153166060719259:-.035386636811765286:e[58]>1e-35?-.03881024236774208:e[153]>1e-35?e[7]>.12645023619128054?-.01286680669029116:-.0573874491021103:e[3]>3.276966702012906?e[38]>1e-35?-.03084033316462023:-.00517175216868761:e[195]>1e-35?.01773824295809578:e[131]>1e-35?-.17828043850421407:.0005554487984838318:e[7]>.14547530463198097?e[105]>1e-35?-.018589129226123456:e[116]>1e-35?-.0227108777687536:e[24]>1e-35?.009520152980411787:e[135]>1e-35?-.004364970908897872:e[0]>1e-35?e[18]>1e-35?-.015737703364129243:.003711277180349787:e[12]>1e-35?e[4]>3.540854293052788?e[155]>1e-35?.04655165952772795:.009321761971665682:e[210]>1e-35?.018839890489201528:e[129]>1e-35?-.03111680952187252:.0002649813454447912:e[23]>1e-35?.014110539528977999:e[109]>1e-35?.014168740682742625:-.0008607565404007093:e[3]>2.3502401828962087?e[9]>1e-35?e[4]>3.3842466058243152?-.004252607769147212:.02017003996344357:e[16]>1e-35?.01594899805169211:-.006372071796745688:e[12]>1e-35?-.0251011457777017:e[121]>1e-35?-.07822588279288774:-.005026529762858,Se=e[7]>.8375851232899904?e[155]>1e-35?e[3]>1.2424533248940002?.014982109981371684:-.08302064203662592:e[3]>2.602003343538398?e[125]>1e-35?-.02862612402789537:-.0004831913476108919:e[42]>1e-35?-.08030278175390543:e[90]>1e-35?-.11931838045625616:.003328726909052652:e[125]>1e-35?e[3]>1e-35?-.03347653784336098:.0381767649776156:e[3]>2.4414009612931857?e[3]>3.1132683346437333?e[137]>1e-35?.04078434374172937:e[130]>1e-35?.04811471469938318:e[152]>1e-35?.012079515899716571:e[23]>1e-35?.017817807971301534:e[122]>1e-35?.049338146544587284:e[115]>1e-35?.026905923036994708:e[10]>1e-35?-.008135082370740723:e[89]>1e-35?.023584069012120446:e[95]>1e-35?.013988944683250695:-.002584756192745314:e[139]>1e-35?-.04454469703180858:e[99]>1e-35?e[3]>2.524928003624769?.010620580427538877:.047779724434429495:e[131]>1e-35?-.08155143867377633:.0031488702256745843:e[7]>.06275229375044648?e[99]>1e-35?.016956254821045937:e[90]>1e-35?-.11685880917620971:e[210]>1e-35?e[11]>1e-35?-.040607887814632475:-.006287900824728332:-.0018997472673294537:e[14]>1e-35?.02358706984105576:-.01737075534918072,xe=e[6]>1e-35?e[2]>5.4049245766661995?e[5]>6.441743353550561?e[29]>1e-35?e[4]>2.673553765358735?-.007517267159018327:-.02379463821120899:-.0026543290628044274:e[8]>1e-35?-.022865480180725452:.009005117181880752:e[6]>5.161920636569023?e[0]>1e-35?e[2]>.8958797346140276?e[2]>2.012675845367575?e[3]>2.3502401828962087?.0021573820428423146:-.0046125093600082965:e[3]>3.314020688089767?-.005566488595229649:e[6]>6.288787065535392?.012796965207082116:-.0023971957228440767:e[3]>2.249904835165133?e[2]>1e-35?-.0003832411399288501:e[1]>1e-35?-.03148874544425103:-.3158553329522586:e[2]>1e-35?.025981575700247922:.052944809618023905:e[6]>8.681774988134558?e[3]>2.970085626360216?-.0005280655103032829:-.009402467452152188:e[2]>.8958797346140276?.0018798828715775142:e[3]>1.7005986908310777?-.0002583719758369029:-.014467497542301198:e[128]>1e-35?-.03075061856353219:e[3]>3.0201273556387074?e[8]>1e-35?-.03107874404542307:-.0063178690978266385:e[113]>1e-35?e[24]>1e-35?.10168122236339333:.0027676566086997536:e[100]>1e-35?e[3]>1.4978661367769956?-.019182725682091863:e[3]>1.2424533248940002?.10007959215270637:-.049901874168813753:e[12]>1e-35?-.008354674563617942:.000556773623388255:-.06338083699889271,ke=e[14]>1e-35?e[5]>7.841296344941067?e[217]>1e-35?-.03452197748259044:e[141]>1e-35?-.05526745933972476:.003096257901065188:.013468654879205778:e[90]>1e-35?-.04633994478668718:e[7]>.04507521918085865?e[39]>1e-35?-.011427282692256308:e[188]>1e-35?-.11824461537515621:e[17]>1e-35?e[5]>3.276966702012906?.009014346731620665:-.10784986305366669:e[102]>1e-35?.014356846380168074:e[109]>1e-35?.0100955463134877:e[31]>1e-35?.025672511171270042:e[127]>1e-35?-.10904631172619624:e[19]>1e-35?.007015456473363717:e[60]>1e-35?-.02409044800892067:e[217]>1e-35?e[7]>.9914949911911836?.02334115299069277:e[1]>1e-35?-29013080593250377e-21:.014307421165143329:e[1]>1e-35?e[42]>1e-35?-.06673983904970003:e[37]>1e-35?-.05636396687178933:e[32]>1e-35?-.042854874962508754:e[140]>1e-35?-.014546243613252019:e[119]>1e-35?.02592806792359847:.0008331579108247542:e[12]>1e-35?.004348565717870661:e[195]>1e-35?-.016064193157584304:e[210]>1e-35?-.01896835246692864:e[122]>1e-35?.06415669138405272:e[219]>1e-35?-.03191239858069586:-.0022170295258555585:-.00965022020696389,Ie=e[55]>1e-35?-.04649484416236924:e[6]>1e-35?e[35]>1e-35?-.04814595674860986:e[173]>1e-35?-.030965289355370126:e[190]>1e-35?-.01892908615035444:e[50]>1e-35?-.03023310323845746:e[14]>1e-35?e[134]>1e-35?.029102388421738776:e[217]>1e-35?-.021829759931582565:.005209049556942947:e[90]>1e-35?e[3]>3.276966702012906?.007482519637019732:e[28]>1e-35?.08823476156200263:-.1134870648564767:e[17]>1e-35?e[5]>3.156774023138548?e[3]>2.861792550976191?e[134]>1e-35?.037573808092493166:-.008120569804875069:.015185866424900767:-.10150107137017012:e[39]>1e-35?-.011108691883331833:e[4]>2.4414009612931857?e[123]>1e-35?-.019406534412652932:e[22]>1e-35?-.011646225036274034:e[118]>1e-35?e[1]>1e-35?.007977856608752276:-.038946271309380914:.0009257226566265858:e[101]>1e-35?e[6]>5.769881059461895?-.06484570063989317:.016294764421436982:e[29]>1e-35?e[204]>1e-35?e[5]>5.859359688974663?.036329398743295674:-.20474934656494398:e[4]>1.7005986908310777?-.0005630875641286038:e[5]>3.5694334999727624?e[19]>1e-35?.03322386202318951:-.01687696637036405:-.10533305728771972:-.0004901077590279651:-.05758869249681345,Ae=e[57]>1e-35?-.043478488738181505:e[53]>1e-35?-.05188532777589009:e[11]>1e-35?e[156]>1e-35?-.01733439245316815:e[58]>1e-35?-.03508850349398082:e[134]>1e-35?e[38]>1e-35?e[3]>3.156774023138548?-.02641618586067251:.0053883499998111746:-.04111067521339709:e[46]>1e-35?-.03960880739147387:e[56]>1e-35?.02833430038101972:e[3]>4.548585836935273?-.028156779064728323:-.0006287807275955149:e[105]>1e-35?-.018589321466431944:e[187]>1e-35?e[30]>1e-35?.021938681282791916:-.016917430307970042:e[7]>.015258684697466883?e[132]>1e-35?.026815659384164206:e[204]>1e-35?e[7]>.992067132663463?-.010565408217521758:e[7]>.9738681190948303?e[9]>1e-35?e[30]>1e-35?.09345774314045512:-.003460687191126055:.009778848673591349:.006207652194161698:e[134]>1e-35?e[14]>1e-35?.026940863472122597:.004032635910042969:e[16]>1e-35?e[156]>1e-35?-.014571620220052964:e[219]>1e-35?.03394257525872151:e[189]>1e-35?-.16441255476933125:.006890416623408193:e[7]>.5866799179067689?e[156]>1e-35?e[9]>1e-35?-.002374233797129139:.015343494638416642:.0007085956801478842:-.0014226167854637043:-.014931890774210171,Pe=e[52]>1e-35?-.040552145534119004:e[88]>1e-35?-.11616238297789526:e[147]>1e-35?e[21]>1e-35?.08405882357263977:-.028120036866471673:e[89]>1e-35?.013417411709807947:e[138]>1e-35?e[25]>1e-35?-.03104795267483152:e[8]>1e-35?-.013793892541819341:.007067793368543704:e[3]>4.212100162283537?e[37]>1e-35?-.04169781427571004:e[59]>1e-35?.039366779099462186:e[190]>1e-35?-.0746572875957972:-.0046665287028623895:e[31]>1e-35?e[3]>3.3497501700808394?-.015043885860062665:.04427790295514171:e[127]>1e-35?-.09222397003880911:e[188]>1e-35?-.11791399942046604:e[116]>1e-35?-.022670774074606673:e[21]>1e-35?e[118]>1e-35?-.08590814127371893:-.009079159755287763:e[10]>1e-35?e[153]>1e-35?e[7]>.12025037553499339?-.010834658570263708:-.06942979142484561:e[59]>1e-35?-.0368654965105411:e[186]>1e-35?-.13585047638050318:-.001475385731000911:e[11]>1e-35?e[47]>1e-35?-.07021793045868131:e[58]>1e-35?-.03264322466138671:e[153]>1e-35?e[7]>.4982752029697964?-.000719771928860618:-.02550581685370434:-.001300530189452872:e[216]>1e-35?-.04553949138490546:.0013445292966782988,Re=e[152]>1e-35?.005642349825665321:e[108]>1e-35?e[1]>1e-35?.012759171568581189:-.0015650437871311187:e[102]>1e-35?.012533880283367552:e[10]>1e-35?e[4]>1.4978661367769956?e[7]>.9888588760569341?.007453521083396632:-.0036225862281260785:e[3]>.8958797346140276?-.0027177080775155366:e[5]>5.782284349061034?-.04454373321655838:.021964247026786614:e[11]>1e-35?e[47]>1e-35?-.06196070580382676:e[121]>1e-35?e[1]>1e-35?-.06122312462911518:e[7]>.3847172300624272?.03518239795956787:e[3]>2.4414009612931857?.006811972713764457:-.0933556055347465:e[5]>4.938058177869999?-.004012086267764631:.01930669434547199:e[5]>6.0051201133541365?e[27]>1e-35?-.012304580143719986:.0013650712455989071:e[3]>2.802901033147999?-.0083470520183599:e[7]>.5811983411966435?e[7]>.990877425524446?e[219]>1e-35?e[3]>1e-35?.06211865200552023:e[17]>1e-35?.06775644666502018:-.06866304616688222:e[217]>1e-35?.059656960273077646:-.004328630560280456:e[204]>1e-35?e[4]>2.249904835165133?.006371564018556469:e[3]>2.138333059508028?.09486061534469152:-.09409330595635478:e[4]>2.602003343538398?.011308844028341723:e[100]>1e-35?.0439316487073224:-.003403233436702135:-.00960652384005499,Ne=e[144]>1e-35?e[18]>1e-35?.07197995497453837:e[1]>1e-35?-.001274320993832369:-.040032546534329444:e[52]>1e-35?e[18]>1e-35?.09098124993319018:-.04537404774072243:e[40]>1e-35?-.02515534903180516:e[53]>1e-35?-.04736675675905027:e[178]>1e-35?-.021374380471858013:e[55]>1e-35?-.04240162360893064:e[51]>1e-35?e[18]>1e-35?.07999652271774131:-.036649228565504045:e[109]>1e-35?.009067075019741765:e[54]>1e-35?e[1]>1e-35?.019160818735605257:-.05967997790089002:e[35]>1e-35?-.043420689526233285:e[173]>1e-35?-.027561163630755333:e[190]>1e-35?-.016370101115869642:e[14]>1e-35?e[217]>1e-35?-.019735056448517897:e[141]>1e-35?-.028090004807030017:.006865378253320941:e[139]>1e-35?e[1]>1e-35?-.032389864623829076:.005458607214221278:e[60]>1e-35?-.019089857559617188:e[153]>1e-35?e[18]>1e-35?.015189336996079859:e[19]>1e-35?.013745154147527805:e[1]>1e-35?-.005284271350108698:-.0374184512092477:e[18]>1e-35?e[99]>1e-35?-.0595395395199616:e[100]>1e-35?-.09991342902311327:-.0042488091801234805:.0006682804828197052,Oe=e[46]>1e-35?-.012191380765172536:e[88]>1e-35?-.10266216005056819:e[91]>1e-35?-.018445844031974568:e[50]>1e-35?-.027431707051961525:e[144]>1e-35?e[7]>.9945060383544003?.03614842925379388:-.02095650990295711:e[4]>2.4414009612931857?e[123]>1e-35?e[3]>3.0201273556387074?-.01053451990903616:-.05114195197878968:e[16]>1e-35?.007316468830803533:e[9]>1e-35?.003316750172048933:860911526134492e-20:e[141]>1e-35?e[3]>1e-35?-.02547358042212171:.019472890771357998:e[186]>1e-35?-.09288424685816356:e[41]>1e-35?-.1310231930206974:e[42]>1e-35?-.056216247465863484:e[29]>1e-35?e[5]>3.5694334999727624?e[134]>1e-35?-.054747915129536466:e[1]>1e-35?e[131]>1e-35?-.16815706432319097:-.002818043413853223:-.041951940639575136:e[7]>.960816451500545?e[219]>1e-35?.10052885656939581:-.11599835225683999:.029922858316313545:e[101]>1e-35?e[5]>7.429817490674132?-.06576516230122952:-.0008540865426696243:e[210]>1e-35?e[114]>1e-35?.013062456952379193:e[7]>.7267616382562012?.0022613700798703854:-.03938763940013096:e[59]>1e-35?e[12]>1e-35?.008501036224046256:-.06542467236134167:.002585754319607976,Le=e[28]>1e-35?.008779900390406317:e[7]>.9880960409521241?e[8]>1e-35?-.008991654120695218:e[3]>1e-35?e[140]>1e-35?-.02731072195122447:.002008744895602654:e[217]>1e-35?.02359361264236281:.007024522001417586:e[2]>2.138333059508028?e[3]>2.4414009612931857?e[125]>1e-35?-.04199133736767654:e[47]>1e-35?-.027561033349225085:e[3]>4.085941003063911?e[12]>1e-35?.007807873722550442:e[152]>1e-35?.030689318204494505:e[137]>1e-35?.06699720359975746:-.010441301216813357:e[118]>1e-35?-.03153852460438172:e[48]>1e-35?-.03440026517387997:.0015296602873888215:e[0]>1e-35?e[2]>6.607325405747152?-.027110120892630915:e[153]>1e-35?-.017016088064422574:-.005723165911539293:e[187]>1e-35?-.031718114891806884:-.0005272212291525389:e[0]>1e-35?e[2]>.8958797346140276?e[46]>1e-35?-.09171631422683799:.003327268948098216:e[3]>2.3502401828962087?e[125]>1e-35?-.5887915327321841:e[2]>1e-35?-.006637502258168407:-.08424468641004934:e[125]>1e-35?-.06617256968162606:.028846174454930092:e[2]>1.2424533248940002?e[15]>1e-35?-.016616715415331784:.002680237807803091:e[3]>1e-35?-.0012589163812412535:-.015154395987664649,De=e[6]>9.286096980078398?e[4]>2.970085626360216?-.001155963563974424:-.011949331884445141:e[6]>6.3071868642287745?e[2]>5.150393035655617?-.0033183579364470086:e[11]>1e-35?-.0018887492076874403:e[169]>1e-35?-.09486398911649394:.0025252552927441433:e[4]>3.0677824455408698?e[7]>.09963982551990838?e[141]>1e-35?e[6]>3.314020688089767?.012137569190879735:.09584425242224671:e[8]>1e-35?e[7]>.987306237235768?e[2]>.8958797346140276?-.020817404206469048:-.06464699261956137:-.008121005894366425:-.002273798477153842:e[4]>3.5114340430413216?-.024199637055494112:-.0044500308011184275:e[12]>1e-35?-.00483411782477681:e[5]>3.156774023138548?e[8]>1e-35?e[5]>3.772694874805912?e[6]>3.795426061844291?.0013628724281773107:-.04205266437322089:e[141]>1e-35?e[4]>2.861792550976191?e[5]>3.417592293073651?-.15445392240959782:e[2]>2.970085626360216?-.5683130345409004:-1.2639522532467855:-.12861577169349267:-.08527127841498366:e[4]>2.4414009612931857?e[7]>.29163353806150266?.003881870206848933:.01474849027472377:e[18]>1e-35?e[219]>1e-35?-.07387984252991263:-.013089382916580447:-.0008129634296833813:e[3]>2.3502401828962087?e[2]>3.1132683346437333?.019943967048858428:-.04278248600927625:e[17]>1e-35?-.11809979934412335:.03777084692378827,Me=e[57]>1e-35?-.03805766278012468:e[6]>9.286096980078398?e[2]>3.725620842493839?-.010152097691926694:-.000726856757223527:e[25]>1e-35?e[4]>2.917405368531303?e[6]>4.226807104886684?e[5]>8.866229029069968?.016965184252348844:-.027524673351863413:-.09999982742666325:e[219]>1e-35?-.11642840619184194:e[6]>3.1984648276080736?.02202934385365115:-.0758508504188626:e[17]>1e-35?e[5]>3.276966702012906?e[3]>2.861792550976191?e[38]>1e-35?.03529859841404316:-.005442656204983076:.013832633319757828:-.07099090377505678:e[40]>1e-35?e[12]>1e-35?.020780509349314687:-.0412229778697227:e[178]>1e-35?e[6]>4.832297822126891?-.012751356404573045:-.07365946414911166:e[6]>1e-35?e[91]>1e-35?-.018973855754862178:e[31]>1e-35?e[3]>3.3497501700808394?-.019342018507399077:.04336755184633714:e[52]>1e-35?-.034601279556920723:e[53]>1e-35?-.04570921257037347:e[4]>2.4414009612931857?e[22]>1e-35?-.009909029766665835:e[88]>1e-35?-.13759996623650647:.0010774168904012999:e[90]>1e-35?-.09942790916464699:e[5]>8.17933999189099?-.006237804261380787:e[154]>1e-35?-.02869365685254793:e[41]>1e-35?-.11951308633255478:.0005720279396045617:-.05091927304878396,Be=e[2]>8.18910569469239?-.011281718118735835:e[2]>8.136957041085973?.007639929297282146:e[2]>6.178980383851587?-.006867711027875817:e[6]>4.5379471377116305?e[125]>1e-35?e[3]>1e-35?-.026657037414316055:.03822052894720058:e[89]>1e-35?.01442240494610187:.0005482931472826037:e[3]>2.970085626360216?e[8]>1e-35?-.04157937378268839:e[25]>1e-35?-.07438346384769444:-.007688780027797844:e[113]>1e-35?e[24]>1e-35?.10208422768618285:-.0025376848550412623:e[24]>1e-35?e[209]>1e-35?e[7]>.9738681190948303?-.18081467351794253:.06403272706376394:-.006045919721112658:e[100]>1e-35?e[3]>1.4978661367769956?-.034372452343283254:e[3]>1.2424533248940002?.10087241747333926:-.06270133551905664:e[12]>1e-35?e[209]>1e-35?.02872327658284419:-.012940407270969699:e[5]>3.276966702012906?e[8]>1e-35?-.02165149142042258:e[3]>2.249904835165133?.011522668417532612:-.005129494488342788:e[3]>2.3502401828962087?e[2]>3.1132683346437333?.018894357520732635:-.03443967069634786:e[19]>1e-35?e[0]>1e-35?.0868126244943877:e[2]>1.4978661367769956?e[194]>1e-35?-.16834554324370338:.08799302490518951:.007907573815540844:e[17]>1e-35?-.07843101628051594:.04322926522720053,Fe=e[7]>.987306237235768?e[8]>1e-35?e[5]>6.285066127789834?6536595256810364e-20:e[153]>1e-35?-.07687008855803332:-.015088524832702519:e[18]>1e-35?-.012556097563484098:e[217]>1e-35?e[5]>8.28387302567733?-.004574660978375117:.02566519458840368:.003837771337656032:e[28]>1e-35?e[194]>1e-35?e[29]>1e-35?e[5]>3.979637980058199?.04675774128546983:-.16922871147253024:e[5]>5.821564412917691?.017788548280824237:.101599048954043:e[5]>4.424828703319957?.009470487487627452:-.046977132290520585:e[95]>1e-35?.008579165333164537:e[204]>1e-35?e[7]>.9782662069407232?e[9]>1e-35?.0717824359443052:.01776258010455891:.003970948558978321:e[208]>1e-35?e[1]>1e-35?.012428835257375037:e[18]>1e-35?-.08152843296689005:-.0059907248803252305:e[109]>1e-35?.008117980905290326:e[89]>1e-35?e[1]>1e-35?-.08097766993639294:.014258345453663996:e[62]>1e-35?.025185598552042956:e[213]>1e-35?.01261362855232781:e[138]>1e-35?e[1]>1e-35?e[29]>1e-35?.004355449069502461:-.03327693117307522:e[29]>1e-35?-.024228224306581475:e[5]>5.244385543610066?.01690188327986934:-.02426164440751183:-.0016932467092565535,je=e[116]>1e-35?-.018106356667092538:e[24]>1e-35?e[113]>1e-35?e[5]>4.658699722134796?-.0289267666661116:.10225466717059267:e[5]>3.979637980058199?.007715497036238576:e[209]>1e-35?-.1596622066794057:-.02153459011172981:e[46]>1e-35?e[18]>1e-35?.044010040060630896:-.018791912393741998:e[39]>1e-35?-.008648992983623099:e[3]>4.993822430271426?-.01442291433054286:e[158]>1e-35?.023944934429097977:e[21]>1e-35?-.008731676115726167:e[51]>1e-35?e[18]>1e-35?.07015276907667169:-.03981801316250594:e[152]>1e-35?e[12]>1e-35?e[7]>.9811887196001154?.025342984951627335:e[56]>1e-35?-.039652717595259894:-.003499774006708361:e[4]>3.676220550121792?.026612369959601385:e[0]>1e-35?e[2]>2.012675845367575?.012259156005894655:.04466570041636591:.002369030228609974:e[50]>1e-35?-.02625338435100237:e[198]>1e-35?e[5]>3.156774023138548?e[4]>2.602003343538398?.004706524615587467:.03172381727140614:-.08877100979833137:e[19]>1e-35?e[156]>1e-35?.047690620764284854:.004980692597287184:e[188]>1e-35?-.10330323519600788:e[108]>1e-35?.006389080836282864:e[217]>1e-35?.0034861135133741716:-.0005184951270632008,Ue=e[150]>1e-35?-.03083355660591381:e[6]>8.681774988134558?e[0]>1e-35?.0032708551521722813:e[3]>2.970085626360216?-.0008773771112515323:-.008194765714031488:e[1]>1e-35?e[42]>1e-35?-.0544661644610188:e[114]>1e-35?.014743200719322279:e[25]>1e-35?-.03415156332118204:e[121]>1e-35?e[0]>1e-35?-.012241568524042012:-.08332027167107449:e[119]>1e-35?.02487058944439717:e[210]>1e-35?e[4]>2.602003343538398?.003409540133128587:e[7]>.985694415330804?.014360134818665793:-.029939754177999198:e[140]>1e-35?e[30]>1e-35?-.07017324311241228:-.00954038893956995:e[32]>1e-35?-.0321895511220355:.0018389054792352236:e[3]>.8958797346140276?e[138]>1e-35?.014210083256713822:e[3]>2.970085626360216?e[56]>1e-35?.03179391063657913:e[132]>1e-35?.044860161753142676:e[122]>1e-35?.056053352587009365:e[44]>1e-35?.011126140459263092:e[217]>1e-35?.015177735064648389:e[30]>1e-35?.00292550151642784:e[0]>1e-35?-.01370614277688821:-.00467240699644943:e[30]>1e-35?e[17]>1e-35?.06455607454604466:-.018525791968354337:e[127]>1e-35?.058525937257934674:.004550050432870272:-.024273015893662056,$e=e[57]>1e-35?-.03433295479723807:e[35]>1e-35?-.039185287251387806:e[2]>8.18910569469239?-.01005594457537474:e[2]>8.136957041085973?.006899889609485921:e[2]>5.6542404955442525?e[156]>1e-35?-.021428903659715646:-.003794036359277691:e[6]>4.3882378946731615?e[125]>1e-35?-.012625422706971806:e[0]>1e-35?e[2]>.8958797346140276?e[32]>1e-35?.024078606665492636:e[6]>6.9309832857755405?e[2]>2.012675845367575?.00015676395930232578:.008324926956588046:-.0031526636810443134:e[156]>1e-35?.053603289446623514:e[6]>5.912149824839399?.022861200347258755:e[128]>1e-35?e[9]>1e-35?-.44322676747225076:-.07989645752877887:.005736631305989689:e[6]>9.286096980078398?-.005302861539231229:e[133]>1e-35?-.011410750972764748:e[2]>1e-35?e[139]>1e-35?-.01695599188677891:e[12]>1e-35?e[129]>1e-35?-.029257180272820173:e[106]>1e-35?.03593102425808264:e[59]>1e-35?.03336711951593411:e[114]>1e-35?.021293721644930708:.0031644417228525465:e[140]>1e-35?e[2]>2.802901033147999?.005338088459754211:-.018863893195455395:e[59]>1e-35?e[20]>1e-35?-.2145461556048109:-.013833058686928565:.0010745795613665528:-.003974960846380726:-.004018386137909663,qe=e[55]>1e-35?-.038436881673730244:e[49]>1e-35?e[1]>1e-35?.013340924551504776:-.04038081752369706:e[135]>1e-35?e[17]>1e-35?.02160784630817418:e[6]>4.722943345003718?e[2]>3.9981586158983733?-.012347824466576033:-.000545766507983511:e[4]>3.0201273556387074?e[2]>1e-35?-.0252070573488502:-.13173630032620282:.009893647988200364:e[6]>1e-35?e[73]>1e-35?-.05384174968342247:e[52]>1e-35?e[1]>1e-35?.02326718288961822:-.04799167043714381:e[7]>.8453853180651066?e[4]>3.481121732133104?e[12]>1e-35?e[59]>1e-35?.061286381265316374:e[3]>3.481121732133104?.005424469650470853:e[6]>4.310776603370241?.014609485744972962:.06126754321077295:e[156]>1e-35?e[2]>8.898092196194755?-.2427431056579565:.018014774163852717:.0018695162213364096:e[61]>1e-35?-.07802947082997094:e[45]>1e-35?-.024426413301391545:e[140]>1e-35?e[4]>.8958797346140276?-.021126260874271455:e[6]>4.03420147928485?-.08415757514826445:e[3]>1e-35?.10708927158160722:-.24178647896179492:.0008522369825914582:e[218]>1e-35?.02373187641553724:e[57]>1e-35?-.04729470896114382:e[6]>4.135134555718313?-.00014270136560779048:-.007024429214918294:-.08338039048086893,He=e[72]>1e-35?.056415744834310104:e[102]>1e-35?.010312560108512227:e[109]>1e-35?.007457767681676636:e[208]>1e-35?e[4]>3.0677824455408698?e[18]>1e-35?-.06595581480202953:.0010087955639505731:.010976237400105874:e[4]>2.4414009612931857?e[123]>1e-35?e[2]>4.5900436644025815?-.05474288807524913:-.010369052951168002:e[47]>1e-35?e[18]>1e-35?.06670108938458437:e[20]>1e-35?.08555144132474565:-.021968528557862133:e[48]>1e-35?e[18]>1e-35?.06392608504748652:-.02321056177872842:e[54]>1e-35?-.03592967725793262:e[6]>5.519456907163478?.0008682946366782881:e[133]>1e-35?-.029370515479889298:e[4]>3.0201273556387074?-.004567764283497172:e[12]>1e-35?-.008355751724201374:e[113]>1e-35?.04158028065835193:.005544170962219649:e[141]>1e-35?-.01706283616408152:e[186]>1e-35?-.08075713781164345:e[196]>1e-35?e[4]>2.012675845367575?-.004591551989937031:e[4]>.8958797346140276?e[18]>1e-35?-.1239344826496822:.026355647530608275:-.07955511774996737:e[41]>1e-35?-.10181506412232362:e[42]>1e-35?-.0453542732395041:e[116]>1e-35?-.040407946567398226:e[158]>1e-35?.027239009428531448:-.002118967070037752,Ve=e[174]>1e-35?-.02339144841300339:e[173]>1e-35?-.02466576607302462:e[60]>1e-35?-.014400177078045:e[187]>1e-35?-.009580909976967153:e[6]>8.681774988134558?-.0018832004566674773:e[1]>1e-35?e[42]>1e-35?e[10]>1e-35?-.13287881120130746:-.03759084751116859:e[25]>1e-35?-.029737667621816583:e[119]>1e-35?.022639692376110337:e[98]>1e-35?.014991063146855506:e[195]>1e-35?e[6]>3.417592293073651?.008961268500787772:-.023240187732927162:e[61]>1e-35?e[7]>.428769371249852?-.08413653233956772:.0010489731231787087:e[140]>1e-35?e[3]>.8958797346140276?e[5]>4.855921334140645?e[44]>1e-35?-.009299863216357543:-.0613782065666655:-.06705655672927394:e[5]>3.772694874805912?.0008635593500817348:.08361268069705163:.001087642897550713:e[98]>1e-35?-.021712258264119783:e[3]>.8958797346140276?e[105]>1e-35?-.039681509263849626:e[195]>1e-35?e[18]>1e-35?-.07079074829049314:-.008109353986158243:e[210]>1e-35?e[18]>1e-35?-.10610285355896108:-.009292320249100847:e[157]>1e-35?.03507595269407085:e[97]>1e-35?.0249669535461336:e[48]>1e-35?-.027595291123779366:.0011643902717306173:-.0211420439263067,ze=e[138]>1e-35?e[1]>1e-35?e[42]>1e-35?e[3]>3.5114340430413216?-.022448598781455772:-.07031164685918086:e[2]>1e-35?e[2]>2.740319461670996?.00894455632762117:-.003454709734759444:e[0]>1e-35?.060858110677215166:-.03435493609374257:e[3]>2.602003343538398?e[2]>.8958797346140276?.0168978378983998:-.009237748165804088:-.016931758267026403:e[3]>4.424828703319957?-.005659352703826067:e[24]>1e-35?e[113]>1e-35?e[6]>4.460127707454046?-.023722482692479133:.10064484300766507:e[6]>4.03420147928485?.007526717802235146:e[209]>1e-35?e[4]>2.970085626360216?.11711852031495243:-.15067622815741855:-.011085192149895408:e[108]>1e-35?.0059255171206349135:e[19]>1e-35?e[156]>1e-35?.04454460743043898:e[37]>1e-35?-.14161163738926447:e[4]>1.4978661367769956?e[4]>1.7005986908310777?e[217]>1e-35?-.020705364221039385:.006460529078997639:e[0]>1e-35?e[98]>1e-35?.10347448218504114:-.04090123141769794:e[6]>5.636572136251498?-.001212671493834005:e[2]>1.8688348091416842?-.15821279618670178:-.03563734739460456:.027924859655082585:e[57]>1e-35?-.03743904649648422:e[35]>1e-35?-.0414066369468363:e[46]>1e-35?-.011240341460759123:-.0003091959047563666,Ke=e[14]>1e-35?e[5]>7.841296344941067?e[141]>1e-35?-.04382809259971909:e[217]>1e-35?e[4]>3.417592293073651?-.05008164665262682:.0007032387608254502:e[190]>1e-35?-.19371592847895003:.0017489801221668277:e[129]>1e-35?-.24591656603456258:.011026730387591234:e[72]>1e-35?.05658163433406649:e[90]>1e-35?e[4]>3.5114340430413216?.017141361021852975:e[28]>1e-35?.07243997319099477:-.08677988948169385:e[138]>1e-35?.0038201430289573884:e[23]>1e-35?e[4]>2.917405368531303?.014990462643385919:-.013592080985068531:e[217]>1e-35?e[4]>1.8688348091416842?.0022421195021632245:e[4]>1.2424533248940002?.03891295508085918:e[4]>.8958797346140276?-.08902318396862074:.02476911275463073:e[2]>3.1132683346437333?e[29]>1e-35?e[19]>1e-35?.023731839695418987:e[5]>7.366761104104307?e[4]>3.417592293073651?e[6]>6.633975895571033?e[8]>1e-35?.016171629088047517:e[134]>1e-35?.03196373735768742:-.006820341969572339:-.02712238491085242:-.016309188486296804:-.0019386576944297078:e[156]>1e-35?-.03079416196682616:e[123]>1e-35?-.020888866054988395:e[4]>3.238486181444842?-.0027078359220281674:e[141]>1e-35?-.029581214969996845:.002299670778244013:.0001804027795430786;const We=function(e){if(e<0){const t=Math.exp(e);return t/(1+t)}return 1/(1+Math.exp(-e))}(t+r+n+i+o+s+a+c+l+u+d+p+h+f+g+m+y+v+_+b+w+C+E+T+S+x+k+I+A+P+R+N+O+L+D+M+B+F+j+U+$+q+H+V+z+K+W+G+Q+J+Y+X+Z+ee+te+re+ne+ie+oe+se+ae+ce+le+ue+de+pe+he+fe+ge+me+ye+ve+_e+be+we+Ce+Ee+Te+Se+xe+ke+Ie+Ae+Pe+Re+Ne+Oe+Le+De+Me+Be+Fe+je+Ue+$e+qe+He+Ve+ze+Ke);return[1-We,We]}},63993:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.completionsFromGhostTextResults=void 0;const n=r(7057),i=r(52369),o=r(40702),s=r(35034);t.completionsFromGhostTextResults=function(e,t,r,a,c,l,u){const d=e.get(i.LocationFactory),p=a.lineAt(c);let h=t.map((e=>{let t,i="";if(l&&(e.completion=(0,s.normalizeIndentCharacter)(l,e.completion,p.isEmptyOrWhitespace)),e.completion.displayNeedsWsOffset&&p.isEmptyOrWhitespace)t=d.range(d.position(c.line,0),c),i=e.completion.completionText;else if(p.isEmptyOrWhitespace&&e.completion.completionText.startsWith(p.text))t=d.range(d.position(c.line,0),c),i=e.completion.completionText;else{const r=a.getWordRangeAtPosition(c);if(e.isMiddleOfTheLine){const r=a.lineAt(c),n=d.range(d.position(c.line,0),c),o=a.getText(n);t=e.coversSuffix?r.range:n,i=o+e.completion.displayText}else if(r){const n=a.getText(r);t=d.range(r.start,c),i=n+e.completion.completionText}else{const r=d.range(d.position(c.line,0),c);t=r,i=a.getText(r)+e.completion.displayText}}return{uuid:(0,n.v4)(),text:i,range:t,file:a.uri,index:e.completion.completionIndex,telemetry:e.telemetry,displayText:e.completion.displayText,position:c,offset:a.offsetAt(c),resultType:r}}));if(r===o.ResultType.TypingAsSuggested&&void 0!==u){const e=h.find((e=>e.index===u));if(e){const t=h.filter((e=>e.index!==u));h=[e,...t]}}return h}},54619:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDebounceLimit=t.GhostTextDebounceManager=void 0;const n=r(16905);class i{constructor(e){this.forceDelayMs=e,this.extraDebounceMs=0}}t.GhostTextDebounceManager=i,t.getDebounceLimit=async function(e,t){let r;if(await e.get(n.Features).debouncePredict()&&t.measurements.contextualFilterScore){const e=t.measurements.contextualFilterScore,n=.3475,i=7;r=25+250/(1+Math.pow(e/n,i))}else r=await e.get(n.Features).debounceMs();return(r>0?r:75)+e.get(i).extraDebounceMs}},40702:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getGhostText=t.completionCache=t.ResultType=t.ghostTextLogger=void 0;const n=r(44617),i=r(76679),o=r(7057),s=r(70140),a=r(83940),c=r(11661),l=r(39800),u=r(70769),d=r(16905),p=r(20190),h=r(5798),f=r(20039),g=r(47553),m=r(52031),y=r(598),v=r(86635),_=r(47917),b=r(24090),w=r(3591),C=r(71153),E=r(3883),T=r(65489),S=r(20913),x=r(52369),k=r(96817),I=r(54619),A=r(41749);var P;let R,N,O;async function L(e,r,n,i,o,s,a){t.ghostTextLogger.debug(e,`Getting ${s} from network`),n=n.extendedBy();const c=await async function(e,t){const r=await e.get(d.Features).overrideNumGhostCompletions();return r?t.isCycling?Math.max(0,3-r):r:(0,l.shouldDoParsingTrimming)(t.blockMode)&&t.multiline?(0,l.getConfig)(e,l.ConfigKey.InlineSuggestCount):t.isCycling?2:1}(e,r),p=(0,y.getTemperatureForSamples)(e,c),h={stream:!0,n:c,temperature:p,extra:{language:r.languageId,next_indent:r.indentation.next??0,trim_by_indentation:(0,l.shouldDoServerTrimming)(r.blockMode)}};r.multiline||(h.stop=["\n"]),r.multiline&&r.multiLogitBias&&(h.logit_bias={50256:-100});const g=Date.now(),v={endpoint:"completions",uiKind:m.CopilotUiKind.GhostText,isCycling:JSON.stringify(r.isCycling),temperature:JSON.stringify(p),n:JSON.stringify(c),stop:JSON.stringify(h.stop)??"unset",logit_bias:JSON.stringify(h.logit_bias??null)},_=(0,T.telemetrizePromptLength)(r.prompt);Object.assign(n.properties,v),Object.assign(n.measurements,_);try{const s={prompt:r.prompt,languageId:r.languageId,repoInfo:r.repoInfo,ourRequestId:r.ourRequestId,engineUrl:r.engineURL,count:c,uiKind:m.CopilotUiKind.GhostText,postOptions:h};r.delayMs>0&&await new Promise((e=>setTimeout(e,r.delayMs)));const l=await e.get(m.OpenAIFetcher).fetchAndStreamCompletions(e,s,n,o,i);return"failed"===l.type?{type:"failed",reason:l.reason,telemetryData:(0,A.mkBasicResultTelemetry)(n)}:"canceled"===l.type?(t.ghostTextLogger.debug(e,"Cancelled after awaiting fetchCompletions"),{type:"canceled",reason:l.reason,telemetryData:(0,A.mkCanceledResultTelemetry)(n)}):a(c,g,l.getProcessingTime(),l.choices)}catch(r){if((0,f.isAbortError)(r))return{type:"canceled",reason:"network request aborted",telemetryData:(0,A.mkCanceledResultTelemetry)(n,{cancelledNetworkRequest:!0})};if(t.ghostTextLogger.error(e,`Error on ghost text request ${r}`),e.get(u.UserErrorNotifier).notifyUser(e,r),(0,S.shouldFailForDebugPurposes)(e))throw r;return{type:"failed",reason:"non-abort error on ghost text request",telemetryData:(0,A.mkBasicResultTelemetry)(n)}}}function D(e,t){const r={...e};return r.completionText=e.completionText.trimEnd(),t.forceSingleLine&&(r.completionText=r.completionText.split("\n")[0]),r}t.ghostTextLogger=new h.Logger(h.LogLevel.INFO,"ghostText"),function(e){e[e.Network=0]="Network",e[e.Cache=1]="Cache",e[e.TypingAsSuggested=2]="TypingAsSuggested",e[e.Cycling=3]="Cycling"}(P=t.ResultType||(t.ResultType={})),t.completionCache=new s.LRUCache(100);const M=new a.Debouncer;function B(e,t,r){R=e,N=t,O=r}function F(e,r,n){const i=(0,s.keyForPrompt)(r.prompt),o=t.completionCache.get(i);o&&o.multiline===n.multiline?t.completionCache.put(i,{multiline:o.multiline,choices:o.choices.concat(n.choices)}):t.completionCache.put(i,n),t.ghostTextLogger.debug(e,`Appended cached ghost text for key: ${i}, multiline: ${n.multiline}, number of suggestions: ${n.choices.length}`)}function j(e,r){const n=t.completionCache.get(e);if(n&&(!r||n.multiline))return n.choices}function U(e,t,r){if(r.length>0){if(t.startsWith(r))return{completionIndex:e,completionText:t,displayText:t.substr(r.length),displayNeedsWsOffset:!1};{const n=t.substr(0,t.length-t.trimLeft().length);return r.startsWith(n)?{completionIndex:e,completionText:t,displayText:t.trimLeft(),displayNeedsWsOffset:!0}:{completionIndex:e,completionText:t,displayText:t,displayNeedsWsOffset:!1}}}return{completionIndex:e,completionText:t,displayText:t,displayNeedsWsOffset:!1}}function $(e,r){const n=r.requestId,i={choiceIndex:r.choiceIndex.toString()},o={numTokens:r.numTokens,compCharLen:r.completionText.length,numLines:r.completionText.split("\n").length};r.meanLogProb&&(o.meanLogProb=r.meanLogProb),r.meanAlternativeLogProb&&(o.meanAlternativeLogProb=r.meanAlternativeLogProb);const s=r.telemetryData.extendedBy(i,o);return s.extendWithRequestId(n),s.measurements.confidence=(0,C.ghostTextScoreConfidence)(e,s),s.measurements.quantile=(0,C.ghostTextScoreQuantile)(e,s),t.ghostTextLogger.debug(e,`Extended telemetry for ${r.telemetryData.properties.headerRequestId} with retention confidence ${s.measurements.confidence} (expected as good or better than about ${s.measurements.quantile} of all suggestions)`),s}function q(e,t,r,n,i){const o=Date.now()-n,s=o-i,a=r.telemetryData.extendedBy({},{completionCharLen:r.completionText.length,requestTimeMs:o,processingTimeMs:i,deltaMs:s,meanLogProb:r.meanLogProb||NaN,meanAlternativeLogProb:r.meanAlternativeLogProb||NaN,numTokens:r.numTokens});a.extendWithRequestId(r.requestId),(0,T.telemetry)(e,`ghostText.${t}`,a)}t.getGhostText=async function(e,r,a,u,h,f){const y=await(0,b.extractPrompt)(e,r,a);if("contextTooShort"===y.type)return t.ghostTextLogger.debug(e,"Breaking, not enough context"),{type:"abortedBeforeIssued",reason:"Not enough context"};if(f?.isCancellationRequested)return t.ghostTextLogger.info(e,"Cancelled after extractPrompt"),{type:"abortedBeforeIssued",reason:"Cancelled after extractPrompt"};const C=function(e,t){const r=(i=t,0!=e.lineAt(i).text.substr(i.character).trim().length),n=function(e,t){const r=t.lineAt(e).text.substr(e.character).trim();return/^\s*[)}\]"'`]*\s*[:{;,]?\s*$/.test(r)}(t,e);var i;if(r&&!n)return;return r&&n}(r,a);if(void 0===C)return t.ghostTextLogger.debug(e,"Breaking, invalid middle of the line"),{type:"abortedBeforeIssued",reason:"Invalid middle of the line"};const H=e.get(v.StatusReporter),V=e.get(x.LocationFactory),z=await async function(e,t,r,i,o,s){const a=await e.get(l.BlockModeConfig).forLanguage(e,t.languageId);switch(a){case l.BlockMode.Server:return{blockMode:l.BlockMode.Server,requestMultiline:!0,isCyclingRequest:o,finishedCb:async e=>{}};case l.BlockMode.Parsing:case l.BlockMode.ParsingAndServer:default:{const c=await async function(e,t,r,i){if(t.lineCount>=8e3)(0,T.telemetry)(e,"ghostText.longFileMultilineSkip",T.TelemetryData.createAndMarkAsIssued({languageId:t.languageId,lineCount:String(t.lineCount),currentLine:String(r.line)}));else{if(!i&&(0,n.isSupportedLanguageId)(t.languageId))return await(0,_.isEmptyBlockStart)(t,r);if(i&&(0,n.isSupportedLanguageId)(t.languageId))return await(0,_.isEmptyBlockStart)(t,r)||await(0,_.isEmptyBlockStart)(t,t.lineAt(r).range.end)}return!1}(e,t,r,s);return c?{blockMode:a,requestMultiline:!0,isCyclingRequest:!1,finishedCb:async n=>{let o;return o=i.trailingWs.length>0&&!i.prompt.prefix.endsWith(i.trailingWs)?e.get(x.LocationFactory).position(r.line,Math.max(r.character-i.trailingWs.length,0)):r,(0,_.isBlockBodyFinished)(e,t,o,n)}}:{blockMode:a,requestMultiline:!1,isCyclingRequest:o,finishedCb:async e=>{}}}}}(e,r,a,y,u,C);if(f?.isCancellationRequested)return t.ghostTextLogger.info(e,"Cancelled after requestMultiline"),{type:"abortedBeforeIssued",reason:"Cancelled after requestMultiline"};const[K]=(0,b.trimLastLine)(r.getText(V.range(V.position(0,0),a)));let W=function(e,r,n,i){const o=function(e,r,n,i){const o=!!R&&r.startsWith(R),s=null!=N&&n.suffix==N;if(!(R&&O&&o&&s))return;const a=j(O,i);if(!a)return;const c=r.substring(R.length);t.ghostTextLogger.debug(e,`Getting completions for user-typing flow - remaining prefix: ${c}`);const l=[];return a.forEach((e=>{const t=D(e,{forceSingleLine:!1});t.completionText.startsWith(c)&&(t.completionText=t.completionText.substring(c.length),l.push(t))})),l}(e,r,n,i);if(o&&o.length>0)return[o,P.TypingAsSuggested];const a=function(e,r,n,i){const o=(0,s.keyForPrompt)(n);t.ghostTextLogger.debug(e,`Trying to get completions from cache for key: ${o}`);const a=j(o,i);if(a){t.ghostTextLogger.debug(e,`Got completions from cache for key: ${o}`);const s=[];a.forEach((e=>{const t=D(e,{forceSingleLine:!i});s.push(t)}));const c=s.filter((e=>e.completionText));return c.length>0&&B(r,n.suffix,o),c}}(e,r,n,i);return a&&a.length>0?[a,P.Cache]:void 0}(e,K,y.prompt,z.requestMultiline);const G=o.v4(),Q=(0,w.extractRepoInfoInBackground)(e,r.fileName),J=(0,w.getDogFood)(Q),Y=await(0,w.getUserKind)(e),X=await(0,g.getEngineURL)(e,(0,w.tryGetGitHubNWO)(Q),r.languageId,J,Y,h),Z=await e.get(d.Features).beforeRequestWaitMs((0,w.tryGetGitHubNWO)(Q)||"",r.languageId,Y,J),ee=await e.get(d.Features).multiLogitBias((0,w.tryGetGitHubNWO)(Q)||"",r.languageId,Y,J),te={blockMode:z.blockMode,languageId:r.languageId,repoInfo:Q,engineURL:X,ourRequestId:G,prefix:K,prompt:y.prompt,multiline:z.requestMultiline,indentation:(0,_.contextIndentation)(r,a),isCycling:u,delayMs:Z,multiLogitBias:ee},re=await e.get(d.Features).debouncePredict(),ne=await e.get(d.Features).contextualFilterEnable(),ie=await e.get(d.Features).contextualFilterAcceptThreshold(),oe=await e.get(d.Features).contextualFilterEnableTree(),se=await e.get(d.Features).contextualFilterExplorationTraffic();let ae=!1;(re||ne)&&(ae=!0);const ce=(await e.get(p.LanguageDetection).detectLanguage(r)).languageId,le=function(e,t,r,n,o,s,a,c,l){const u=e.get(x.LocationFactory),d=t.lineAt(o.line),p=t.getText(u.range(d.range.start,o)),h=t.getText(u.range(o,d.range.end)),f={languageId:t.languageId,beforeCursorWhitespace:JSON.stringify(""===p.trim()),afterCursorWhitespace:JSON.stringify(""===h.trim())};t.languageId!==r&&(f.detectedLanguageId=r);const g={...(0,T.telemetrizePromptLength)(s.prompt),promptEndPos:t.offsetAt(o),documentLength:t.getText().length,delayMs:n.delayMs},y=a.extendedBy(f,g);y.properties.promptChoices=JSON.stringify(s.promptChoices,((e,t)=>t instanceof Map?Array.from(t.entries()).reduce(((e,[t,r])=>({...e,[t]:r})),{}):t)),y.properties.promptBackground=JSON.stringify(s.promptBackground,((e,t)=>t instanceof Map?Array.from(t.values()):t));const v=Array.from(s.neighborSource.entries()).map((e=>[e[0],e[1].map((e=>(0,i.SHA256)(e).toString()))]));y.properties.neighborSource=JSON.stringify(v),y.measurements.promptComputeTimeMs=s.computeTimeMs,c&&(y.measurements.contextualFilterScore=(0,k.contextualFilterScore)(e,y,s.prompt,l));const _=n.repoInfo;return y.properties.gitRepoInformation=void 0===_?"unavailable":_===w.ComputationStatus.PENDING?"pending":"available",void 0!==_&&_!==w.ComputationStatus.PENDING&&(y.properties.gitRepoUrl=_.url,y.properties.gitRepoHost=_.hostname,y.properties.gitRepoOwner=_.owner,y.properties.gitRepoName=_.repo,y.properties.gitRepoPath=_.pathname),y.properties.engineName=(0,m.extractEngineName)(e,n.engineURL),y.properties.isMultiline=JSON.stringify(n.multiline),y.properties.blockMode=n.blockMode,y.properties.isCycling=JSON.stringify(n.isCycling),y.properties.headerRequestId=n.ourRequestId,(0,T.telemetry)(e,"ghostText.issued",y),y}(e,r,ce,te,a,y,h,ae,oe);if(z.isCyclingRequest&&(W?.[0].length??0)>1||!z.isCyclingRequest&&void 0!==W)t.ghostTextLogger.info(e,"Found inline suggestions locally");else{if(H?.setProgress(),z.isCyclingRequest){const r=await async function(e,r,n,i,o){return L(e,r,n,i,o,"all completions",(async(o,s,a,c)=>{const l=[];for await(const r of c){if(i?.isCancellationRequested)return t.ghostTextLogger.debug(e,"Cancelled after awaiting choices iterator"),{type:"canceled",reason:"after awaiting choices iterator",telemetryData:(0,A.mkCanceledResultTelemetry)(n)};if(r.completionText.trimEnd()){if(-1!==l.findIndex((e=>e.completionText.trim()===r.completionText.trim())))continue;l.push(r)}}return l.length>0&&(F(e,r,{multiline:r.multiline,choices:l}),q(e,"cyclingPerformance",l[0],s,a)),{type:"success",value:l,telemetryData:(0,A.mkBasicResultTelemetry)(n),telemetryBlob:n}}))}(e,te,le,f,z.finishedCb);if("success"===r.type){const e=W?.[0]??[];r.value.forEach((t=>{-1===e.findIndex((e=>e.completionText.trim()===t.completionText.trim()))&&e.push(t)})),W=[e,P.Cycling]}else if(void 0===W)return H?.removeProgress(),r}else{const r=await(0,I.getDebounceLimit)(e,le);try{await M.debounce(r)}catch{return{type:"canceled",reason:"by debouncer",telemetryData:(0,A.mkCanceledResultTelemetry)(le)}}if(f?.isCancellationRequested)return t.ghostTextLogger.info(e,"Cancelled during debounce"),{type:"canceled",reason:"during debounce",telemetryData:(0,A.mkCanceledResultTelemetry)(le)};if(ne&&le.measurements.contextualFilterScore&&le.measurements.contextualFilterScore{const u=l[Symbol.asyncIterator](),d=await u.next();if(d.done)return t.ghostTextLogger.debug(e,"All choices redacted"),{type:"empty",reason:"all choices redacted",telemetryData:(0,A.mkBasicResultTelemetry)(n)};if(i?.isCancellationRequested)return t.ghostTextLogger.debug(e,"Cancelled after awaiting redactedChoices iterator"),{type:"canceled",reason:"after awaiting redactedChoices iterator",telemetryData:(0,A.mkCanceledResultTelemetry)(n)};const p=d.value;if(void 0===p)return t.ghostTextLogger.debug(e,"Got undefined choice from redactedChoices iterator"),{type:"empty",reason:"got undefined choice from redactedChoices iterator",telemetryData:(0,A.mkBasicResultTelemetry)(n)};q(e,"performance",p,a,c);const h=o-1;t.ghostTextLogger.debug(e,`Awaited first result, id: ${p.choiceIndex}`),function(e,r,n){const i=(0,s.keyForPrompt)(r.prompt);B(r.prefix,r.prompt.suffix,i),t.completionCache.put(i,n),t.ghostTextLogger.debug(e,`Cached ghost text for key: ${i}, multiline: ${n.multiline}, number of suggestions: ${n.choices.length}`)}(e,r,{multiline:r.multiline,choices:[p]});const f=[];for(let e=0;e{u.next(),t.ghostTextLogger.debug(e,`Awaited remaining results, number of results: ${n.length}`);const i=[];for(const r of n){const n=r.value;if(void 0!==n&&(t.ghostTextLogger.info(e,`GhostText later completion: [${n.completionText}]`),n.completionText.trimEnd())){if(-1!==i.findIndex((e=>e.completionText.trim()===n.completionText.trim())))continue;if(n.completionText.trim()===p.completionText.trim())continue;i.push(n)}}i.length>0&&F(e,r,{multiline:r.multiline,choices:i})}));return(0,S.isRunningInTest)(e)&&await g,{type:"success",value:D(d.value,{forceSingleLine:!1}),telemetryData:(0,A.mkBasicResultTelemetry)(n),telemetryBlob:n}}))}(e,te,le,f,z.finishedCb);if("success"!==n.type)return H?.removeProgress(),n;W=[[n.value],P.Network]}H?.removeProgress()}if(void 0===W)return{type:"failed",reason:"internal error: choices should be defined after network call",telemetryData:(0,A.mkBasicResultTelemetry)(le)};const[ue,de]=W,pe=(0,c.asyncIterableMapFilter)((0,c.asyncIterableFromArray)(ue),(async n=>(0,E.postProcessChoice)(e,"ghostText",r,a,n,C,t.ghostTextLogger))),he=[];for await(const n of pe){const i=C&&(0,E.checkSuffix)(r,a,n);if(f?.isCancellationRequested)return t.ghostTextLogger.info(e,"Cancelled after post processing completions"),{type:"canceled",reason:"after post processing completions",telemetryData:(0,A.mkCanceledResultTelemetry)(le)};const o=$(e,n),s={completion:U(n.choiceIndex,n.completionText,y.trailingWs),telemetry:o,isMiddleOfTheLine:C,coversSuffix:i};he.push(s)}return{type:"success",value:[he,de],telemetryData:(0,A.mkBasicResultTelemetry)(le),telemetryBlob:le}}},35034:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeIndentCharacter=void 0,t.normalizeIndentCharacter=function(e,t,r){function n(e,t,r){const n=new RegExp(`^(${t})+`,"g");return e.split("\n").map((e=>{const t=e.replace(n,""),i=e.length-t.length;return r(i)+t})).join("\n")}let i;if(i=void 0===e.tabSize||"string"==typeof e.tabSize?4:e.tabSize,!1===e.insertSpaces){const e=e=>n(e," ",(e=>"\t".repeat(Math.floor(e/i))+" ".repeat(e%i)));t.displayText=e(t.displayText),t.completionText=e(t.completionText)}else if(!0===e.insertSpaces){const e=e=>n(e,"\t",(e=>" ".repeat(e*i)));if(t.displayText=e(t.displayText),t.completionText=e(t.completionText),r){const e=e=>{const t=e.length-e.trimLeft().length,r=t%i;return 0!==r&&t>0?n(e," ".repeat(r),(e=>" ".repeat((Math.floor(e/i)+1)*i))):e};t.displayText=e(t.displayText),t.completionText=e(t.completionText)}}return t}},41749:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleGhostTextResultTelemetry=t.mkBasicResultTelemetry=t.mkCanceledResultTelemetry=t.telemetryRejected=t.telemetryAccepted=t.telemetryShown=void 0;const n=r(65489),i=r(96817);t.telemetryShown=function(e,t,r,i){r.markAsDisplayed();const o=i?`${t}.shownFromCache`:`${t}.shown`;(0,n.telemetry)(e,o,r)},t.telemetryAccepted=function(e,t,r){const o=t+".accepted",s=e.get(i.ContextualFilterManager);s.previousLabel=1,s.previousLabelTimestamp=Date.now(),(0,n.telemetry)(e,o,r)},t.telemetryRejected=function(e,t,r){const o=t+".rejected",s=e.get(i.ContextualFilterManager);s.previousLabel=0,s.previousLabelTimestamp=Date.now(),(0,n.telemetry)(e,o,r)},t.mkCanceledResultTelemetry=function(e,t={}){return{...t,telemetryBlob:e}},t.mkBasicResultTelemetry=function(e){return{headerRequestId:e.properties.headerRequestId,copilot_trackingId:e.properties.copilot_trackingId}},t.handleGhostTextResultTelemetry=async function(e,t){if("success"===t.type)return(0,n.telemetryRaw)(e,"ghostText.produced",t.telemetryData,{}),t.value;"abortedBeforeIssued"!==t.type&&("canceled"!==t.type?(0,n.telemetryRaw)(e,`ghostText.${t.type}`,{...t.telemetryData,reason:t.reason},{}):(0,n.telemetry)(e,"ghostText.canceled",t.telemetryData.telemetryBlob.extendedBy({reason:t.reason,cancelledNetworkRequest:t.telemetryData.cancelledNetworkRequest?"true":"false"})))}},63405:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HeaderContributors=void 0,t.HeaderContributors=class{constructor(){this.contributors=[]}add(e){this.contributors.push(e)}contributeHeaders(e){for(const t of this.contributors)t.contributeHeaderValues(e)}size(){return this.contributors.length}}},20190:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLanguageDetection=t.primeLanguageDetectionCache=t.LanguageDetection=t.Language=void 0;const n=r(70140),i=r(50467),o=r(71017);class s{constructor(e){this.languageId=e}}t.Language=s;class a{}t.LanguageDetection=a,t.primeLanguageDetectionCache=function(e,t){e.get(a).detectLanguage(t)},t.getLanguageDetection=function(){return new c(new l)};class c extends a{constructor(e){super(),this.delegate=e,this.cache=new n.LRUCache(100)}async detectLanguage(e){const t=o.basename(e.fileName);let r=this.cache.get(t);return r||(r=await this.delegate.detectLanguage(e),this.cache.put(t,r)),r}}class l extends a{async detectLanguage(e){const t=o.basename(e.fileName),r=o.extname(t);return new s(this.detectLanguageId(t,r))}detectLanguageId(e,t){const r=this.extensionWithoutTemplateLanguage(e,t.toLowerCase()),n=[];for(const t in i.knownLanguages){const o=i.knownLanguages[t];if(o.filenames&&o.filenames.includes(e))return t;o.extensions.includes(r)&&n.push(t)}return n.length>=1?n[0]:"unknown"}extensionWithoutTemplateLanguage(e,t){if(i.knownTemplateLanguageExtensions.includes(t)){const t=e.substring(0,e.lastIndexOf(".")),r=o.extname(t);if(r.length>0&&i.knownFileExtensions.includes(r))return r}return t}}},50467:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.knownFileExtensions=t.knownLanguages=t.knownTemplateLanguageExtensions=void 0,t.knownTemplateLanguageExtensions=[".erb",".jinja",".jinja2",".j2",".mustache",".hbs",".liquid",".ejs",".pug",".slim",".php",".haml",".webc",".njk"],t.knownLanguages={abap:{extensions:[".abap"]},bat:{extensions:[".bat",".cmd"]},bibtex:{extensions:[".bib",".bibtex"]},blade:{extensions:[".blade",".blade.php"]},c:{extensions:[".c",".cats",".h",".idc"]},csharp:{extensions:[".cake",".cs",".csx",".linq"]},cpp:{extensions:[".c++",".cc",".cp",".cpp",".cxx",".h",".h++",".hh",".hpp",".hxx",".inc",".inl",".ino",".ipp",".ixx",".re",".tcc",".tpp",".i"]},css:{extensions:[".css"]},clojure:{extensions:[".bb",".boot",".cl2",".clj",".cljc",".cljs",".cljs.hl",".cljscm",".cljx",".hic"],filenames:["riemann.config"]},ql:{extensions:[".ql",".qll"]},coffeescript:{extensions:["._coffee",".cake",".cjsx",".coffee",".iced"],filenames:["Cakefile"]},dart:{extensions:[".dart"]},dockerfile:{extensions:[".dockerfile"],filenames:["Containerfile","Dockerfile"]},html:{extensions:[".ect",".ejs",".ejs.t",".jst",".hta",".htm",".html",".html.hl",".inc",".xht",".xhtml",".phtml",".liquid"]},elixir:{extensions:[".ex",".exs"],filenames:["mix.lock"]},erlang:{extensions:[".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"],filenames:["Jenkinsfile","Jenkinsfile"]},terraform:{extensions:[".hcl",".nomad",".tf",".tfvars",".workflow"]},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",".dof",".ini",".lektorproject",".prefs",".pro",".properties",".url"],filenames:[".coveragerc",".flake8",".pylintrc","buildozer.spec","pylintrc"]},jsonc:{extensions:[".code-snippets",".jsonc",".sublime-build",".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","api-extractor.json","devcontainer.json","jsconfig.json","language-configuration.json","launch.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"]},python:{extensions:[".ipynb",".cgi",".fcgi",".gyp",".gypi",".lmi",".py",".py3",".pyde",".pyi",".pyp",".pyt",".pyw",".rpy",".smk",".spec",".tac",".wsgi",".xpy"],filenames:["Notebook",".gclient","DEPS","SConscript","SConstruct","Snakefile","wscript"]},kotlin:{extensions:[".kt",".ktm",".kts"]},less:{extensions:[".less"]},lua:{extensions:[".fcgi",".lua",".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",".php",".php3",".php4",".php5",".phps",".phpt"],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"]},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",".env",".fcgi",".ksh",".sh",".sh.in",".tmux",".tool",".zsh",".zsh-theme"],filenames:[".bash_aliases",".bash_history",".bash_logout",".bash_profile",".bashrc",".cshrc",".env",".env.example",".flaskenv",".kshrc",".login",".profile",".zlogin",".zlogout",".zprofile",".zshenv",".zshrc","9fs","PKGBUILD","bash_aliases","bash_logout","bash_profile","bashrc","cshrc","gradlew","kshrc","login","man","profile","zlogin","zlogout","zprofile","zshenv","zshrc"]},slim:{extensions:[".slim"]},solidity:{extensions:[".sol"]},stylus:{extensions:[".styl"]},svelte:{extensions:[".svelte"]},swift:{extensions:[".swift"]},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"]},vb:{extensions:[".vb",".vbhtml",".Dsr",".cls",".ctl",".frm"]},vue:{extensions:[".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",".grxml",".gst",".hzp",".iml",".ivy",".jelly",".jsproj",".kml",".launch",".mdpolicy",".mjml",".mm",".mod",".mxml",".natvis",".ncl",".ndproj",".nproj",".nuspec",".odd",".osm",".pkgproj",".pluginspec",".proj",".props",".ps1xml",".psc1",".pt",".qhelp",".rdf",".res",".resx",".rs",".rss",".sch",".scxml",".sfproj",".shproj",".srdf",".storyboard",".sublime-snippet",".targets",".tml",".ts",".tsx",".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",".gemrc","CITATION.cff","glide.lock","yarn.lock"]},javascriptreact:{extensions:[".jsx"]}},t.knownFileExtensions=Object.keys(t.knownLanguages).flatMap((e=>t.knownLanguages[e].extensions))},5798:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.logger=t.toPlainText=t.Logger=t.MultiLog=t.OutputChannelLog=t.ConsoleLog=t.LogTarget=t.verboseLogging=t.LogVerbose=t.LogLevel=void 0;const n=r(32137),i=r(39800),o=r(65489);var s;!function(e){e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR"}(s=t.LogLevel||(t.LogLevel={}));class a{constructor(e){this.logVerbose=e}}function c(e){return e.get(a).logVerbose}t.LogVerbose=a,t.verboseLogging=c;class l{shouldLog(e,t){}}t.LogTarget=l,t.ConsoleLog=class extends l{constructor(e){super(),this.console=e}logIt(e,t,r,...n){c(e)||t==s.ERROR?this.console.error(r,...n):t==s.WARN&&this.console.warn(r,...n)}},t.OutputChannelLog=class extends l{constructor(e){super(),this.output=e}logIt(e,t,r,...n){this.output.appendLine(`${r} ${n.map(d)}`)}},t.MultiLog=class extends l{constructor(e){super(),this.targets=e}logIt(e,t,r,...n){this.targets.forEach((i=>i.logIt(e,t,r,...n)))}};class u{constructor(e,t){this.minLoggedLevel=e,this.context=t}setLevel(e){this.minLoggedLevel=e}stringToLevel(e){return s[e]}log(e,t,r,...i){const a=s[t];t==s.ERROR&&(0,o.telemetryError)(e,"log",o.TelemetryData.createAndMarkAsIssued({context:this.context,level:a,message:i.length>0?JSON.stringify(i):"no msg"}),r);const c=e.get(l),u=c.shouldLog(e,t);if(!1===u)return;if(void 0===u&&!this.shouldLog(e,t,this.context))return;const d=e.get(n.Clock).now().toISOString(),p=`[${a}] [${this.context}] [${d}]`;c.logIt(e,t,p,...i)}shouldLog(e,t,r){if(c(e))return!0;const n=(0,i.getConfig)(e,i.ConfigKey.DebugFilterLogCategories);if(n.length>0&&!n.includes(r))return!1;if((0,i.isProduction)(e))return t>=this.minLoggedLevel;const o=(0,i.getConfig)(e,i.ConfigKey.DebugOverrideLogLevels);return t>=(this.stringToLevel(o["*"])??this.stringToLevel(o[this.context])??this.minLoggedLevel)}debug(e,...t){this.log(e,s.DEBUG,!1,...t)}info(e,...t){this.log(e,s.INFO,!1,...t)}warn(e,...t){this.log(e,s.WARN,!1,...t)}error(e,...t){this.log(e,s.ERROR,!1,...t)}secureError(e,t,...r){this.log(e,s.ERROR,!1,t),this.log(e,s.ERROR,!0,t,...r)}}function d(e){return"object"==typeof e?JSON.stringify(e):String(e)}t.Logger=u,t.toPlainText=d,t.logger=new u(s.INFO,"default")},15291:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRootCertificateReader=t.RootCertificateReader=void 0;const n=r(32081),i=r(57147),o=r(22037),s=r(71017),a=r(40084),c=r(5798),l=new c.Logger(c.LogLevel.WARN,"certificates");class u{}t.RootCertificateReader=u;const d=new Map;t.getRootCertificateReader=(e,t=process.platform)=>new p(e.get(a.CopilotTokenNotifier),h(t,e),new w);class p{constructor(e,t,r){this.realReader=t,this.noopReader=r,this.delegate=t,e.on("onCopilotToken",(e=>{this.delegate="1"===e.getTokenValue("ssc")?this.realReader:this.noopReader}))}getAllRootCAs(){return this.delegate.getAllRootCAs()}}const h=(e,t)=>{let r=d.get(e);if(!r){const n=f(e),i=new m(n);r=new g(t,i),d.set(e,r)}return r},f=e=>{switch(e){case"linux":return new y;case"darwin":return new v;case"win32":return new _;default:return new b}};class g{constructor(e,t){this.ctx=e,this.delegate=t}async getAllRootCAs(){try{return await this.delegate.getAllRootCAs()}catch(e){return l.warn(this.ctx,`Failed to read root certificates: ${e}`),[]}}}class m extends u{constructor(e){super(),this.delegate=e}async getAllRootCAs(){return this.certificates||(this.certificates=await this.delegate.getAllRootCAs()),this.certificates}}class y extends u{async getAllRootCAs(){let e=[];for(const t of["/etc/ssl/certs/ca-certificates.crt","/etc/ssl/certs/ca-bundle.crt"]){const r=await this.readCerts(t);e=e.concat(r)}return e}async readCerts(e){try{const t=await i.promises.readFile(e,{encoding:"utf8"}),r=new Set(t.split(/(?=-----BEGIN CERTIFICATE-----)/g).filter((e=>!!e.length)));return Array.from(r)}catch(e){if("ENOENT"!==e?.code)throw e}return[]}}class v extends u{async getAllRootCAs(){const e=r(11240),t=r(35758);return e.all().map((e=>t.pki.certificateToPem(e)))}}class _ extends u{async getAllRootCAs(){return new Promise(((e,t)=>{const i=this.setupExecFileWithLargeBuffer(t);try{const t=r(60809);this.exePath||(this.exePath=this.setupCertificateFallbackExecutable()),t.exe(this.exePath);const o=[];t({format:t.der2.pem,fallback:!0,async:!0,ondata:e=>o.push(e),onend:()=>e(o)})}catch(e){t(e)}finally{n.execFile=i}}))}setupExecFileWithLargeBuffer(e){const t=n.execFile;return n.execFile=function(r,n,i){return t(r,n,{maxBuffer:12582912},(function(t){i(t,"",""),e(t)}))},t}setupCertificateFallbackExecutable(){let e=__dirname;"dist"===s.basename(__dirname)&&(e=s.dirname(__dirname));const t=s.join(e,"dist","roots.exe"),r=i.mkdtempSync(s.join(o.tmpdir(),"copilot-")),n=s.join(r,"copilot-find-certificates.exe");return i.copyFileSync(t,n),i.chmodSync(n,493),n}}class b extends u{async getAllRootCAs(){throw new Error("No certificate reader available for unsupported platform")}}class w extends u{async getAllRootCAs(){return[]}}},58290:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RootCertificateConfigurator=void 0;const n=r(24404),i=r(15291);t.RootCertificateConfigurator=class{constructor(e){this._certificateReader=e.get(i.RootCertificateReader)}async createTunnelSettings(e){return{...e,ca:await this.getCertificates()}}async getCertificates(){const e=await this._certificateReader.getAllRootCAs();if(0!==e.length)return e}async applyToRequestOptions(e){const t=await this._certificateReader.getAllRootCAs(),r={_vscodeAdditionalCaCerts:t};e.secureContext=n.createSecureContext(r),t.map((t=>{e.secureContext.context.addCACert(t)}))}}},57158:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HelixFetcher=void 0;const n=r(98606),i=r(13582),o=r(39800),s=r(20039),a=r(58290);class c extends s.Fetcher{constructor(e){super(),this.ctx=e,this.createSocketFactory=e=>async t=>{const r=await this.certificateConfigurator.createTunnelSettings(e),n=i.httpOverHttp({proxy:r});return t.rejectUnauthorized=e.rejectUnauthorized,await this.certificateConfigurator.applyToRequestOptions(t),new Promise(((i,o)=>{this.fixTunnelErrorHandling(t,o);const s=setTimeout((()=>{o({message:`tunneling socket could not be established, proxy socket connection timeout while connecting to ${r.host}:${r.port}`})}),e.connectionTimeoutInMs??1e4);n.createSocket(t,(e=>{clearTimeout(s),i(e)}))}))},this.fetchApi=this.createFetchApi(e),this.certificateConfigurator=new a.RootCertificateConfigurator(e)}fixTunnelErrorHandling(e,t){e.request?.emit||(e.request={},e.request.emit=function(e,r){t(r)})}set proxySettings(e){this._proxySettings=e,this.fetchApi=this.createFetchApi(this.ctx)}get proxySettings(){return this._proxySettings}createFetchApi(e){const t=e.get(o.BuildInfo);return!1===this._proxySettings?.rejectUnauthorized&&(process.env.NODE_TLS_REJECT_UNAUTHORIZED="0"),n.context({userAgent:`GithubCopilot/${t.getVersion()}`,socketFactory:this._proxySettings?this.createSocketFactory(this._proxySettings):void 0})}async fetch(e,t){const r={...t,body:t.body?t.body:t.json,signal:t.signal},n=await this.fetchApi.fetch(e,r);return new s.Response(n.status,n.statusText,n.headers,(()=>n.text()),(()=>n.json()),(async()=>n.body))}disconnectAll(){return this.fetchApi.reset()}makeAbortController(){return new n.AbortController}}t.HelixFetcher=c},20039:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.postRequest=t.Response=t.isAbortError=t.Fetcher=void 0;const n=r(98606),i=r(73837),o=r(39800),s=r(54619),a=r(63405),c=r(65489);class l{}t.Fetcher=l,t.isAbortError=function(e){return e instanceof n.AbortError},t.Response=class{constructor(e,t,r,n,i,o){this.status=e,this.statusText=t,this.headers=r,this.getText=n,this.getJson=i,this.getBody=o,this.ok=this.status>=200&&this.status<300}async text(){return this.getText()}async json(){return this.getJson()}async body(){return this.getBody()}},t.postRequest=function(e,t,r,n,u,d,p){const h={Authorization:i.format("Bearer %s",r),"X-Request-Id":u,"Openai-Organization":"github-copilot","VScode-SessionId":e.get(o.EditorSession).sessionId,"VScode-MachineId":e.get(o.EditorSession).machineId,...(0,o.editorVersionHeaders)(e)};e.get(a.HeaderContributors).contributeHeaders(h),n&&(h["OpenAI-Intent"]=n);const f=e.get(s.GhostTextDebounceManager).forceDelayMs;f&&(h["X-Copilot-Force-Delay"]=f.toString());const g={method:"POST",headers:h,json:d,timeout:3e4},m=e.get(l);if(p){const t=m.makeAbortController();p.onCancellationRequested((()=>{(0,c.telemetry)(e,"networking.cancelRequest",c.TelemetryData.createAndMarkAsIssued({headerRequestId:u})),t.abort()})),g.signal=t.signal}return m.fetch(t,g).catch((r=>{if("ECONNRESET"==r.code||"ETIMEDOUT"==r.code||"ERR_HTTP2_INVALID_SESSION"==r.code||"ERR_HTTP2_GOAWAY_SESSION"==r.message)return(0,c.telemetry)(e,"networking.disconnectAll"),m.disconnectAll().then((()=>m.fetch(t,g)));throw r}))}},69035:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotificationSender=void 0,t.NotificationSender=class{}},47553:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEngineURL=t.TEST_ENGINE_PATHS=t.OPENAI_PROXY_HOST=void 0;const n=r(39800),i=r(16905),o=r(20913);t.OPENAI_PROXY_HOST="https://copilot-proxy.githubusercontent.com";const s="/v1/engines/copilot-codex";t.TEST_ENGINE_PATHS=[s],t.getEngineURL=async function(e,r="",a,c="",l="",u){return function(e,r){let i=function(e){return(0,o.isRunningInTest)(e)?(0,n.getConfig)(e,n.ConfigKey.DebugTestOverrideProxyUrl):(0,n.getConfig)(e,n.ConfigKey.DebugOverrideProxyUrl)}(e);return 0==i.length&&(i=t.OPENAI_PROXY_HOST),`${i}${r}`}(e,await async function(e,t,r,o,a,c){const l=(0,n.getConfig)(e,n.ConfigKey.DebugOverrideEngine);if(l)return`/v1/engines/${l}`;const u=await e.get(i.Features).customEngine(t,r,o,a,c);return""!==u?`/v1/engines/${u}`:s}(e,r,a,c,l,u))}},52031:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LiveOpenAIFetcher=t.postProcessChoices=t.OpenAIFetcher=t.extractEngineName=t.getProcessingTime=t.getRequestId=t.CopilotUiKind=void 0;const n=r(73837),i=r(35765),o=r(11661),s=r(39800),a=r(16905),c=r(54619),l=r(5798),u=r(20039),d=r(86635),p=r(3591),h=r(54604),f=r(65489),g=r(598),m=r(24586),y=new l.Logger(l.LogLevel.INFO,"fetch");var v;function _(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")||""}}function b(e){const t=e.headers.get("openai-processing-ms");return t?parseInt(t,10):0}function w(e,t){return t.split("/").pop()||(y.error(e,"Malformed engine URL: "+t),t)}!function(e){e.GhostText="ghostText",e.Panel="synthesize"}(v=t.CopilotUiKind||(t.CopilotUiKind={})),t.getRequestId=_,t.getProcessingTime=b,t.extractEngineName=w;class C{}function E(e,t){return t?e:(0,o.asyncIterableFilter)(e,(async e=>e.completionText.trim().length>0))}t.OpenAIFetcher=C,t.postProcessChoices=E,t.LiveOpenAIFetcher=class extends C{async fetchAndStreamCompletions(e,t,r,n,i){const s=e.get(d.StatusReporter),a="completions",c=await this.fetchWithParameters(e,a,t,i);if("not-sent"===c)return{type:"canceled",reason:"before fetch request"};if(i?.isCancellationRequested){const t=await c.body();try{t.destroy()}catch(t){l.logger.error(e,`Error destroying stream: ${t}`)}return{type:"canceled",reason:"after fetch request"}}if(void 0===c){const r=this.createTelemetryData(a,e,t);return s.setWarning(),r.properties.error="Response was undefined",(0,f.telemetry)(e,"request.shownWarning",r),{type:"failed",reason:"fetch response was undefined"}}if(200!==c.status){const r=this.createTelemetryData(a,e,t);return this.handleError(e,s,r,c)}const u=(await m.SSEProcessor.create(e,t.count,c,r,i)).processSSE(n);return{type:"success",choices:E((0,o.asyncIterableMap)(u,(async t=>(0,m.prepareSolutionForReturn)(e,t,r))),t.allowEmptyChoices),getProcessingTime:()=>b(c)}}createTelemetryData(e,t,r){return f.TelemetryData.createAndMarkAsIssued({endpoint:e,engineName:w(t,r.engineUrl),uiKind:r.uiKind,headerRequestId:r.ourRequestId})}async fetchWithParameters(e,t,r,o){const m=(0,s.getLanguageConfig)(e,s.ConfigKey.Stops),y=await e.get(a.Features).disableLogProb(),b={prompt:r.prompt.prefix,suffix:r.prompt.suffix,max_tokens:(0,s.getConfig)(e,s.ConfigKey.SolutionLength),temperature:(0,g.getTemperatureForSamples)(e,r.count),top_p:(0,s.getConfig)(e,s.ConfigKey.TopP),n:r.count,stop:m};!r.requestLogProbs&&y||(b.logprobs=2);const C=(0,p.tryGetGitHubNWO)(r.repoInfo);return void 0!==C&&(b.nwo=C),[h.RepetitionFilterMode.PROXY,h.RepetitionFilterMode.BOTH].includes(await e.get(a.Features).repetitionFilterMode())&&(b.feature_flags=[...b.feature_flags??[],"filter-repetitions"]),r.postOptions&&Object.assign(b,r.postOptions),o?.isCancellationRequested?"not-sent":(l.logger.info(e,`[fetchCompletions] engine ${r.engineUrl}`),await function(e,t,r,i,o,s,a,p,h){const g=e.get(d.StatusReporter),m=n.format("%s/%s",r,i);if(!a)return void l.logger.error(e,`Failed to send request to ${m} due to missing key`);const y=f.TelemetryData.createAndMarkAsIssued({endpoint:i,engineName:w(e,r),uiKind:p},(0,f.telemetrizePromptLength)(t));for(const[e,t]of Object.entries(s))"prompt"!=e&&"suffix"!=e&&(y.properties[`request.option.${e}`]=JSON.stringify(t)??"undefined");y.properties.headerRequestId=o,(0,f.telemetry)(e,"request.sent",y);const b=(0,f.now)(),C=function(e){switch(e){case v.GhostText:return"copilot-ghost";case v.Panel:return"copilot-panel"}}(p);return(0,u.postRequest)(e,m,a,C,o,s,h).then((r=>{const n=_(r,void 0);y.extendWithRequestId(n);const i=(0,f.now)()-b;y.measurements.totalTimeMs=i,l.logger.info(e,`request.response: [${m}] took ${i} ms`),l.logger.debug(e,"request.response properties",y.properties),l.logger.debug(e,"request.response measurements",y.measurements),l.logger.debug(e,`prompt: ${JSON.stringify(t)}`),(0,f.telemetry)(e,"request.response",y);const o=r.headers.get("x-copilot-delay"),s=o?parseInt(o,10):0;return e.get(c.GhostTextDebounceManager).extraDebounceMs=s,r})).catch((t=>{if((0,u.isAbortError)(t))throw t;g.setWarning(t.message);const r=y.extendedBy({error:"Network exception"});(0,f.telemetry)(e,"request.shownWarning",r),y.properties.code=String(t.code??""),y.properties.errno=String(t.errno??""),y.properties.message=String(t.message??""),y.properties.type=String(t.type??"");const n=(0,f.now)()-b;throw y.measurements.totalTimeMs=n,l.logger.debug(e,`request.response: [${m}] took ${n} ms`),l.logger.debug(e,"request.error properties",y.properties),l.logger.debug(e,"request.error measurements",y.measurements),l.logger.error(e,`Request Error: ${t.message}`),(0,f.telemetry)(e,"request.error",y),t})).finally((()=>{(0,f.logEnginePrompt)(e,t,y)}))}(e,r.prompt,r.engineUrl,t,r.ourRequestId,b,(await e.get(i.CopilotTokenManager).getCopilotToken(e)).token,r.uiKind,o))}async handleError(e,t,r,n){if(t.setWarning(),r.properties.error=`Response status was ${n.status}`,r.properties.status=String(n.status),(0,f.telemetry)(e,"request.shownWarning",r),401===n.status||403===n.status)return e.get(i.CopilotTokenManager).resetCopilotToken(e,n.status),{type:"failed",reason:`token expired or invalid: ${n.status}`};if(499===n.status)return y.info(e,"Cancelled by server"),{type:"failed",reason:"canceled by server"};const o=await n.text();return 466===n.status?(t.setError(o),y.info(e,o),{type:"failed",reason:`client not supported: ${o}`}):(y.error(e,"Unhandled status from server:",n.status,o),{type:"failed",reason:`unhandled status from server: ${n.status} ${o}`})}}},598:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTemperatureForSamples=t.calculateMeanAlternativeLogProb=t.calculateMeanLogProb=t.cleanupIndentChoices=t.convertToAPIChoice=t.DEFAULT_CHARACTER_MULTIPLIER=t.MAX_PROMPT_LENGTH=t.OpenAIFetcher=t.LiveOpenAIFetcher=t.getRequestId=t.CopilotUiKind=void 0;const n=r(39800),i=r(5798),o=r(65489),s=r(20913);var a=r(52031);function c(e,t){if(t?.logprobs?.token_logprobs)try{let e=0,r=0,n=50;for(let i=0;i0;i++,n--)e+=t.logprobs.token_logprobs[i],r+=1;return r>0?e/r:void 0}catch(t){i.logger.error(e,`Error calculating mean prob: ${t}`)}}function l(e,t){if(t?.logprobs?.top_logprobs)try{let e=0,r=0,n=50;for(let i=0;i0;i++,n--){const n={...t.logprobs.top_logprobs[i]};delete n[t.logprobs.tokens[i]],e+=Math.max(...Object.values(n)),r+=1}return r>0?e/r:void 0}catch(t){i.logger.error(e,`Error calculating mean prob: ${t}`)}}Object.defineProperty(t,"CopilotUiKind",{enumerable:!0,get:function(){return a.CopilotUiKind}}),Object.defineProperty(t,"getRequestId",{enumerable:!0,get:function(){return a.getRequestId}}),Object.defineProperty(t,"LiveOpenAIFetcher",{enumerable:!0,get:function(){return a.LiveOpenAIFetcher}}),Object.defineProperty(t,"OpenAIFetcher",{enumerable:!0,get:function(){return a.OpenAIFetcher}}),t.MAX_PROMPT_LENGTH=1500,t.DEFAULT_CHARACTER_MULTIPLIER=3,t.convertToAPIChoice=function(e,t,r,n,i,s,a,u){return(0,o.logEngineCompletion)(e,t,r,i,n),{completionText:t,meanLogProb:c(e,r),meanAlternativeLogProb:l(e,r),choiceIndex:n,requestId:i,modelInfo:u,blockFinished:s,tokens:r.tokens,numTokens:r.tokens.length,telemetryData:a}},t.cleanupIndentChoices=async function*(e,t){for await(const r of e){const e={...r},n=e.completionText.split("\n");for(let e=0;e=0&&r<=1?r:t<=1?0:t<10?.2:t<20?.4:.8}},24586:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.prepareSolutionForReturn=t.SSEProcessor=t.splitChunk=void 0;const n=r(16905),i=r(5798),o=r(65489),s=r(598),a=new i.Logger(i.LogLevel.INFO,"streamChoices");class c{constructor(){this.logprobs=[],this.top_logprobs=[],this.text=[],this.tokens=[],this.text_offset=[]}append(e){this.text.push(e.text),e.logprobs&&(this.tokens.push(e.logprobs.tokens??[]),this.text_offset.push(e.logprobs.text_offset??[]),this.logprobs.push(e.logprobs.token_logprobs??[]),this.top_logprobs.push(e.logprobs.top_logprobs??[]))}}function l(e){const t=e.split("\n"),r=t.pop();return[t.filter((e=>""!=e)),r]}t.splitChunk=l;class u{constructor(e,t,r,n,i,o){this.ctx=e,this.expectedNumChoices=t,this.response=r,this.body=n,this.telemetryData=i,this.cancellationToken=o,this.requestId=(0,s.getRequestId)(this.response),this.stats=new d(this.expectedNumChoices),this.solutions={}}static async create(e,t,r,n,i){const o=await r.body();return o.setEncoding("utf8"),new u(e,t,r,o,n,i)}async*processSSE(e=(async()=>{})){try{yield*this.processSSEInner(e)}finally{this.cancel(),a.info(this.ctx,`request done: headerRequestId: [${this.requestId.headerRequestId}] model deployment ID: [${this.requestId.deploymentId}]`),a.debug(this.ctx,`request stats: ${this.stats}`)}}async*processSSEInner(e){const t=await this.ctx.get(n.Features).dropCompletionReasons()??["content_filter"];let r="";e:for await(const n of this.body){if(this.maybeCancel("after awaiting body chunk"))return;a.debug(this.ctx,"chunk",n.toString());const[i,u]=l(r+n.toString());r=u;for(const r of i){const n=r.slice("data:".length).trim();if("[DONE]"==n)return void(yield*this.finishSolutions());let i;try{i=JSON.parse(n)}catch(e){a.error(this.ctx,"Error parsing JSON stream data",r);continue}if(void 0!==i.choices){if(0==this.requestId.created&&(this.requestId=(0,s.getRequestId)(this.response,i),0==this.requestId.created&&a.error(this.ctx,`Request id invalid, should have "completionId" and "created": ${this.requestId}`,this.requestId)),this.allSolutionsDone())break e;for(let r=0;r-1)&&(l=await e(s.text.join("")),this.maybeCancel("after awaiting finishedCb")))return;if(!n.finish_reason&&void 0===l)continue;const u=n.finish_reason??"client-trimmed";if((0,o.telemetry)(this.ctx,"completion.finishReason",this.telemetryData.extendedBy({completionChoiceFinishReason:u})),t.includes(n.finish_reason)?this.solutions[n.index]=null:(this.stats.markYielded(n.index),yield{solution:s,finishOffset:l,reason:n.finish_reason,requestId:this.requestId,index:n.index}),this.maybeCancel("after yielding finished choice"))return;this.solutions[n.index]=null}}else void 0!==i.error?a.error(this.ctx,"Error in response:",i.error.message):a.error(this.ctx,"Unexpected response with no choices or error")}}for(const[e,t]of Object.entries(this.solutions)){const r=Number(e);if(null!=t&&(this.stats.markYielded(r),yield{solution:t,finishOffset:void 0,reason:"Iteration Done",requestId:this.requestId,index:r},this.maybeCancel("after yielding after iteration done")))return}if(r.length>0)try{const e=JSON.parse(r);void 0!==e.error&&a.error(this.ctx,`Error in response: ${e.error.message}`,e.error)}catch(e){a.error(this.ctx,`Error parsing extraData: ${r}`)}}async*finishSolutions(){for(const[e,t]of Object.entries(this.solutions)){const r=Number(e);if(null!=t&&(this.stats.markYielded(r),yield{solution:t,finishOffset:void 0,reason:"DONE",requestId:this.requestId,index:r},this.maybeCancel("after yielding on DONE")))return}}maybeCancel(e){return!!this.cancellationToken?.isCancellationRequested&&(a.debug(this.ctx,"Cancelled: "+e),this.cancel(),!0)}cancel(){this.body.destroy()}allSolutionsDone(){const e=Object.values(this.solutions);return e.length==this.expectedNumChoices&&e.every((e=>null==e))}}t.SSEProcessor=u,t.prepareSolutionForReturn=function(e,t,r){let n=t.solution.text.join(""),i=!1;void 0!==t.finishOffset&&(a.debug(e,`solution ${t.index}: early finish at offset ${t.finishOffset}`),n=n.substring(0,t.finishOffset),i=!0),a.info(e,`solution ${t.index} returned. finish reason: [${t.reason}]`),a.debug(e,`solution ${t.index} details: finishOffset: [${t.finishOffset}] completionId: [{${t.requestId.completionId}}] created: [{${t.requestId.created}}]`);const o=function(e,t){const r={text:t.text.join(""),tokens:t.text};if(0===t.logprobs.length)return r;const n=t.logprobs.reduce(((e,t)=>e.concat(t)),[]),i=t.top_logprobs.reduce(((e,t)=>e.concat(t)),[]),o=t.text_offset.reduce(((e,t)=>e.concat(t)),[]),s=t.tokens.reduce(((e,t)=>e.concat(t)),[]);return{...r,logprobs:{token_logprobs:n,top_logprobs:i,text_offset:o,tokens:s}}}(0,t.solution);return(0,s.convertToAPIChoice)(e,n,o,t.index,t.requestId,i,r)};class d{constructor(e){this.choices=new Map;for(let t=0;t`${e}: ${t.yieldedTokens} -> ${t.seenTokens}`)).join(", ")}}class p{constructor(){this.yieldedTokens=-1,this.seenTokens=0}increment(){this.seenTokens++}markYielded(){this.yieldedTokens=this.seenTokens}}},93402:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.postInsertionTasks=t.postRejectionTasks=t.captureCode=t.postInsertConfiguration=void 0;const n=r(25135),i=r(41749),o=r(5798),s=r(47917),a=r(24090),c=r(59558),l=r(65489),u=r(70216),d=r(20913),p=r(70819),h=new o.Logger(o.LogLevel.INFO,"post-insertion"),f=[{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}];async function g(e,t,r){const n=await e.get(p.TextDocumentManager).getTextDocument(t);if(!n)return h.info(e,`Could not get document for ${t.fsPath}. Maybe it was closed by the editor.`),{prompt:{prefix:"",suffix:"",isFimEnabled:!1,promptElementRanges:[]},capturedCode:"",terminationOffset:0};const i=n.getText(),o=i.substring(0,r),c=n.positionAt(r),l=await(0,a.extractPrompt)(e,n,c),u="prompt"===l.type?l.prompt:{prefix:o,suffix:"",isFimEnabled:!1,promptElementRanges:[]},d=i.substring(r),f=(0,s.contextIndentationFromText)(o,r,n.languageId),g=(0,s.indentationBlockFinished)(f,void 0),m=await g(d),y=Math.min(i.length,r+(m?2*m:500));return{prompt:u,capturedCode:i.substring(r,y),terminationOffset:m??-1}}function m(e,t,r,n){const i=e.substring(Math.max(0,n-r),Math.min(e.length,n+t.length+r)),o=(0,c.lexEditDistance)(i,t),s=o.lexDistance/o.needleLexLength,{distance:a}=(0,c.editDistance)(i.substring(o.startOffset,o.endOffset),t);return{relativeLexEditDistance:s,charEditDistance:a,completionLexLength:o.needleLexLength,foundOffset:o.startOffset+Math.max(0,n-r),lexEditDistance:o.lexDistance,stillInCodeHeuristic:s<=.5?1:0}}t.postInsertConfiguration={triggerPostInsertionSynchroneously:!1},t.captureCode=g,t.postRejectionTasks=function(e,t,r,o,s){s.forEach((({completionText:r,completionTelemetryData:n})=>{h.debug(e,`${t}.rejected choiceIndex: ${n.properties.choiceIndex}`),(0,i.telemetryRejected)(e,t,n)}));const a=new n.ChangeTracker(e,o,r);f.filter((e=>e.captureRejection)).map((n=>{a.push((async()=>{h.debug(e,`Original offset: ${r}, Tracked offset: ${a.offset}`);const{completionTelemetryData:i}=s[0],{prompt:c,capturedCode:u,terminationOffset:d}=await g(e,o,a.offset);let p;p=c.isFimEnabled?{hypotheticalPromptPrefixJson:JSON.stringify(c.prefix),hypotheticalPromptSuffixJson:JSON.stringify(c.suffix)}:{hypotheticalPromptJson:JSON.stringify(c.prefix)};const f=i.extendedBy({...p,capturedCodeJson:JSON.stringify(u)},{timeout:n.seconds,insertionOffset:r,trackedOffset:a.offset,terminationOffsetInCapturedCode:d});h.debug(e,`${t}.capturedAfterRejected choiceIndex: ${i.properties.choiceIndex}`,f),(0,l.telemetry)(e,t+".capturedAfterRejected",f,!0)}),1e3*n.seconds)}))},t.postInsertionTasks=async function(e,r,o,s,a,c){h.debug(e,`${r}.accepted choiceIndex: ${c.properties.choiceIndex}`),(0,i.telemetryAccepted)(e,r,c);const y=o.trim(),v=new n.ChangeTracker(e,a,s),_=async t=>{await async function(e,t,r,n,i,o,s,a){const c=await e.get(p.TextDocumentManager).getTextDocument(i);if(c){const u=c.getText();let d=m(u,r,50,a.offset);d.stillInCodeHeuristic||(d=m(u,r,1500,a.offset)),h.debug(e,`stillInCode: ${d.stillInCodeHeuristic?"Found":"Not found"}! Completion '${r}' in file ${i.fsPath}. lexEditDistance fraction was ${d.relativeLexEditDistance}. Char edit distance was ${d.charEditDistance}. Inserted at ${n}, tracked at ${a.offset}, found at ${d.foundOffset}. choiceIndex: ${s.properties.choiceIndex}`);const p=s.extendedBy({},{timeout:o.seconds,insertionOffset:n,trackedOffset:a.offset}).extendedBy({},d);if((0,l.telemetry)(e,t+".stillInCode",p),o.captureCode){const{prompt:r,capturedCode:c,terminationOffset:u}=await g(e,i,a.offset);let d;d=r.isFimEnabled?{hypotheticalPromptPrefixJson:JSON.stringify(r.prefix),hypotheticalPromptSuffixJson:JSON.stringify(r.suffix)}:{hypotheticalPromptJson:JSON.stringify(r.prefix)};const f=s.extendedBy({...d,capturedCodeJson:JSON.stringify(c)},{timeout:o.seconds,insertionOffset:n,trackedOffset:a.offset,terminationOffsetInCapturedCode:u});h.debug(e,`${t}.capturedAfterAccepted choiceIndex: ${s.properties.choiceIndex}`,p),(0,l.telemetry)(e,t+".capturedAfterAccepted",f,!0)}}}(e,r,y,s,a,t,c,v)};t.postInsertConfiguration.triggerPostInsertionSynchroneously&&(0,d.isRunningInTest)(e)?_({seconds:0,captureCode:!1,captureRejection:!1}):f.map((e=>v.push((()=>_(e)),1e3*e.seconds))),e.get(u.PostInsertionNotifier).emit("onPostInsertion",{ctx:e,insertionCategory:r,insertionOffset:s,fileURI:a,completionText:o,telemetryData:c})}},70216:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PostInsertionNotifier=void 0;const n=r(82361);class i extends n.EventEmitter{}t.PostInsertionNotifier=i},86635:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NoOpStatusReporter=t.StatusReporter=void 0;class r{}t.StatusReporter=r,t.NoOpStatusReporter=class extends r{setProgress(){}removeProgress(){}setWarning(){}setError(e){}forceNormal(){}}},29975:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NeighborSource=t.CursorHistoryStrategy=t.NeighborFileType=void 0;const n=r(16630),i=r(25225);var o,s;!function(e){e.Open="Open",e.Cursor="Cursor"}(o=t.NeighborFileType||(t.NeighborFileType={})),function(e){e.None="none",e.MostRecent="mostrecent",e.MostCount="mostcount",e.BeforeCurrentFile="beforecurrentfile"}(s=t.CursorHistoryStrategy||(t.CursorHistoryStrategy={}));class a{constructor(e,t){this.openFileStrategy=e,this.cursorHistoryStrategy=t}async tryGetTextDocument(e,t){try{return await e.getTextDocument(n.URI.parse(t))}catch(e){return}}async getCursorHistoryFiles(e,t,r,n){const o=[];if(n===s.None)return o;const c=[...i.cursorHistoryStack].reverse();if(n===s.MostRecent){let n=0;const i=new Set;for(const{uri:s,offset:a}of c){if(i.has(s))continue;const c=await this.tryGetTextDocument(e,s);if(void 0!==c&&!this.fileLengthExceeded(n,c)&&"file"===c.uri.scheme&&c.fileName!==t&&c.languageId===r&&(o.push({uri:s,relativePath:await e.getRelativePath(c),languageId:c.languageId,source:c.getText(),offset:a}),i.add(s),n+=c.getText().length,this.fileCountExceeded(o)))break}}else if(n===s.BeforeCurrentFile){let n=0,i=null;const s=new Set;for(const{uri:a,offset:l}of c){const c=await this.tryGetTextDocument(e,a);if(void 0!==c&&!this.fileLengthExceeded(n,c)&&"file"===c.uri.scheme&&c.languageId===r){if(c.fileName!==t&&i===t&&!s.has(a)&&(s.add(a),o.push({uri:a,relativePath:await e.getRelativePath(c),languageId:c.languageId,source:c.getText(),offset:l}),n+=c.getText().length,this.fileCountExceeded(o)))break;i=c.fileName}}}else if(n===s.MostCount){let n=null;const i=new Map;for(const{uri:o,offset:s,timestamp:l}of c){if(null!==n&&n-l>a.MAX_MOST_RECENT_TIME_RANGE)break;const c=await this.tryGetTextDocument(e,o);if(void 0!==c&&"file"===c.uri.scheme&&c.fileName!==t&&c.languageId===r){null===n&&(n=l);const e=i.get(o)??{uri:o,offset:s,timestamp:l,count:0,doc:c};e.count+=1,i.set(o,e)}}const s=[...i.entries()].sort(((e,t)=>t[1].count-e[1].count));let l=0;for(const[t,r]of s){const n=r.doc,i=r.offset;if(!this.fileLengthExceeded(l,n)&&(o.push({uri:t,relativePath:await e.getRelativePath(n),languageId:n.languageId,source:n.getText(),offset:i}),l+=n.getText().length,this.fileCountExceeded(o)))break}}return o}fileCountExceeded(e){return e.length>=a.MAX_NEIGHBOR_FILES}fileLengthExceeded(e,t){return e+t.getText().length>a.MAX_NEIGHBOR_AGGREGATE_LENGTH}async getOpenFiles(e,t,r){const n=[],o=(0,i.sortByAccessTimes)(e.textDocuments);let s=0;for(const i of o)if(!this.fileLengthExceeded(s,i)&&("file"==i.uri.scheme&&i.fileName!==t&&i.languageId===r&&(n.push({uri:i.uri.toString(),relativePath:await e.getRelativePath(i),languageId:i.languageId,source:i.getText()}),s+=i.getText().length),this.fileCountExceeded(n)))break;return n}async getNeighborFiles(e,t,r){const n=await this.getOpenFiles(e,t.fsPath,r);if(this.openFileStrategy)return{docs:n,neighborSource:new Map([[o.Open,n.map((e=>e.uri))]])};{const i=await this.getCursorHistoryFiles(e,t.fsPath,r,this.cursorHistoryStrategy);return{docs:i,neighborSource:new Map([[o.Open,n.map((e=>e.uri))],[o.Cursor,i.map((e=>e.uri))]])}}}}t.NeighborSource=a,a.MAX_NEIGHBOR_AGGREGATE_LENGTH=2e5,a.MAX_NEIGHBOR_FILES=20,a.MAX_MOST_RECENT_TIME_RANGE=18e5},47917:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.indentationBlockFinished=t.completionCutOrContinue=t.contextIndentationFromText=t.contextIndentation=t.getNodeStart=t.isBlockBodyFinished=t.isEmptyBlockStart=void 0;const n=r(52369),i=r(2273);t.isEmptyBlockStart=function(e,t){return i.isEmptyBlockStart(e.languageId,e.getText(),e.offsetAt(t))},t.isBlockBodyFinished=function(e,t,r,o){const s=e.get(n.LocationFactory),a=t.getText(s.range(s.position(0,0),r)),c=t.offsetAt(r);return i.isBlockBodyFinished(t.languageId,a,o,c)},t.getNodeStart=async function(e,t,r,o){const s=e.get(n.LocationFactory),a=t.getText(s.range(s.position(0,0),r))+o,c=await i.getNodeStart(t.languageId,a,t.offsetAt(r));if(c)return t.positionAt(c)};const o=["\\{","\\}","\\[","\\]","\\(","\\)"].concat(["then","else","elseif","elif","catch","finally","fi","done","end","loop","until","where","when"].map((e=>e+"\\b"))),s=new RegExp(`^(${o.join("|")})`);function a(e){return s.test(e.trimLeft().toLowerCase())}function c(e){const t=/^(\s*)([^]*)$/.exec(e);return t&&t[2]&&t[2].length>0?t[1].length:void 0}function l(e,t,r){const n=e.slice(0,t).split("\n"),i=e.slice(t).split("\n");function o(e,t,n){let i,o,s=t;for(;void 0===i&&s>=0&&s=0&&!e[s].trim().startsWith('"""');)s--;if(s>=0)for(i=void 0,s--;void 0===i&&s>=0;)i=c(e[s]),o=s,s--}}return[i,o]}const[s,a]=o(n,n.length-1,-1),l=(()=>{if(void 0!==s&&void 0!==a)for(let e=a-1;e>=0;e--){const t=c(n[e]);if(void 0!==t&&t{const n=u(r,e,t);return"continue"===n?void 0:n}}},24090:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extractPrompt=t.trimLastLine=t._contextTooShort=t.MIN_PROMPT_CHARS=void 0;const n=r(44617),i=r(39800),o=r(16905),s=r(70819),a=r(29975),c=r(2273),l=r(3591);function u(e){const t=e.split("\n"),r=t[t.length-1],n=r.length-r.trimRight().length,i=e.slice(0,e.length-n),o=e.substr(i.length);return[r.length==n?i:e,o]}async function d(e,r,d,p,h,f){const g=(0,l.extractRepoInfoInBackground)(e,h.fsPath),m=(0,l.tryGetGitHubNWO)(g)??"",y=await(0,l.getUserKind)(e),v=(0,l.getDogFood)(g),_=await(0,i.suffixPercent)(e,m,f,y,v),b=await(0,i.fimSuffixLengthThreshold)(e,m,f,y,v);if((_>0?r.length:d)0&&(w={...w,includeSiblingFunctions:n.SiblingOption.NoSiblings,suffixPercent:x,suffixMatchThreshold:k,fimSuffixLengthThreshold:I});const A=e.get(n.FileSystem);return{neighborSource:S,...await(0,c.getPrompt)(A,h,w,T)}}(e,r,d,p,h,f),[I,A]=u(C),P=Date.now();return{type:"prompt",prompt:{prefix:I,suffix:E,isFimEnabled:_>0&&E.length>b,promptElementRanges:x.ranges},trailingWs:A,promptChoices:T,computeTimeMs:P-w,promptBackground:S,neighborSource:k}}async function p(e,t,r){const n=await e.get(s.TextDocumentManager).getRelativePath(t);return d(e,t.getText(),t.offsetAt(r),n,t.uri,t.languageId)}t.MIN_PROMPT_CHARS=10,t._contextTooShort={type:"contextTooShort"},t.trimLastLine=u,t.extractPrompt=function(e,t,r){const n=e.get(s.TextDocumentManager).findNotebook(t);return void 0===n?p(e,t,r):async function(e,t,r,n){const i=r.getCells().find((e=>e.document.uri===t.uri));if(i){const o=r.getCells().filter((e=>e.index0?o.map((e=>e.document.getText())).join("\n\n")+"\n\n":"",c=a+t.getText(),l=a.length+t.offsetAt(n),u=await e.get(s.TextDocumentManager).getRelativePath(t);return d(e,c,l,u,t.uri,i.document.languageId)}return p(e,t,n)}(e,t,n,r)}},2273:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parsesWithoutError=t.getPrompt=t.getNodeStart=t.getFunctionPositions=t.getBlockCloseToken=t.isSupportedLanguageId=t.isBlockBodyFinished=t.isEmptyBlockStart=t.terminate=t.init=void 0;const n=r(44617);let i=null;const o=new Map;let s=0;t.init=function(t,u,d){if(!u){const t=r(13094);for(const r of[...a,...c])e.exports[r]=t[r];return}for(const r of a)e.exports[r]=l(t,d,r);e.exports.getPrompt=function(e,t){return function(r,...n){const a=s++;return new Promise(((r,s)=>{o.set(a,{resolve:r,reject:s}),t.debug(e,`Proxy getPrompt - ${a}`),i?.postMessage({id:a,fn:"getPrompt",args:n})}))}}(t,d),i=n.createWorker(),o.clear(),s=0;const p=t.get(n.FileSystem);function h(e){d.error(t,e);for(const t of o.values())t.reject(e);o.clear()}i.on("message",(({id:e,err:r,res:n})=>{const i=o.get(e);d.debug(t,`Response ${e} - ${n}, ${r}`),i&&(o.delete(e),r?i.reject(r):i.resolve(n))})),i.on("error",h),i.on("exit",(e=>{0!==e&&h(new Error(`Worker thread exited with code ${e}.`))})),i.on("readFileReq",(e=>{d.debug(t,`READ_FILE_REQ - ${e}`),p.readFile(e).then((e=>{i?.emit("readFileRes",e)})).catch(h)})),i.on("mtimeRes",(e=>{d.debug(t,`mTime_REQ - ${e}`),p.mtime(e).then((e=>{i?.emit("mtimeRes",e)})).catch(h)}))},t.terminate=function(){i&&(i.removeAllListeners(),i.terminate(),i=null,o.clear())};const a=["getFunctionPositions","isEmptyBlockStart","isBlockBodyFinished","getNodeStart","parsesWithoutError"],c=["isSupportedLanguageId","getBlockCloseToken","getPrompt"];function l(e,t,r){return function(...n){const a=s++;return new Promise(((s,c)=>{o.set(a,{resolve:s,reject:c}),t.debug(e,`Proxy ${r}`),i?.postMessage({id:a,fn:r,args:n})}))}}t.isEmptyBlockStart=n.isEmptyBlockStart,t.isBlockBodyFinished=n.isBlockBodyFinished,t.isSupportedLanguageId=n.isSupportedLanguageId,t.getBlockCloseToken=n.getBlockCloseToken,t.getFunctionPositions=n.getFunctionPositions,t.getNodeStart=n.getNodeStart,t.getPrompt=n.getPrompt,t.parsesWithoutError=n.parsesWithoutError},3591:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ComputationStatus=t.getRepoUrlFromConfigText=t.parseRepoUrl=t.extractRepoInfoForTesting=t.extractRepoInfoInBackground=t.tryGetGitHubNWO=t.getDogFood=t.getUserKind=t.isNotRepo=t.isRepoInfo=void 0;const n=r(44617),i=r(36314),o=r(71017),s=r(35765),a=r(70140);function c(e){if(void 0!==e&&e!==h.PENDING)return"github.com"===e.hostname?e.owner+"/"+e.repo:void 0}t.isRepoInfo=function(e){return void 0!==e&&e!==h.PENDING},t.isNotRepo=function(e){return void 0===e},t.getUserKind=async function(e){const t=(await e.get(s.CopilotTokenManager).getCopilotToken(e,!1)).organization_list??[];return["a5db0bcaae94032fe715fb34a5e4bce2","7184f66dfcee98cb5f08a1cb936d5225","4535c7beffc844b46bb1ed4aa04d759a"].find((e=>t.includes(e)))??""},t.getDogFood=function(e){if(void 0===e)return"";if(e===h.PENDING)return"";const t=c(e);if("github/github"===t)return t;const r=function(e){if(void 0!==e&&e!==h.PENDING)return e.hostname.endsWith("azure.com")||e.hostname.endsWith("visualstudio.com")?e.owner+"/"+e.repo:void 0}(e)?.toLowerCase();return void 0!==r?r:""},t.tryGetGitHubNWO=c,t.extractRepoInfoInBackground=function(e,t){if(!t)return;const r=(0,o.dirname)(t);return l(e,r)};const l=function(e,t){const r=new a.LRUCache(1e4),n=new Set;return(t,...i)=>{const o=JSON.stringify(i),s=r.get(o);if(s)return s.result;if(n.has(o))return h.PENDING;const a=e(t,...i);return n.add(o),a.then((e=>{r.put(o,new f(e)),n.delete(o)})),h.PENDING}}(u);async function u(e,t){const r=await async function(e,t){let r=t+"_add_to_make_longer";const i=e.get(n.FileSystem);for(;t.length>1&&t.length{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isRepetitive=t.RepetitionFilterMode=void 0;const r=[{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}];var n;function i(e){const t=function(e){const t=Array(e.length).fill(0);t[0]=-1;let r=-1;for(let n=1;n=0&&e[r+1]!==e[n];)r=t[r];e[r+1]===e[n]&&r++,t[n]=r}return t}(e);for(const n of r)if(!(e.lengthe.trim().length>0)))}},59558:(e,t)=>{"use strict";function r(e,t,r=((e,t)=>e===t?0:1)){if(0===t.length||0===e.length)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),s=new Array(e.length+1).fill(0),a=t[0];for(let t=0;t0?t-1:0;for(let c=1;c0&&(yield r),r=i,n=e)}r.length>0&&(yield r)}function s(e,t,r,n){const i=[];let o=0;for(const s of r(e))n(s)&&(t.has(s)||t.set(s,t.size),i.push([t.get(s),o])),o+=s.length;return[i,t]}function a(e){return" "!==e}Object.defineProperty(t,"__esModule",{value:!0}),t.lexEditDistance=t.lexicalAnalyzer=t.lexGeneratorWords=t.reverseLexDictionary=t.emptyLexDictionary=t.editDistance=void 0,t.editDistance=r,t.emptyLexDictionary=n,t.reverseLexDictionary=i,t.lexGeneratorWords=o,t.lexicalAnalyzer=s,t.lexEditDistance=function(e,t,c=o){const[l,u]=s(e,n(),c,a),[d,p]=s(t,u,c,a);if(0===d.length||0===l.length)return{lexDistance:d.length,startOffset:0,endOffset:0,haystackLexLength:l.length,needleLexLength:d.length};const h=i(p),f=d.length,g=h[d[0][0]],m=h[d[f-1][0]],y=r(l.map((e=>e[0])),d.map((e=>e[0])),(function(e,t,r,n){if(0===n||n===f-1){const e=h[l[r][0]];return 0==n&&e.endsWith(g)||n==f-1&&e.startsWith(m)?0:1}return e===t?0:1})),v=l[y.startOffset][1];let _=y.endOffset0&&" "===e[_-1]&&--_,{lexDistance:y.distance,startOffset:v,endOffset:_,haystackLexLength:l.length,needleLexLength:d.length}}},11523:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ghostTextDisplayQuantiles=t.ghostTextDisplayLanguageParameters=t.ghostTextDisplayMeanAlternativeLogProbParameter=t.ghostTextDisplayMeanLogProbParameter=t.ghostTextDisplayLog1pcompCharLenParameter=t.ghostTextDisplayInterceptParameter=void 0,t.ghostTextDisplayInterceptParameter=2.98410452738298,t.ghostTextDisplayLog1pcompCharLenParameter=-.838732736843507,t.ghostTextDisplayMeanLogProbParameter=1.50314646255716,t.ghostTextDisplayMeanAlternativeLogProbParameter=-.237798634012662,t.ghostTextDisplayLanguageParameters={python:.314368072478742},t.ghostTextDisplayQuantiles={.01:.225800751784931,.02:.290204307767402,.03:.333153496466045,.05:.404516749849559,.1:.513216040545626,.2:.626904979128674,.3:.694880719658273,.4:.743100684947291,.5:.782524520571946,.6:.816856186092243,.7:.84922977716585,.8:.883694877241999,.9:.921859050950077,.95:.944571268106974,.99:.969535563141733}},71153:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ghostTextScoreQuantile=t.ghostTextScoreConfidence=void 0;const n=r(5798),i=r(11523),o=(new n.Logger(n.LogLevel.INFO,"restraint"),{link:e=>Math.exp(e)/(1+Math.exp(e)),unlink:e=>Math.log(e/(1-e))});class s{constructor(e,t,r){this.name=e,this.coefficient=t,this.transformation=r||(e=>e)}contribution(e){return this.coefficient*this.transformation(e)}}const a=new class{constructor(e,t,r){if(this.link=o,this.intercept=e,this.coefficients=t,this.logitsToQuantiles=new Map,this.logitsToQuantiles.set(0,0),this.logitsToQuantiles.set(1,1),r)for(const e in r)this.logitsToQuantiles.set(r[e],Number(e))}predict(e,t){let r=this.intercept;for(const e of this.coefficients){const n=t[e.name];if(void 0===n)return NaN;r+=e.contribution(n)}return this.link.link(r)}quantile(e,t){return function(e,t){const r=Math.min(...Array.from(t.keys()).filter((t=>t>=e))),n=Math.max(...Array.from(t.keys()).filter((t=>tMath.log(1+e))),new s("meanLogProb",i.ghostTextDisplayMeanLogProbParameter),new s("meanAlternativeLogProb",i.ghostTextDisplayMeanAlternativeLogProbParameter)].concat(Object.entries(i.ghostTextDisplayLanguageParameters).map((e=>new s(e[0],e[1])))),i.ghostTextDisplayQuantiles);t.ghostTextScoreConfidence=function(e,t){const r={...t.measurements};return Object.keys(i.ghostTextDisplayLanguageParameters).forEach((e=>{r[e]=t.properties["customDimensions.languageId"]==e?1:0})),a.predict(e,r)},t.ghostTextScoreQuantile=function(e,t){const r={...t.measurements};return Object.keys(i.ghostTextDisplayLanguageParameters).forEach((e=>{r[e]=t.properties["customDimensions.languageId"]==e?1:0})),a.quantile(e,r)}},3883:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkSuffix=t.postProcessChoice=void 0;const n=r(16905),i=r(2273),o=r(65489),s=r(20913),a=r(54604);t.postProcessChoice=async function(e,t,r,c,l,u,d){if((0,a.isRepetitive)(l.tokens,await e.get(n.Features).repetitionFilterMode())){const t=o.TelemetryData.createAndMarkAsIssued();return t.extendWithRequestId(l.requestId),(0,o.telemetry)(e,"repetition.detected",t,!0),void d.info(e,"Filtered out repetitive solution")}const p={...l};if(function(e,t,r){let n="",i=t.line+1;for(;""===n&&i1);return n}(e,r,c,p.completionText,u),p.completionText?p:void 0},t.checkSuffix=function(e,t,r){const n=e.lineAt(t.line).text.substring(t.character);if(n.length>0){if(-1!==r.completionText.indexOf(n))return!0;{let e=0;for(const t of n){const n=r.completionText.indexOf(t,e+1);if(!(n>e)){e=-1;break}e=n}return-1!==e}}return!1}},65489:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.logEnginePrompt=t.logEngineCompletion=t.telemetryError=t.telemetryException=t.telemetryRaw=t.telemetryExpProblem=t.telemetry=t.TelemetryEndpointUrl=t.now=t.telemetrizePromptLength=t.TelemetryData=t.TelemetryUserConfig=t.TelemetryReporters=t.CopilotTelemetryReporter=void 0;const n=r(86236),i=r(7057),o=r(40084),s=r(39800),a=r(16905),c=r(74914),l=r(20913),u=r(96712),d=r(59591);t.CopilotTelemetryReporter=class{};class p{getReporter(e){return this.reporter}getSecureReporter(e){return y(e)?this.reporterSecure:(0,l.shouldFailForDebugPurposes)(e)?new u.FailingTelemetryReporter:void 0}setReporter(e){this.reporter=e}setSecureReporter(e){this.reporterSecure=e}async deactivate(){let e=Promise.resolve();this.reporter&&(e=this.reporter.dispose(),this.reporter=void 0);let t=Promise.resolve();this.reporterSecure&&(t=this.reporterSecure.dispose(),this.reporterSecure=void 0),await Promise.all([e,t])}}t.TelemetryReporters=p;class h{constructor(e,t,r){this.trackingId=t,this.optedIn=r??!1,this.setupUpdateOnToken(e)}setupUpdateOnToken(e){e.get(o.CopilotTokenNotifier).on("onCopilotToken",(e=>{const t="1"===e.getTokenValue("rt"),r=e.getTokenValue("tid");void 0!==r&&(this.trackingId=r,this.optedIn=t)}))}}t.TelemetryUserConfig=h;class f{constructor(e,t,r){this.properties=e,this.measurements=t,this.issuedTime=r}static createAndMarkAsIssued(e,t){return new f(e||{},t||{},m())}extendedBy(e,t){const r={...this.properties,...e},n={...this.measurements,...t},i=new f(r,n,this.issuedTime);return i.displayedTime=this.displayedTime,i.filtersAndExp=this.filtersAndExp,i}markAsDisplayed(){void 0===this.displayedTime&&(this.displayedTime=m())}async extendWithExpTelemetry(e){this.filtersAndExp||await e.get(a.Features).addExpAndFilterToTelemetry(this),this.filtersAndExp.exp.addToTelemetry(this),this.filtersAndExp.filters.addToTelemetry(this)}extendWithEditorAgnosticFields(e){this.properties.editor_version=(0,s.formatNameAndVersion)(e.get(s.EditorAndPluginInfo).getEditorInfo(e)),this.properties.editor_plugin_version=(0,s.formatNameAndVersion)(e.get(s.EditorAndPluginInfo).getEditorPluginInfo(e));const t=e.get(s.EditorSession);this.properties.client_machineid=t.machineId,this.properties.client_sessionid=t.sessionId,this.properties.copilot_version=`copilot/${(0,s.getVersion)(e)}`,this.properties.common_extname=e.get(s.EditorAndPluginInfo).getEditorPluginInfo(e).name,this.properties.common_extversion=e.get(s.EditorAndPluginInfo).getEditorPluginInfo(e).version}extendWithConfigProperties(e){const t=(0,s.dumpConfig)(e);t["copilot.build"]=(0,s.getBuild)(e),t["copilot.buildType"]=(0,s.getBuildType)(e);const r=e.get(h);r.trackingId&&(t["copilot.trackingId"]=r.trackingId),this.properties={...this.properties,...t}}extendWithRequestId(e){const t={completionId:e.completionId,created:e.created.toString(),headerRequestId:e.headerRequestId,serverExperiments:e.serverExperiments,deploymentId:e.deploymentId};this.properties={...this.properties,...t}}static maybeRemoveRepoInfoFromPropertiesHack(e,t){if(e)return t;const r={};for(const e in t)f.keysToRemoveFromStandardTelemetryHack.includes(e)||(r[e]=t[e]);return r}sanitizeKeys(){this.properties=f.sanitizeKeys(this.properties),this.measurements=f.sanitizeKeys(this.measurements)}static sanitizeKeys(e){e=e||{};const t={};for(const r in e)t[f.keysExemptedFromSanitization.includes(r)?r:r.replace(/\./g,"_")]=e[r];return t}updateTimeSinceIssuedAndDisplayed(){const e=m()-this.issuedTime;if(this.measurements.timeSinceIssuedMs=e,void 0!==this.displayedTime){const e=m()-this.displayedTime;this.measurements.timeSinceDisplayedMs=e}}validateData(e,t){let r;if(f.validateTelemetryProperties(this.properties)||(r={problem:"properties",error:JSON.stringify(f.validateTelemetryProperties.errors)}),!f.validateTelemetryMeasurements(this.measurements)){const e=JSON.stringify(f.validateTelemetryMeasurements.errors);void 0===r?r={problem:"measurements",error:e}:(r.problem="both",r.error+=`; ${e}`)}if(void 0===r)return!0;if((0,l.shouldFailForDebugPurposes)(e))throw new Error(`Invalid telemetry data: ${r.problem} ${r.error} properties=${JSON.stringify(this.properties)} measurements=${JSON.stringify(this.measurements)}`);return b(e,"invalidTelemetryData",f.createAndMarkAsIssued({properties:JSON.stringify(this.properties),measurements:JSON.stringify(this.measurements),problem:r.problem,validationError:r.error}),t),t&&b(e,"invalidTelemetryData_in_secure",f.createAndMarkAsIssued({problem:r.problem,requestId:this.properties.requestId??"unknown"}),!1),!1}async makeReadyForSending(e,t,r){this.extendWithConfigProperties(e),this.extendWithEditorAgnosticFields(e),this.sanitizeKeys(),"IncludeExp"===r&&await this.extendWithExpTelemetry(e),this.updateTimeSinceIssuedAndDisplayed(),this.validateData(e,t)||(this.properties.telemetry_failed_validation="true"),_(this.properties)}}function g(e,t,r,n){const i=t?e.get(p).getSecureReporter(e):e.get(p).getReporter(e);i&&i.sendTelemetryEvent(r,f.maybeRemoveRepoInfoFromPropertiesHack(t,n.properties),n.measurements)}function m(){return(new Date).getTime()}function y(e){return e.get(h).optedIn}async function v(e,t,r,n){if(n&&!y(e))return;const i=r||f.createAndMarkAsIssued({},{});await i.makeReadyForSending(e,n??!1,"IncludeExp"),g(e,n??!1,t,i)}function _(e){e.unique_id=i.v4()}async function b(e,t,r,n){if(n&&!y(e))return;const i=r||f.createAndMarkAsIssued({},{});await i.makeReadyForSending(e,n??!1,"IncludeExp"),function(e,t,r,n){const i=t?e.get(p).getSecureReporter(e):e.get(p).getReporter(e);i&&i.sendTelemetryErrorEvent(r,f.maybeRemoveRepoInfoFromPropertiesHack(t,n.properties),n.measurements)}(e,n??!1,t,i)}t.TelemetryData=f,f.ajv=new n.default({strictNumbers:!1}),f.validateTelemetryProperties=f.ajv.compile({type:"object",additionalProperties:{type:"string"},required:[]}),f.validateTelemetryMeasurements=f.ajv.compile({type:"object",properties:{meanLogProb:{type:"number",nullable:!0},meanAlternativeLogProb:{type:"number",nullable:!0}},additionalProperties:{type:"number"},required:[]}),f.keysExemptedFromSanitization=[c.ExpServiceTelemetryNames.assignmentContextTelemetryPropertyName,c.ExpServiceTelemetryNames.featuresTelemetryPropertyName],f.keysToRemoveFromStandardTelemetryHack=["gitRepoHost","gitRepoName","gitRepoOwner","gitRepoUrl","gitRepoPath","repo","request_option_nwo"],t.telemetrizePromptLength=function(e){return e.isFimEnabled?{promptPrefixCharLen:e.prefix.length,promptSuffixCharLen:e.suffix.length}:{promptCharLen:e.prefix.length}},t.now=m,t.TelemetryEndpointUrl=class{constructor(e="https://copilot-telemetry.githubusercontent.com/telemetry"){this.url=e}getUrl(){return this.url}setUrlForTesting(e){this.url=e}},t.telemetry=v,t.telemetryExpProblem=async function(e,t){const r=f.createAndMarkAsIssued(t,{});await r.makeReadyForSending(e,!1,"SkipExp"),g(e,!1,"expProblem",r)},t.telemetryRaw=async function(e,t,r,n){_(r),g(e,!1,t,{properties:r,measurements:n})},t.telemetryException=async function(e,t,r,n){const i=t instanceof Error?t:new Error("Non-error thrown: "+t),o=y(e),s=f.createAndMarkAsIssued({origin:(0,d.redactPaths)(r),reason:o?"Exception logged to restricted telemetry":"Exception, not logged due to opt-out",...n});if(await s.makeReadyForSending(e,!1,"IncludeExp"),g(e,!1,"exception",s),!o)return;const a=f.createAndMarkAsIssued({origin:r,...n});await a.makeReadyForSending(e,!0,"IncludeExp"),function(e,t,r,n){const i=e.get(p).getSecureReporter(e);i&&i.sendTelemetryException(r,f.maybeRemoveRepoInfoFromPropertiesHack(true,n.properties),n.measurements)}(e,0,i,a)},t.telemetryError=b,t.logEngineCompletion=async function(e,t,r,n,i){const o=f.createAndMarkAsIssued({completionTextJson:JSON.stringify(t),choiceIndex:i.toString()});if(r.logprobs)for(const[e,t]of Object.entries(r.logprobs))o.properties["logprobs_"+e]=JSON.stringify(t)??"unset";o.extendWithRequestId(n),await v(e,"engine.completion",o,!0)},t.logEnginePrompt=async function(e,t,r){let n;n=t.isFimEnabled?{promptPrefixJson:JSON.stringify(t.prefix),promptSuffixJson:JSON.stringify(t.suffix),promptElementRanges:JSON.stringify(t.promptElementRanges)}:{promptJson:JSON.stringify(t.prefix),promptElementRanges:JSON.stringify(t.promptElementRanges)};const i=r.extendedBy(n);await v(e,"engine.prompt",i,!0)}},89531:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.forceSendingTelemetry=t.hackOptOutListener=t.setupStandardReporters=t.APP_INSIGHTS_KEY_SECURE=t.APP_INSIGHTS_KEY=void 0;const n=r(29929),i=r(39800),o=r(65489),s=r(3855);function a(e,t,r,i){const o=new n.default(t,r,i);return l(e,o),o}function c(e,t,r){if(r){const n=r.getDelegate(),i=n;i.userOptIn=!0,i.createAppInsightsClient(t),l(e,n)}}function l(e,t){const r=t;if(r.appInsightsClient){const t=r.appInsightsClient.commonProperties,n=o.TelemetryData.sanitizeKeys(t);r.appInsightsClient.commonProperties=n,r.appInsightsClient.context.tags[r.appInsightsClient.context.keys.cloudRoleInstance]="REDACTED",r.appInsightsClient.context.tags[r.appInsightsClient.context.keys.sessionId]=e.get(i.EditorSession).sessionId,r.appInsightsClient.context.tags[r.appInsightsClient.context.keys.userId]=e.get(i.EditorSession).machineId;const s=e.get(o.TelemetryEndpointUrl).getUrl();r.appInsightsClient.config.endpointUrl=s}}t.APP_INSIGHTS_KEY="7d7048df-6dd0-4048-bb23-b716c1461f8f",t.APP_INSIGHTS_KEY_SECURE="3fdd7f28-937a-48c8-9a21-ba337db23bd1",t.setupStandardReporters=function(e,r){const n=(0,i.getVersion)(e);let c=a(e,r,n,t.APP_INSIGHTS_KEY),l=a(e,r,n,t.APP_INSIGHTS_KEY_SECURE);c=new s.LoggingTelemetryReporter(e,"standard",c),l=new s.LoggingTelemetryReporter(e,"secure",l);const u=e.get(o.TelemetryReporters);u.setReporter(c),u.setSecureReporter(l)},t.hackOptOutListener=function(e){const t=e.get(o.TelemetryReporters);t.getReporter(e).hackOptOutListener(),t.getSecureReporter(e).hackOptOutListener()},t.forceSendingTelemetry=function(e){const r=e.get(o.TelemetryReporters);try{c(e,t.APP_INSIGHTS_KEY,r.getReporter(e)),c(e,t.APP_INSIGHTS_KEY_SECURE,r.getSecureReporter(e))}catch(e){}}},3855:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoggingTelemetryReporter=void 0;const n=r(5798),i=r(20913);t.LoggingTelemetryReporter=class{constructor(e,t,r){this.ctx=e,this.reporter=r;const o=e.get(i.RuntimeMode).flags;this.logger=new n.Logger(n.LogLevel.DEBUG,`telemetry-${t}`),this.enabled=o.telemetryLogging,this.verbose=o.verboseLogging}sendTelemetryEvent(e,t,r){this.reporter.sendTelemetryEvent(e,t,r),this.log(e,t,r)}sendTelemetryErrorEvent(e,t,r){this.reporter.sendTelemetryErrorEvent(e,t,r),this.log(e,t,r)}sendTelemetryException(e,t,r){this.reporter.sendTelemetryException(e,t,r),this.log("exception:"+e.message,t,r)}log(e,t,r){this.enabled&&(this.verbose?this.logger.info(this.ctx,e,t,r):this.logger.info(this.ctx,e))}hackOptOutListener(){this.reporter.optOutListener={dispose(){}}}dispose(){return this.reporter.dispose()}getDelegate(){return this.reporter}}},72406:(e,t)=>{"use strict";function r(e){return e.replace(/\s/g,"")}Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeNewlines=t.asReadableCert=void 0,t.asReadableCert=function(e){const t=e.indexOf("-----BEGIN CERTIFICATE-----")+27,n=e.indexOf("-----END CERTIFICATE-----");return r(e.substring(t,t+30)+"..."+e.substring(n-30,n-1))},t.normalizeNewlines=r},4630:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createLibTestingContext=t._createBaselineContext=void 0;const n=r(44617),i=r(57147),o=r(35765),s=r(40084),a=r(32137),c=r(39800),l=r(75611),u=r(70769),d=r(16905),p=r(66046),h=r(96817),f=r(54619),g=r(63405),m=r(20190),y=r(5798),v=r(15291),_=r(57158),b=r(20039),w=r(69035),C=r(70216),E=r(86635),T=r(65489),S=r(89531),x=r(52369),k=r(70819),I=r(84567),A=r(82161),P=r(20913),R=r(66584),N=r(67066),O=r(35095),L=r(80751);function D(e){const t=new l.Context;return t.set(c.ConfigProvider,e),t.set(c.BuildInfo,new c.BuildInfo),t.set(P.RuntimeMode,P.RuntimeMode.fromEnvironment(!0)),t.set(v.RootCertificateReader,(0,A.createTestCertificateReader)([])),t.set(b.Fetcher,new _.HelixFetcher(t)),t.set(y.LogVerbose,new y.LogVerbose(!1)),t.set(a.Clock,new a.Clock),t.set(p.ExpConfigMaker,new p.ExpConfigNone),t.set(f.GhostTextDebounceManager,new f.GhostTextDebounceManager),t.set(h.ContextualFilterManager,new h.ContextualFilterManager),t.set(s.CopilotTokenNotifier,new s.CopilotTokenNotifier),t.set(T.TelemetryUserConfig,new T.TelemetryUserConfig(t,"tid=test",!0)),t.set(O.TestProductFeatures,new O.TestProductFeatures(t)),t.set(T.TelemetryReporters,new T.TelemetryReporters),t.set(w.NotificationSender,new R.TestNotificationSender),t.set(I.UrlOpener,new R.TestUrlOpener),t.set(y.LogTarget,new y.ConsoleLog(console)),t.set(u.UserErrorNotifier,new u.UserErrorNotifier),t.set(T.TelemetryEndpointUrl,new T.TelemetryEndpointUrl),t.set(c.EditorSession,new c.EditorSession("test-session","test-machine")),(0,S.setupStandardReporters)(t,"copilot-test"),t.set(d.Features,new d.Features(t)),t.set(C.PostInsertionNotifier,new C.PostInsertionNotifier),t.set(c.BlockModeConfig,new c.ConfigBlockModeConfig),t.set(o.CopilotTokenManager,new o.FixedCopilotTokenManager("tid=test")),t.set(E.StatusReporter,new E.NoOpStatusReporter),t.set(g.HeaderContributors,new g.HeaderContributors),t.set(m.LanguageDetection,new N.TestLanguageDetection),t}t._createBaselineContext=D,t.createLibTestingContext=function(){const e=D(new c.DefaultsOnlyConfigProvider);return e.set(c.EditorAndPluginInfo,new M),e.set(x.LocationFactory,new L.TestLocationFactory),e.set(k.TextDocumentManager,new L.TestTextDocumentManager),e.set(n.FileSystem,B),e};class M extends c.EditorAndPluginInfo{getEditorInfo(e){return{name:"lib-tests-editor",version:"1"}}getEditorPluginInfo(e){return{name:"lib-tests-plugin",version:"2"}}}const B={readFile:function(e){return i.promises.readFile(e)},mtime:async function(e){return(await i.promises.stat(e)).mtimeMs},stat:async function(e){const t=await i.promises.stat(e);return{ctime:t.ctimeMs,mtime:t.mtimeMs,size:t.size}}}},45922:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.readTestingGitHubToken=t.getTestingCopilotTokenManager=void 0;const n=r(57147),i=r(35765),o=`${process.env.HOME}/.copilot-testing-gh-token`;let s;t.getTestingCopilotTokenManager=function(){return s||(s=a()),s};const a=()=>{const e=c();if(e)return new i.CopilotTokenManagerFromGitHubToken({token:e});if(process.env.GH_COPILOT_TOKEN)return new i.FixedCopilotTokenManager(process.env.GH_COPILOT_TOKEN);if(process.env.GITHUB_TOKEN)return new i.CopilotTokenManagerFromGitHubToken({token:process.env.GITHUB_TOKEN});throw new Error(`Tests: either GH_COPILOT_TOKEN, or GITHUB_TOKEN, must be set, or there must be a GitHub token from an app with access to Copilot in ${o}. Run "npm run get_token" to get one.`)};function c(){if(n.existsSync(o))return n.readFileSync(o).toString()}t.readTestingGitHubToken=c},82161:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createFakeStreamResponse=t.createFakeResponse=t.createTestCertificateReader=void 0;const n=r(12781),i=r(20039),o=r(15291);class s extends o.RootCertificateReader{constructor(e){super(),this.certificates=e}async getAllRootCAs(){return this.certificates}}t.createTestCertificateReader=e=>new s(e),t.createFakeResponse=function(e,t="body"){return new i.Response(e,"status text",new a,(()=>Promise.resolve("response-text")),(()=>Promise.resolve(t)),(async()=>null))},t.createFakeStreamResponse=function(e){return new i.Response(200,"Success",new a,(async()=>e),(async()=>null),(async()=>function(...e){const t=new n.Readable;t._read=()=>{};for(const r of e)t.push(r);return t.push(null),t}(e)))};class a{constructor(){this.headers=new Map}append(e,t){this.headers.set(e,t)}delete(e){this.headers.delete(e)}get(e){return this.headers.get(e)??null}has(e){return this.headers.has(e)}set(e,t){this.headers.set(e,t)}entries(){return this.headers.entries()}keys(){return this.headers.keys()}values(){return this.headers.values()}[Symbol.iterator](){return this.headers.entries()}}},20913:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isVerboseLoggingEnabled=t.isDebugEnabled=t.shouldFailForDebugPurposes=t.isRunningInTest=t.RuntimeMode=void 0;class r{constructor(e){this.flags=e}static fromEnvironment(e){return new r({debug:(t=process.argv,n=process.env,t.includes("--debug")||a(n,"GITHUB_COPILOT_DEBUG")),verboseLogging:i(process.env),telemetryLogging:o(process.env),testMode:e,recordInput:s(process.argv,process.env)});var t,n}}function n(e){return e.get(r).flags.testMode}function i(e){return a(e,"COPILOT_AGENT_VERBOSE")}function o(e){return a(e,"COPILOT_LOG_TELEMETRY")}function s(e,t){return e.includes("--record")||a(t,"GITHUB_COPILOT_RECORD")}function a(e,t){if(t in e){const r=e[t];return"1"===r||"true"===r?.toLowerCase()}return!1}t.RuntimeMode=r,t.isRunningInTest=n,t.shouldFailForDebugPurposes=function(e){return n(e)},t.isDebugEnabled=function(e){return e.get(r).flags.debug},t.isVerboseLoggingEnabled=function(e){return e.get(r).flags.verboseLogging}},96712:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FailingTelemetryReporter=t.assertHasProperty=t.withInlineTelemetryCapture=t.withOptionalTelemetryCapture=t.withTelemetryCapture=t.allEvents=t.isException=t.isEvent=t.isRestrictedTelemetryMessage=t.isStandardTelemetryMessage=t.collectCapturedTelemetry=void 0;const n=r(39491),i=r(75611),o=r(20039),s=r(65489),a=r(89531),c=r(89600);async function l(e){const t=e.get(s.TelemetryEndpointUrl).getUrl(),r=await e.get(o.Fetcher).fetch(t,{}),i=(await r.json()).messages??[];for(const e of i)n.strictEqual(e.tags["ai.cloud.roleInstance"],"REDACTED");return i}function u(e){return"EventData"===e.data.baseType}async function d(e,t,r){const n=await(0,c.startFakeTelemetryServerIfNecessary)(),i=Math.floor(1e5*Math.random()).toString();delete process.env.http_proxy,delete process.env.https_proxy;const o=e.get(s.TelemetryEndpointUrl).getUrl();e.get(s.TelemetryEndpointUrl).setUrlForTesting(`http://localhost:${n}/${i}`),(0,a.setupStandardReporters)(e,"copilot-test"),t&&(0,a.forceSendingTelemetry)(e);try{(0,a.hackOptOutListener)(e);const t=await r(e);return await new Promise((e=>setTimeout(e,2e3))),await e.get(s.TelemetryReporters).deactivate(),await new Promise((e=>setTimeout(e,100))),[await l(e),t]}finally{e.get(s.TelemetryEndpointUrl).setUrlForTesting(o)}}t.collectCapturedTelemetry=l,t.isStandardTelemetryMessage=function(e){return e.iKey===a.APP_INSIGHTS_KEY},t.isRestrictedTelemetryMessage=function(e){return e.iKey===a.APP_INSIGHTS_KEY_SECURE},t.isEvent=u,t.isException=function(e){return"ExceptionData"===e.data.baseType},t.allEvents=function(e){for(const t of e)if(!u(t))return!1;return!0},t.withTelemetryCapture=async function(e,t){return d(new i.Context(e),!0,t)},t.withOptionalTelemetryCapture=async function(e,t){return d(new i.Context(e),!1,t)},t.withInlineTelemetryCapture=async function(e,t){return d(e,!0,t)},t.assertHasProperty=function(e,t){n.ok(e.filter((e=>"ghostText.produced"!==e.data.baseData.name.split("/")[1])).every((e=>{const r=e.data.baseData.properties;return t.call(r,r)})))},t.FailingTelemetryReporter=class{sendTelemetryEvent(e,t,r){throw new Error("Telemetry disabled")}sendTelemetryErrorEvent(e,t,r,n){throw new Error("Telemetry disabled")}sendTelemetryException(e,t,r){throw new Error("Telemetry disabled")}dispose(){return Promise.resolve()}hackOptOutListener(){}}},89600:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.startFakeTelemetryServerIfNecessary=void 0;const n=r(71017),i=r(71267),o=r(12414);let s,a;t.startFakeTelemetryServerIfNecessary=async function(){if(void 0===s){const e=await async function(){return await o({port:5789})}();s=new i.Worker((0,n.resolve)(__dirname,"..","dist","telemetryFakeWorker.js"),{workerData:{port:e}}),await new Promise((e=>setTimeout(e,1e3))),a=e}return a}},66584:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestNotificationSender=t.TestUrlOpener=t.rangeToString=t.positionToString=void 0;const n=r(69035);function i(e){return`${e.line}:${e.character}`}t.positionToString=i,t.rangeToString=function(e){return`[${i(e.start)}--${i(e.end)}]`},t.TestUrlOpener=class{constructor(){this.openedUrls=[]}open(e){this.openedUrls.push(e)}};class o extends n.NotificationSender{constructor(){super(),this.sentMessages=[],this.warningPromises=[]}showWarningMessage(e,...t){this.sentMessages.push(e);const r=t?Promise.resolve(t[0]):Promise.resolve(void 0);return this.warningPromises.push(r),r}async waitForWarningMessages(){await Promise.all(this.warningPromises)}}t.TestNotificationSender=o},67066:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FixedLanguageDetection=t.TestLanguageDetection=void 0;const n=r(39491),i=r(20190);class o extends i.LanguageDetection{constructor(){super(...arguments),this.documents=new Map}async detectLanguage(e){const t=e.uri.toString();let r=this.documents.get(t);return r||(r=new i.Language(e.languageId),this.documents.set(t,r)),r}assertLanguageHasBeenDetected(e,t){const r=this.documents.get(e.toString());n.ok(r,`No language detected for ${e}`),n.deepStrictEqual(r.languageId,t,`Expected language ${t} but got ${r.languageId}`)}}t.TestLanguageDetection=o;class s extends i.LanguageDetection{constructor(e){super(),this.language=e}async detectLanguage(e){return new i.Language(this.language)}}t.FixedLanguageDetection=s},35095:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestProductFeatures=t.ProductFeature=void 0;const n=r(35765),i=r(40084);(t.ProductFeature||(t.ProductFeature={})).selfSignedCerts="ssc";const o={};t.TestProductFeatures=class{constructor(e){this.ctx=e,this.token=new n.CopilotToken("token"),e.get(i.CopilotTokenNotifier).on("onCopilotToken",(e=>{this.token=e}))}enable(e){if("1"!==this.token.getTokenValue(e)){const t=`${this.token.token};${e}=1`;this.ctx.get(i.CopilotTokenNotifier).emit("onCopilotToken",new n.CopilotToken(t,this.token.organization_list),o)}return this}disable(e){if("1"===this.token.getTokenValue(e)){const t=this.token.token.replace(";"+e+"=1","").replace(e+"=1","");this.ctx.get(i.CopilotTokenNotifier).emit("onCopilotToken",new n.CopilotToken(t,this.token.organization_list),o)}return this}}},80751:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestLocationFactory=t.TestTextDocumentManager=t.InMemoryTextDocument=void 0;const n=r(54086);class i{constructor(e,t,r,i,o){this._uri=e,this._textDocument=n.TextDocument.create(e.toString(),t,r,i),this._relativePath=o}get uri(){return this._uri}get relativePath(){return this._relativePath}get fileName(){return this._uri.fsPath}get languageId(){return this._textDocument.languageId}get version(){return this._textDocument.version}get lineCount(){return this._textDocument.lineCount}getText(e){return this._textDocument.getText(e)}positionAt(e){return this._textDocument.positionAt(e)}offsetAt(e){return this._textDocument.offsetAt(e)}lineAt(e){const t="number"==typeof e?e:e.line,r=this.getText().split("\n")[t],n={start:{line:t,character:0},end:{line:t,character:r.length}},i=0===r.trim().length;return{text:r,range:n,isEmptyOrWhitespace:i}}getWordRangeAtPosition(e){}update(e,t){n.TextDocument.update(this._textDocument,e,t)}}t.InMemoryTextDocument=i,t.TestTextDocumentManager=class{constructor(){this._textDocuments=[],this.onDidFocusTextDocument=()=>({dispose:()=>{}}),this.onDidChangeTextDocument=()=>({dispose:()=>{}}),this.onDidChangeCursor=()=>({dispose:()=>{}})}get textDocuments(){return this._textDocuments}async getTextDocument(e){return this.textDocuments.find((t=>t.uri.toString()==e.toString()))}async getRelativePath(e){}setTextDocument(e,t,r){this._textDocuments.push(new i(e,t,0,r))}findNotebook(e){}},t.TestLocationFactory=class{position(e,t){return{line:e,character:t}}range(e,t,r,n){return"number"==typeof e?{start:{line:e,character:t},end:{line:r,character:n}}:{start:e,end:t}}}},52369:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LocationFactory=void 0,t.LocationFactory=class{}},70819:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextDocumentManager=t.getRelativePath=void 0;const n=r(71017);t.getRelativePath=function(e,t){for(const r of e){const e=r.fsPath;if(t.startsWith(e+n.sep))return n.relative(e,t)}},t.TextDocumentManager=class{}},84567:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RealUrlOpener=t.UrlOpener=void 0;const n=r(31814);t.UrlOpener=class{},t.RealUrlOpener=class{async open(e){await n(e)}}},59591:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.redactPaths=void 0,t.redactPaths=function(e){return e.replace(/([\s|(]|file:\/\/)(\/[^\s]+)/g,"$1[redacted]").replace(/([\s|(]|file:\/\/)([a-zA-Z]:[(\\|/){1,2}][^\s]+)/gi,"$1[redacted]").replace(/([\s|(]|file:\/\/)(\\[^\s]+)/gi,"$1[redacted]")}},65614:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultFileSystem=t.FileSystem=void 0;const n=r(57147);t.FileSystem=class{},t.defaultFileSystem={readFile:e=>n.promises.readFile(e),mtime:async e=>(await n.promises.stat(e)).mtimeMs,async stat(e){const t=await n.promises.stat(e);return{ctime:t.ctimeMs,mtime:t.mtimeMs,size:t.size}}}},34990:(e,t)=>{"use strict";function r(e){return"virtual"===e.type}function n(e){return"top"===e.type}Object.defineProperty(t,"__esModule",{value:!0}),t.duplicateTree=t.cutTreeAfterLine=t.isTop=t.isVirtual=t.isLine=t.isBlank=t.topNode=t.blankNode=t.lineNode=t.virtualNode=void 0,t.virtualNode=function(e,t,r){return{type:"virtual",indentation:e,subs:t,label:r}},t.lineNode=function(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}},t.blankNode=function(e){return{type:"blank",lineNumber:e,subs:[]}},t.topNode=function(e){return{type:"top",indentation:-1,subs:e??[]}},t.isBlank=function(e){return"blank"===e.type},t.isLine=function(e){return"line"===e.type},t.isVirtual=r,t.isTop=n,t.cutTreeAfterLine=function(e,t){!function e(i){if(!r(i)&&!n(i)&&i.lineNumber===t)return i.subs=[],!0;for(let t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.lastLineOf=t.firstLineOf=t.encodeTree=t.describeTree=t.deparseAndCutTree=t.deparseTree=t.deparseLine=void 0;const n=r(34990),i=r(72890);function o(e){return" ".repeat(e.indentation)+e.sourceLine+"\n"}function s(e){return(0,i.foldTree)(e,"",(function(e,t){let r="";return(0,n.isLine)(e)?r=o(e):(0,n.isBlank)(e)&&(r="\n"),t+r}),"topDown")}t.deparseLine=o,t.deparseTree=s,t.deparseAndCutTree=function(e,t){const r=new Set(t),i=[];let a="";return function e(t){void 0!==t.label&&r.has(t.label)?(""!==a&&i.push({label:void 0,source:a}),i.push({label:t.label,source:s(t)}),a=""):((0,n.isLine)(t)&&(a+=o(t)),t.subs.forEach(e))}(e),""!==a&&i.push({label:void 0,source:a}),i},t.describeTree=function e(t,r=0){const i=" ".repeat(r);if(void 0===t)return"UNDEFINED NODE";let o;o=void 0===t.subs?"UNDEFINED SUBS":t.subs.map((t=>e(t,r+2))).join(",\n"),o=""===o?"[]":`[\n${o}\n ${i}]`;const s=((0,n.isVirtual)(t)||(0,n.isTop)(t)?" ":String(t.lineNumber).padStart(3," "))+`: ${i}`,a=void 0===t.label?"":JSON.stringify(t.label);return(0,n.isVirtual)(t)||(0,n.isTop)(t)?`${s}vnode(${t.indentation}, ${a}, ${o})`:(0,n.isBlank)(t)?`${s}blank(${a??""})`:`${s}lnode(${t.indentation}, ${a}, ${JSON.stringify(t.sourceLine)}, ${o})`},t.encodeTree=function e(t,r=""){const i=void 0===t.label?"":`, ${JSON.stringify(t.label)}`,o=!(0,n.isBlank)(t)&&t.subs.length>0?`[\n${t.subs.map((t=>e(t,r+" "))).join(", \n")}\n${r}]`:"[]";switch(t.type){case"blank":return`${r}blankNode(${t.lineNumber}${i})`;case"top":return`topNode(${o}${i})`;case"virtual":return`${r}virtualNode(${t.indentation}, ${o}${i})`;case"line":return`${r}lineNode(${t.indentation}, ${t.lineNumber}, "${t.sourceLine}", ${o}${i})`}},t.firstLineOf=function e(t){if((0,n.isLine)(t)||(0,n.isBlank)(t))return t.lineNumber;for(const r of t.subs){const t=e(r);if(void 0!==t)return t}},t.lastLineOf=function e(t){let r,i=t.subs.length-1;for(;i>=0&&void 0===r;)r=e(t.subs[i]),i--;return void 0!==r||(0,n.isVirtual)(t)||(0,n.isTop)(t)?r:t.lineNumber}},16468:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0});const o=r(77651),s=r(53105),a=r(12563);(0,a.registerLanguageSpecificParser)("markdown",s.processMarkdown),(0,a.registerLanguageSpecificParser)("java",o.processJava),i(r(34990),t),i(r(40842),t),i(r(72890),t),i(r(12563),t),i(r(64505),t)},77651:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.processJava=void 0;const n=r(34990),i=r(72890),o=r(12563),s=(0,o.buildLabelRules)({package:/^package /,import:/^import /,class:/\bclass /,interface:/\binterface /,javadoc:/^\/\*\*/,comment_multi:/^\/\*[^*]/,comment_single:/^\/\//,annotation:/^@/,opener:/^[\[({]/,closer:/^[\])}]/});t.processJava=function(e){let t=e;return(0,o.labelLines)(t,s),t=(0,o.combineClosersAndOpeners)(t),t=(0,o.flattenVirtual)(t),(0,o.labelVirtualInherited)(t),(0,i.visitTree)(t,(e=>{if("class"===e.label||"interface"===e.label)for(const t of e.subs)(0,n.isBlank)(t)||void 0!==t.label&&"annotation"!==t.label||(t.label="member")}),"bottomUp"),t}},72890:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.rebuildTree=t.foldTree=t.visitTreeConditionally=t.visitTree=t.resetLineNumbers=t.mapLabels=t.clearLabelsIf=t.clearLabels=void 0;const n=r(34990);function i(e,t,r){!function e(n){"topDown"===r&&t(n),n.subs.forEach((t=>{e(t)})),"bottomUp"===r&&t(n)}(e)}t.clearLabels=function(e){return i(e,(e=>{e.label=void 0}),"bottomUp"),e},t.clearLabelsIf=function(e,t){return i(e,(e=>{e.label=e.label?t(e.label)?void 0:e.label:void 0}),"bottomUp"),e},t.mapLabels=function e(t,r){switch(t.type){case"line":case"virtual":const n=t.subs.map((t=>e(t,r)));return{...t,subs:n,label:t.label?r(t.label):void 0};case"blank":return{...t,label:t.label?r(t.label):void 0};case"top":return{...t,subs:t.subs.map((t=>e(t,r))),label:t.label?r(t.label):void 0}}},t.resetLineNumbers=function(e){let t=0;i(e,(function(e){(0,n.isVirtual)(e)||(0,n.isTop)(e)||(e.lineNumber=t,t++)}),"topDown")},t.visitTree=i,t.visitTreeConditionally=function(e,t,r){!function e(n){if("topDown"===r&&!t(n))return!1;let i=!0;return n.subs.forEach((t=>{i=i&&e(t)})),"bottomUp"===r&&(i=i&&t(n)),i}(e)},t.foldTree=function(e,t,r,n){let o=t;return i(e,(function(e){o=r(e,o)}),n),o},t.rebuildTree=function(e,t,r){const i=e=>{if(void 0!==r&&r(e))return e;{const r=e.subs.map(i).filter((e=>void 0!==e));return e.subs=r,t(e)}},o=i(e);return void 0!==o?o:(0,n.topNode)()}},53105:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.processMarkdown=void 0;const n=r(34990),i=r(12563),o=(0,i.buildLabelRules)({heading:/^# /,subheading:/^## /,subsubheading:/### /});t.processMarkdown=function(e){let t=e;if((0,i.labelLines)(t,o),(0,n.isBlank)(t))return t;function r(e){return"heading"===e.label?1:"subheading"===e.label?2:"subsubheading"===e.label?3:void 0}let s=[t],a=[...t.subs];t.subs=[];for(const e of a){const t=r(e);if(void 0===t||(0,n.isBlank)(e))s[s.length-1].subs.push(e);else{for(;s.lengtht+1;)s.pop()}}return t=(0,i.groupBlocks)(t),t=(0,i.flattenVirtual)(t),(0,i.labelVirtualInherited)(t),t}},12563:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseTree=t.registerLanguageSpecificParser=t.flattenVirtual=t.groupBlocks=t.combineClosersAndOpeners=t.buildLabelRules=t.labelVirtualInherited=t.labelLines=t.parseRaw=void 0;const n=r(34990),i=r(72890);function o(e){const t=e.split("\n"),r=t.map((e=>e.match(/^\s*/)[0].length)),i=t.map((e=>e.trimLeft()));function o(e){const[t,o]=s(e+1,r[e]);return[(0,n.lineNode)(r[e],e,i[e],t),o]}function s(e,t){let s;const a=[];let c,l=e;for(;lt);)if(""===i[l])void 0===c&&(c=l),l+=1;else{if(void 0!==c){for(let e=c;et.matches(e.sourceLine)));r&&(e.label=r.label)}}),"bottomUp")}function a(e){return Object.keys(e).map((t=>{let r;return r=e[t].test?r=>e[t].test(r):e[t],{matches:r,label:t}}))}function c(e){const t=(0,i.rebuildTree)(e,(function(e){if(0===e.subs.length||-1===e.subs.findIndex((e=>"closer"===e.label||"opener"===e.label)))return e;const t=[];let r;for(let i=0;is.subs.push(e))),o.subs=[];else if("closer"===o.label&&void 0!==r&&((0,n.isLine)(o)||(0,n.isVirtual)(o))&&o.indentation>=r.indentation){let e=t.length-1;for(;e>0&&(0,n.isBlank)(t[e]);)e-=1;if(r.subs.push(...t.splice(e+1)),o.subs.length>0){const e=r.subs.findIndex((e=>"newVirtual"!==e.label)),t=r.subs.slice(0,e),i=r.subs.slice(e),s=i.length>0?[(0,n.virtualNode)(o.indentation,i,"newVirtual")]:[];r.subs=[...t,...s,o]}else r.subs.push(o)}else t.push(o),(0,n.isBlank)(o)||(r=o)}return e.subs=t,e}));return(0,i.clearLabelsIf)(e,(e=>"newVirtual"===e)),t}t.parseRaw=o,t.labelLines=s,t.labelVirtualInherited=function(e){(0,i.visitTree)(e,(function(e){if((0,n.isVirtual)(e)&&void 0===e.label){const t=e.subs.filter((e=>!(0,n.isBlank)(e)));1===t.length&&(e.label=t[0].label)}}),"bottomUp")},t.buildLabelRules=a,t.combineClosersAndOpeners=c,t.groupBlocks=function(e,t=n.isBlank,r){return(0,i.rebuildTree)(e,(function(e){if(e.subs.length<=1)return e;const i=[];let o,s=[],a=!1;function c(e=!1){if(void 0!==o&&(i.length>0||!e)){const e=(0,n.virtualNode)(o,s,r);i.push(e)}else s.forEach((e=>i.push(e)))}for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getWindowsDelineations=void 0;const n=r(12563),i=r(72890);t.getWindowsDelineations=function(e,t,r,o){if(e.length{if("blank"===e.type)return void(e.label={totalLength:1,firstLineAfter:e.lineNumber+1});let t="line"===e.type?1:0,n="line"===e.type?e.lineNumber+1:NaN;function i(r){return-1==r?n-t:e.subs[r].label.firstLineAfter-e.subs[r].label.totalLength}function a(t,r){return 0==t?r+1:e.subs[t-1].label.firstLineAfter}let c="line"===e.type?-1:0,l="line"===e.type?1:0,u=0;for(let d=0;d=0&&co){const t=i(c),n=a(d,t),p=u==d?n:a(u,t);for(r<=n-t&&s.push([t,p]);l>o;)l-=-1==c?"line"==e.type?1:0:e.subs[c].label.totalLength,c++}}if(ce[0]-t[0]||e[1]-t[1])).filter(((e,t,r)=>0==t||e[0]!=r[t-1][0]||e[1]!=r[t-1][1]))}},23272:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPathMarker=t.getLanguageMarker=t.comment=t.hasLanguageMarker=t.languageCommentMarkers=void 0,t.languageCommentMarkers={abap:{start:'"',end:""},bat:{start:"REM",end:""},bibtex:{start:"%",end:""},blade:{start:"#",end:""},c:{start:"//",end:""},clojure:{start:";",end:""},coffeescript:{start:"//",end:""},cpp:{start:"//",end:""},csharp:{start:"//",end:""},css:{start:"/*",end:"*/"},dart:{start:"//",end:""},dockerfile:{start:"#",end:""},elixir:{start:"#",end:""},erb:{start:"<%#",end:"%>"},erlang:{start:"%",end:""},fsharp:{start:"//",end:""},go:{start:"//",end:""},groovy:{start:"//",end:""},haml:{start:"-#",end:""},handlebars:{start:"{{!",end:"}}"},haskell:{start:"--",end:""},html:{start:"\x3c!--",end:"--\x3e"},ini:{start:";",end:""},java:{start:"//",end:""},javascript:{start:"//",end:""},javascriptreact:{start:"//",end:""},jsonc:{start:"//",end:""},jsx:{start:"//",end:""},julia:{start:"#",end:""},kotlin:{start:"//",end:""},latex:{start:"%",end:""},less:{start:"//",end:""},lua:{start:"--",end:""},makefile:{start:"#",end:""},markdown:{start:"[]: #",end:""},"objective-c":{start:"//",end:""},"objective-cpp":{start:"//",end:""},perl:{start:"#",end:""},php:{start:"//",end:""},powershell:{start:"#",end:""},pug:{start:"//",end:""},python:{start:"#",end:""},ql:{start:"//",end:""},r:{start:"#",end:""},razor:{start:"\x3c!--",end:"--\x3e"},ruby:{start:"#",end:""},rust:{start:"//",end:""},sass:{start:"//",end:""},scala:{start:"//",end:""},scss:{start:"//",end:""},shellscript:{start:"#",end:""},slim:{start:"/",end:""},solidity:{start:"//",end:""},sql:{start:"--",end:""},stylus:{start:"//",end:""},svelte:{start:"\x3c!--",end:"--\x3e"},swift:{start:"//",end:""},terraform:{start:"#",end:""},tex:{start:"%",end:""},typescript:{start:"//",end:""},typescriptreact:{start:"//",end:""},vb:{start:"'",end:""},verilog:{start:"//",end:""},"vue-html":{start:"\x3c!--",end:"--\x3e"},vue:{start:"//",end:""},xml:{start:"\x3c!--",end:"--\x3e"},xsl:{start:"\x3c!--",end:"--\x3e"},yaml:{start:"#",end:""}};const r=["php","plaintext"],n={html:"",python:"#!/usr/bin/env python3",ruby:"#!/usr/bin/env ruby",shellscript:"#!/bin/sh",yaml:"# YAML data"};function i({source:e}){return e.startsWith("#!")||e.startsWith("{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extractLocalImportContext=t.getDocComment=void 0;const n=r(71017),i=r(42133);function o(e,t){let r=t.namedChild(1)?.text.slice(1,-1);if(!r||!r.startsWith("."))return null;if(""===(0,n.extname)(r))r+=".ts";else if(".ts"!==(0,n.extname)(r))return null;return(0,n.join)((0,n.dirname)(e),r)}function s(e){let t=[];if("import_clause"===e.namedChild(0)?.type){let r=e.namedChild(0);if("named_imports"===r?.namedChild(0)?.type){let e=r.namedChild(0);for(let r of e?.namedChildren??[])if("import_specifier"===r.type){const e=r.childForFieldName("name")?.text;if(e){const n=r.childForFieldName("alias")?.text;t.push({name:e,alias:n})}}}}return t}const a=new Map;function c(e,t){let r=t?.childForFieldName("name")?.text??"";switch(t?.type){case"ambient_declaration":return c(e,t.namedChild(0));case"interface_declaration":case"enum_declaration":case"type_alias_declaration":return{name:r,decl:t.text};case"function_declaration":case"function_signature":return{name:r,decl:l(e,t)};case"class_declaration":{let n=function(e,t){let r=t.childForFieldName("body");if(r)return r.namedChildren.map((t=>d(e,t))).filter((e=>e))}(e,t),i="";if(n){let r=t.childForFieldName("body");i=`declare ${e.substring(t.startIndex,r.startIndex+1)}`,i+=n.map((e=>"\n"+e)).join(""),i+="\n}"}return{name:r,decl:i}}}return{name:r,decl:""}}function l(e,t){const r=t.childForFieldName("return_type")?.endIndex??t.childForFieldName("parameters")?.endIndex;if(void 0!==r){let n=e.substring(t.startIndex,r)+";";return"function_declaration"===t.type||"function_signature"===t.type?"declare "+n:n}return""}function u(e,t){const r=(0,i.getFirstPrecedingComment)(t);return r?e.substring(r.startIndex,t.startIndex):""}function d(e,t){if("accessibility_modifier"===t?.firstChild?.type&&"private"===t.firstChild.text)return"";const r=function(e,t){let r=t.startIndex-1;for(;r>=0&&(" "===e[r]||"\t"===e[r]);)r--;if(r<0||"\n"===e[r])return e.substring(r+1,t.startIndex)}(e,(0,i.getFirstPrecedingComment)(t)??t)??" ",n=u(e,t);switch(t.type){case"ambient_declaration":const i=t.namedChild(0);return i?r+n+d(e,i):"";case"method_definition":case"method_signature":return r+n+l(e,t);case"public_field_definition":{let i=t.childForFieldName("type")?.endIndex??t.childForFieldName("name")?.endIndex;if(void 0!==i)return r+n+e.substring(t.startIndex,i)+";"}}return""}async function p(e,t,r){let n=new Map,o=-1;try{o=await r.mtime(e)}catch{return n}let s=a.get(e);if(s&&s.mtime===o)return s.exports;if("typescript"===t){let o=null;try{let s=(await r.readFile(e)).toString();o=await(0,i.parseTreeSitter)(t,s);for(let e of(0,i.queryExports)(t,o.rootNode))for(let t of e.captures){let e=t.node;if("export_statement"===e.type){let t=e.childForFieldName("declaration");if(t?.hasError())continue;let{name:r,decl:i}=c(s,t);if(r){i=u(s,e)+i;let t=n.get(r);t||(t=[],n.set(r,t)),t.push(i)}}}}catch{}finally{o&&o.delete()}}if(a.size>2e3)for(let e of a.keys())if(a.delete(e),n.size<=1e3)break;return a.set(e,{mtime:o,exports:n}),n}t.getDocComment=u;const h=/^\s*import\s*(type|)\s*\{[^}]*\}\s*from\s*['"]\./gm;t.extractLocalImportContext=async function(e,t){let{source:r,uri:n,languageId:a}=e;return t&&"typescript"===a?async function(e,t,r){let n="typescript",a=[];const c=function(e){let t,r=-1;h.lastIndex=-1;do{t=h.exec(e),t&&(r=h.lastIndex+t.length)}while(t);if(-1===r)return-1;const n=e.indexOf("\n",r);return-1!==n?n:e.length}(e);if(-1===c)return a;e=e.substring(0,c);let l=await(0,i.parseTreeSitter)(n,e);try{for(let e of function(e){let t=[];for(let r of e.namedChildren)"import_statement"===r.type&&t.push(r);return t}(l.rootNode)){let i=o(t,e);if(!i)continue;let c=s(e);if(0===c.length)continue;let l=await p(i,n,r);for(let e of c)l.has(e.name)&&a.push(...l.get(e.name))}}finally{l.delete()}return a}(r,n,t):[]}},42133:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFunctionPositions=t.getFirstPrecedingComment=t.isFunctionDefinition=t.isFunction=t.getAncestorWithSiblingFunctions=t.queryPythonIsDocstring=t.queryGlobalVars=t.queryExports=t.queryImports=t.queryFunctions=t.getBlockCloseToken=t.parsesWithoutError=t.parseTreeSitter=t.getLanguage=t.languageIdToWasmLanguage=t.isSupportedLanguageId=t.WASMLanguage=void 0;const n=r(71017),i=r(60498),o=r(60498);var s;!function(e){e.Python="python",e.JavaScript="javascript",e.TypeScript="typescript",e.Go="go",e.Ruby="ruby"}(s=t.WASMLanguage||(t.WASMLanguage={}));const a={python:s.Python,javascript:s.JavaScript,javascriptreact:s.JavaScript,jsx:s.JavaScript,typescript:s.TypeScript,typescriptreact:s.TypeScript,go:s.Go,ruby:s.Ruby};function c(e){if(!(e in a))throw new Error(`Unrecognized language: ${e}`);return a[e]}t.isSupportedLanguageId=function(e){return e in a},t.languageIdToWasmLanguage=c;const l={python:[["(function_definition body: (block\n (expression_statement (string))? @docstring) @body) @function"],['(ERROR ("def" (identifier) (parameters))) @function']],javascript:[["[\n (function body: (statement_block) @body)\n (function_declaration body: (statement_block) @body)\n (generator_function body: (statement_block) @body)\n (generator_function_declaration body: (statement_block) @body)\n (method_definition body: (statement_block) @body)\n ] @function"]],typescript:[["[\n (function body: (statement_block) @body)\n (function_declaration body: (statement_block) @body)\n (generator_function body: (statement_block) @body)\n (generator_function_declaration body: (statement_block) @body)\n (method_definition body: (statement_block) @body)\n ] @function"]],go:[["[\n (function_declaration body: (block) @body)\n (method_declaration body: (block) @body)\n ] @function"]],ruby:[['[\n (method name: (_) parameters: (method_parameters)? @params [(_)+ "end"] @body)\n (singleton_method name: (_) parameters: (method_parameters)? @params [(_)+ "end"] @body)\n ] @function']]},u='(variable_declarator value: (call_expression function: ((identifier) @req (#eq? @req "require"))))',d=`\n (lexical_declaration ${u}+)\n (variable_declaration ${u}+)\n`,p={python:[["(module (future_import_statement) @import)"],["(module (import_statement) @import)"],["(module (import_from_statement) @import)"]],javascript:[[`(program [ ${d} ] @import)`],["(program [ (import_statement) ] @import)"]],typescript:[[`(program [ ${d} ] @import)`],["(program [ (import_statement) (import_alias) ] @import)"]],go:[],ruby:[]},h={python:[],javascript:[["(program (export_statement) @export)"]],typescript:[["(program (export_statement) @export)"]],go:[],ruby:[]},f={python:[["(module (global_statement) @globalVar)"],["(module (expression_statement) @globalVar)"]],javascript:[],typescript:[],go:[],ruby:[]},g={python:new Set(["function_definition"]),javascript:new Set(["function","function_declaration","generator_function","generator_function_declaration","method_definition","arrow_function"]),typescript:new Set(["function","function_declaration","generator_function","generator_function_declaration","method_definition","arrow_function"]),go:new Set(["function_declaration","method_declaration"]),ruby:new Set(["method","singleton_method"])},m={python:e=>"module"===e.type||"block"===e.type&&"class_definition"===e.parent?.type,javascript:e=>"program"===e.type||"class_body"===e.type,typescript:e=>"program"===e.type||"class_body"===e.type,go:e=>"source_file"===e.type,ruby:e=>"program"===e.type||"class"===e.type},y=new Map;async function v(e){const t=c(e);if(!y.has(t)){const e=await async function(e){await i.init();const t=(0,n.resolve)(__dirname,"..","dist",`tree-sitter-${e}.wasm`);return o.Language.load(t)}(t);y.set(t,e)}return y.get(t)}async function _(e,t){let r=await v(e);const n=new i;n.setLanguage(r);const o=n.parse(t);return n.delete(),o}function b(e,t){const r=[];for(const n of e){if(!n[1]){const e=t.tree.getLanguage();n[1]=e.query(n[0])}r.push(...n[1].matches(t))}return r}function w(e,t){return b(l[c(e)],t)}t.getLanguage=v,t.parseTreeSitter=_,t.parsesWithoutError=async function(e,t){const r=await _(e,t),n=!r.rootNode.hasError();return r.delete(),n},t.getBlockCloseToken=function(e){switch(c(e)){case s.Python:return null;case s.JavaScript:case s.TypeScript:case s.Go:return"}";case s.Ruby:return"end"}},t.queryFunctions=w,t.queryImports=function(e,t){return b(p[c(e)],t)},t.queryExports=function(e,t){return b(h[c(e)],t)},t.queryGlobalVars=function(e,t){return b(f[c(e)],t)};const C=["[\n (class_definition (block (expression_statement (string))))\n (function_definition (block (expression_statement (string))))\n]"];function E(e,t){return g[c(e)].has(t.type)}t.queryPythonIsDocstring=function(e){return 1==b([C],e).length},t.getAncestorWithSiblingFunctions=function(e,t){const r=m[c(e)];for(;t.parent;){if(r(t.parent))return t;t=t.parent}return t.parent?t:null},t.isFunction=E,t.isFunctionDefinition=function(e,t){switch(c(e)){case s.Python:case s.Go:case s.Ruby:return E(e,t);case s.JavaScript:case s.TypeScript:if("function_declaration"===t.type||"generator_function_declaration"===t.type||"method_definition"===t.type)return!0;if("lexical_declaration"===t.type||"variable_declaration"===t.type){if(t.namedChildCount>1)return!1;let r=t.namedChild(0);if(null==r)return!1;let n=r.namedChild(1);return null!==n&&E(e,n)}if("expression_statement"===t.type){let r=t.namedChild(0);if("assignment_expression"===r?.type){let t=r.namedChild(1);return null!==t&&E(e,t)}}return!1}},t.getFirstPrecedingComment=function(e){let t=e;for(;"comment"===t.previousSibling?.type;){let e=t.previousSibling;if(e.endPosition.row{const t=e.captures.find((e=>"function"===e.name)).node;return{startIndex:t.startIndex,endIndex:t.endIndex}}));return r.delete(),n}},94343:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getNodeStart=t.isBlockBodyFinished=t.isEmptyBlockStart=t.getBlockParser=void 0;const n=r(42133);class i{constructor(e,t,r){this.languageId=e,this.nodeMatch=t,this.nodeTypesWithBlockOrStmtChild=r}async getNodeMatchAtPosition(e,t,r){const i=await(0,n.parseTreeSitter)(this.languageId,e);try{let e=i.rootNode.descendantForIndex(t);for(;e;){const t=this.nodeMatch[e.type];if(t){if(!this.nodeTypesWithBlockOrStmtChild.has(e.type))break;const r=this.nodeTypesWithBlockOrStmtChild.get(e.type);if((""==r?e.namedChildren[0]:e.childForFieldName(r))?.type==t)break}e=e.parent}if(!e)return;return r(e)}finally{i.delete()}}getNextBlockAtPosition(e,t,r){return this.getNodeMatchAtPosition(e,t,(e=>{let t=e.children.reverse().find((t=>t.type==this.nodeMatch[e.type]));if(t){if("python"==this.languageId&&t.parent){const e=":"==t.parent.type?t.parent.parent:t.parent;let r=e?.nextSibling;for(;r&&"comment"==r.type;){const n=r.startPosition.row==t.endPosition.row&&r.startPosition.column>=t.endPosition.column,i=r.startPosition.row>e.endPosition.row&&r.startPosition.column>e.startPosition.column;if(!n&&!i)break;t=r,r=r.nextSibling}}if(!(t.endIndex>=t.tree.rootNode.endIndex-1&&(t.hasError()||t.parent.hasError())))return r(t)}}))}async isBlockBodyFinished(e,t,r){const n=(e+t).trimEnd(),i=await this.getNextBlockAtPosition(n,r,(e=>e.endIndex));if(void 0!==i&&i0?t:void 0}}getNodeStart(e,t){const r=e.trimEnd();return this.getNodeMatchAtPosition(r,t,(e=>e.startIndex))}}class o extends i{constructor(e,t,r,n,i){super(e,n,i),this.blockEmptyMatch=t,this.lineMatch=r}isBlockStart(e){return this.lineMatch.test(e.trimStart())}async isBlockBodyEmpty(e,t){const r=await this.getNextBlockAtPosition(e,t,(r=>{r.startIndex0&&/\s/.test(e.charAt(r-1));)r--;return r}function a(e,t){const r=e.startIndex,n=e.startIndex-e.startPosition.column,i=t.substring(n,r);if(/^\s*$/.test(i))return i}function c(e,t,r){if(t.startPosition.row<=e.startPosition.row)return!1;const n=a(e,r),i=a(t,r);return void 0!==n&&void 0!==i&&n.startsWith(i)}class l extends i{constructor(e,t,r,n,i,o,s){super(e,t,r),this.startKeywords=n,this.blockNodeType=i,this.emptyStatementType=o,this.curlyBraceLanguage=s}isBlockEmpty(e,t){let r=e.text.trim();return this.curlyBraceLanguage&&(r.startsWith("{")&&(r=r.slice(1)),r.endsWith("}")&&(r=r.slice(0,-1)),r=r.trim()),0==r.length||!("python"!=this.languageId||"class_definition"!=e.parent?.type&&"function_definition"!=e.parent?.type||1!=e.children.length||!(0,n.queryPythonIsDocstring)(e.parent))}async isEmptyBlockStart(e,t){if(t>e.length)throw new RangeError("Invalid offset");for(let r=t;r";"==e.type))&&r.endIndex<=t}r=r.parent}}let i=null,o=null,s=null,a=n;for(;null!=a;){if(a.type==this.blockNodeType){o=a;break}if(this.nodeMatch[a.type]){s=a;break}if("ERROR"==a.type){i=a;break}a=a.parent}if(null!=o){if(!o.parent||!this.nodeMatch[o.parent.type])return!1;if("python"==this.languageId){const e=o.previousSibling;if(null!=e&&e.hasError()&&(e.text.startsWith('"""')||e.text.startsWith("'''")))return!0}return this.isBlockEmpty(o,t)}if(null!=i){if("module"==i.previousSibling?.type||"internal_module"==i.previousSibling?.type)return!0;const e=[...i.children].reverse(),r=e.find((e=>this.startKeywords.includes(e.type)));let o=e.find((e=>e.type==this.blockNodeType));if(r){switch(this.languageId){case"python":{"try"==r.type&&"identifier"==n.type&&n.text.length>4&&(o=e.find((e=>e.hasError()))?.children.find((e=>"block"==e.type)));const t=e.find((e=>":"==e.type));if(t&&r.endIndex<=t.startIndex&&t.nextSibling){if("def"==r.type){const e=t.nextSibling;if('"'==e.type||"'"==e.type)return!0;if("ERROR"==e.type&&('"""'==e.text||"'''"==e.text))return!0}return!1}break}case"javascript":{const t=e.find((e=>"formal_parameters"==e.type));if("class"==r.type&&t)return!0;const n=e.find((e=>"{"==e.type));if(n&&n.startIndex>r.endIndex&&null!=n.nextSibling)return!1;if(e.find((e=>"do"==e.type))&&"while"==r.type)return!1;if("=>"==r.type&&r.nextSibling&&"{"!=r.nextSibling.type)return!1;break}case"typescript":{const t=e.find((e=>"{"==e.type));if(t&&t.startIndex>r.endIndex&&null!=t.nextSibling)return!1;if(e.find((e=>"do"==e.type))&&"while"==r.type)return!1;if("=>"==r.type&&r.nextSibling&&"{"!=r.nextSibling.type)return!1;break}}return!(o&&o.startIndex>r.endIndex)||this.isBlockEmpty(o,t)}}if(null!=s){const e=this.nodeMatch[s.type],r=s.children.slice().reverse().find((t=>t.type==e));if(r)return this.isBlockEmpty(r,t);if(this.nodeTypesWithBlockOrStmtChild.has(s.type)){const e=this.nodeTypesWithBlockOrStmtChild.get(s.type),t=""==e?s.children[0]:s.childForFieldName(e);if(t&&t.type!=this.blockNodeType&&t.type!=this.emptyStatementType)return!1}return!0}return!1}finally{r.delete()}}}const u={python:new l("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 l("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 l("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),go:new o("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 o("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)};function d(e){return u[(0,n.languageIdToWasmLanguage)(e)]}t.getBlockParser=d,t.isEmptyBlockStart=async function(e,t,r){return!!(0,n.isSupportedLanguageId)(e)&&d(e).isEmptyBlockStart(t,r)},t.isBlockBodyFinished=async function(e,t,r,i){if((0,n.isSupportedLanguageId)(e))return d(e).isBlockBodyFinished(t,r,i)},t.getNodeStart=async function(e,t,r){if((0,n.isSupportedLanguageId)(e))return d(e).getNodeStart(t,r)}},28684:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPrompt=t.newLineEnded=t.normalizeLanguageId=t.PromptOptions=t.SuffixStartMode=t.SuffixMatchOption=t.SuffixOption=t.LineEndingOptions=t.LocalImportContextOption=t.SnippetSelectionOption=t.SnippetPositionOption=t.SiblingOption=t.PathMarkerOption=t.LanguageMarkerOption=t.TOKENS_RESERVED_FOR_SUFFIX_ENCODING=t.MAX_EDIT_DISTANCE_LENGTH=t.MAX_PROMPT_LENGTH=void 0;const n=r(23272),i=r(41986),o=r(27289),s=r(41729),a=r(83542),c=r(17503),l=r(6885),u=r(8748);let d={text:"",tokens:[]};var p,h,f,g,m,y,v,_,b,w;t.MAX_PROMPT_LENGTH=1500,t.MAX_EDIT_DISTANCE_LENGTH=50,t.TOKENS_RESERVED_FOR_SUFFIX_ENCODING=5,function(e){e.NoMarker="nomarker",e.Top="top",e.Always="always"}(p=t.LanguageMarkerOption||(t.LanguageMarkerOption={})),function(e){e.NoMarker="nomarker",e.Top="top",e.Always="always"}(h=t.PathMarkerOption||(t.PathMarkerOption={})),function(e){e.NoSiblings="nosiblings",e.SiblingsOverContext="siblingabove",e.ContextOverSiblings="contextabove"}(f=t.SiblingOption||(t.SiblingOption={})),function(e){e.TopOfText="top",e.DirectlyAboveCursor="aboveCursor",e.AfterSiblings="afterSiblings"}(g=t.SnippetPositionOption||(t.SnippetPositionOption={})),function(e){e.BestMatch="bestMatch",e.TopK="topK"}(m=t.SnippetSelectionOption||(t.SnippetSelectionOption={})),function(e){e.NoContext="nocontext",e.Declarations="declarations"}(y=t.LocalImportContextOption||(t.LocalImportContextOption={})),function(e){e.ConvertToUnix="unix",e.KeepOriginal="keep"}(v=t.LineEndingOptions||(t.LineEndingOptions={})),(w=t.SuffixOption||(t.SuffixOption={})).None="none",w.FifteenPercent="fifteenPercent",function(e){e.Equal="equal",e.Levenshtein="levenshteineditdistance"}(_=t.SuffixMatchOption||(t.SuffixMatchOption={})),function(e){e.Cursor="cursor",e.CursorTrimStart="cursortrimstart",e.SiblingBlock="siblingblock",e.SiblingBlockTrimStart="siblingblocktrimstart"}(b=t.SuffixStartMode||(t.SuffixStartMode={}));class C{constructor(e,r){if(this.fs=e,this.maxPromptLength=t.MAX_PROMPT_LENGTH,this.languageMarker=p.Top,this.pathMarker=h.Top,this.includeSiblingFunctions=f.ContextOverSiblings,this.localImportContext=y.Declarations,this.snippetPosition=g.TopOfText,this.numberOfSnippets=4,this.neighboringTabs=o.NeighboringTabsOption.Eager,this.neighboringSnippetTypes=o.NeighboringSnippetType.NeighboringSnippets,this.lineEnding=v.ConvertToUnix,this.suffixPercent=0,this.suffixStartMode=b.Cursor,this.tokenizerName=a.TokenizerName.cushman001,this.suffixMatchThreshold=0,this.suffixMatchCriteria=_.Levenshtein,this.fimSuffixLengthThreshold=0,r)for(const e in r)this[e]=r[e];if(this.suffixPercent<0||this.suffixPercent>100)throw new Error(`suffixPercent must be between 0 and 100, but was ${this.suffixPercent}`);if(this.suffixPercent>0&&this.includeSiblingFunctions!=f.NoSiblings)throw new Error(`Invalid option combination. Cannot set suffixPercent > 0 (${this.suffixPercent}) and includeSiblingFunctions ${this.includeSiblingFunctions}`);if(this.suffixMatchThreshold<0||this.suffixMatchThreshold>100)throw new Error(`suffixMatchThreshold must be at between 0 and 100, but was ${this.suffixMatchThreshold}`);if(this.fimSuffixLengthThreshold<-1)throw new Error(`fimSuffixLengthThreshold must be at least -1, but was ${this.fimSuffixLengthThreshold}`);if(null!=this.indentationMinLength&&null!=this.indentationMaxLength&&this.indentationMinLength>this.indentationMaxLength)throw new Error(`indentationMinLength must be less than or equal to indentationMaxLength, but was ${this.indentationMinLength} and ${this.indentationMaxLength}`);if(this.snippetSelection===m.TopK&&void 0===this.snippetSelectionK)throw new Error("snippetSelectionK must be defined.");if(this.snippetSelection===m.TopK&&this.snippetSelectionK&&this.snippetSelectionK<=0)throw new Error(`snippetSelectionK must be greater than 0, but was ${this.snippetSelectionK}`)}}t.PromptOptions=C;const E={javascriptreact:"javascript",jsx:"javascript",typescriptreact:"typescript",jade:"pug",cshtml:"razor"};function T(e){return e=e.toLowerCase(),E[e]??e}function S(e){return""==e||e.endsWith("\n")?e:e+"\n"}t.normalizeLanguageId=T,t.newLineEnded=S,t.getPrompt=async function(e,r,m={},v=[],w=[]){const E=new C(e,m),x=(0,a.getTokenizer)(E.tokenizerName);let k=!1;const{source:I,offset:A}=r;if(A<0||A>I.length)throw new Error(`Offset ${A} is out of range.`);r.languageId=T(r.languageId);const P=new c.Priorities,R=P.justBelow(c.Priorities.TOP),N=E.languageMarker==p.Always?P.justBelow(c.Priorities.TOP):P.justBelow(R),O=E.pathMarker==h.Always?P.justBelow(c.Priorities.TOP):P.justBelow(R),L=E.includeSiblingFunctions==f.ContextOverSiblings?P.justBelow(R):P.justAbove(R),D=P.justBelow(R,L),M=P.justBelow(D),B=new c.PromptWishlist(x,E.lineEnding);let F,j;if(E.languageMarker!=p.NoMarker){const e=S((0,n.getLanguageMarker)(r));F=B.append(e,c.PromptElementKind.LanguageMarker,N)}if(E.pathMarker!=h.NoMarker){const e=S((0,n.getPathMarker)(r));e.length>0&&(j=B.append(e,c.PromptElementKind.PathMarker,O))}if(E.localImportContext!=y.NoContext)for(const e of await(0,i.extractLocalImportContext)(r,E.fs))B.append(S(e),c.PromptElementKind.ImportedFile,D);const U=E.neighboringTabs==o.NeighboringTabsOption.None||0==v.length?[]:await(0,o.getNeighborSnippets)(r,v,E.neighboringSnippetTypes,E.neighboringTabs,E.indentationMinLength,E.indentationMaxLength,E.snippetSelectionOption,E.snippetSelectionK);if(w=w.concat(U),new Set(w.map((e=>e.provider))).size>1)throw new Error("Cannot combine snippets from different providers.");function $(){w.map(u.normalizeSnippetScore).sort(((e,t)=>e.score-t.score)).slice(-E.numberOfSnippets).map((e=>({score:e.score,snippet:(0,u.announceSnippet)(e).map((e=>(0,n.comment)(e,r.languageId)+"\n")).join(""),startLine:e.startLine,endLine:e.endLine}))).forEach((e=>{B.append(e.snippet,c.PromptElementKind.SimilarFile,M,x.tokenLength(e.snippet),e.score)}))}E.snippetPosition==g.TopOfText&&$();const q=[];let H;if(E.includeSiblingFunctions==f.NoSiblings)H=I.substring(0,A);else{const{siblings:e,beforeInsertion:t,afterInsertion:n}=await(0,s.getSiblingFunctions)(r);B.appendLineForLine(t,c.PromptElementKind.BeforeCursor,R).forEach((e=>q.push(e)));let i=L;e.forEach((e=>{B.append(e,c.PromptElementKind.AfterCursor,i),i=P.justBelow(i)})),E.snippetPosition==g.AfterSiblings&&$(),H=n}if(E.snippetPosition==g.DirectlyAboveCursor){const e=H.lastIndexOf("\n")+1,t=H.substring(0,e),r=H.substring(e);B.appendLineForLine(t,c.PromptElementKind.BeforeCursor,R).forEach((e=>q.push(e))),$(),r.length>0&&(q.push(B.append(r,c.PromptElementKind.AfterCursor,R)),q.length>1&&B.require(q[q.length-2],q[q.length-1]))}else B.appendLineForLine(H,c.PromptElementKind.BeforeCursor,R).forEach((e=>q.push(e)));p.Top==E.languageMarker&&q.length>0&&void 0!==F&&B.require(F,q[0]),h.Top==E.pathMarker&&q.length>0&&void 0!==j&&(F?B.require(j,F):B.require(j,q[0])),void 0!==F&&void 0!==j&&B.exclude(j,F);let V=I.slice(A);if(0==E.suffixPercent||V.length<=E.fimSuffixLengthThreshold)return B.fulfill(E.maxPromptLength);{let e=r.offset;E.suffixStartMode!==b.Cursor&&E.suffixStartMode!==b.CursorTrimStart&&(e=await(0,s.getSiblingFunctionStart)(r));const n=E.maxPromptLength-t.TOKENS_RESERVED_FOR_SUFFIX_ENCODING;let i=Math.floor(n*(100-E.suffixPercent)/100),o=B.fulfill(i);const a=n-o.prefixLength;let c=I.slice(e);E.suffixStartMode!=b.SiblingBlockTrimStart&&E.suffixStartMode!=b.CursorTrimStart||(c=c.trimStart());const u=x.takeFirstTokens(c,a);if(u.tokens.length<=a-3&&(i=n-u.tokens.length,o=B.fulfill(i)),E.suffixMatchCriteria==_.Equal)u.tokens.length===d.tokens.length&&u.tokens.every(((e,t)=>e===d.tokens[t]))&&(k=!0);else if(E.suffixMatchCriteria==_.Levenshtein&&u.tokens.length>0&&E.suffixMatchThreshold>0){const e=(0,l.findEditDistanceScore)(u.tokens.slice(0,t.MAX_EDIT_DISTANCE_LENGTH),d.tokens.slice(0,t.MAX_EDIT_DISTANCE_LENGTH))?.score;100*e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSiblingFunctionStart=t.getSiblingFunctions=void 0;const n=r(28684),i=r(42133);t.getSiblingFunctions=async function({source:e,offset:t,languageId:r}){const o=[];let s="",a=e.substring(0,t);if((0,i.isSupportedLanguageId)(r)){const c=await(0,i.parseTreeSitter)(r,e);try{let l=t;for(;l>=0&&/\s/.test(e[l]);)l--;const u=c.rootNode.descendantForIndex(l),d=(0,i.getAncestorWithSiblingFunctions)(r,u);if(d){const c=(0,i.getFirstPrecedingComment)(d)?.startIndex??d.startIndex;let l,u=0;for(;" "==(l=e[c-u-1])||"\t"==l;)u++;const p=e.substring(c-u,c);for(let s=d.nextSibling;s;s=s.nextSibling)if((0,i.isFunctionDefinition)(r,s)){const r=(0,i.getFirstPrecedingComment)(s)?.startIndex??s.startIndex;if(r=0&&/\s/.test(e[o]);)o--;const s=n.rootNode.descendantForIndex(o),a=(0,i.getAncestorWithSiblingFunctions)(r,s);if(a){for(let e=a.nextSibling;e;e=e.nextSibling)if((0,i.isFunctionDefinition)(r,e)){const r=(0,i.getFirstPrecedingComment)(e)?.startIndex??e.startIndex;if(r=t)return a.endIndex}}finally{n.delete()}}return t}},91186:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.computeScore=t.FunctionJaccardMatcher=t.IndentationBasedJaccardMatcher=t.FixedWindowSizeJaccardMatcher=void 0;const n=r(64505),i=r(11864);class o extends i.WindowedMatcher{constructor(e,t){super(e),this.windowLength=t}id(){return"fixed:"+this.windowLength}getWindowsDelineations(e){const t=[],r=e.length;for(let e=0;0==e||e({to:t=>new o(t,e)});class s extends i.WindowedMatcher{constructor(e,t,r){super(e),this.indentationMinLength=t,this.indentationMaxLength=r,this.languageId=e.languageId}id(){return`indent:${this.indentationMinLength}:${this.indentationMaxLength}:${this.languageId}`}getWindowsDelineations(e){return(0,n.getWindowsDelineations)(e,this.languageId,this.indentationMinLength,this.indentationMaxLength)}trimDocument(e){return e.source.slice(0,e.offset).split("\n").slice(-this.indentationMaxLength).join("\n")}similarityScore(e,t){return c(e,t)}}t.IndentationBasedJaccardMatcher=s,s.FACTORY=(e,t)=>({to:r=>new s(r,e,t)});class a extends i.FunctionalMatcher{id(){return"function"}getWindowsDelineations(e){return[]}constructor(e,t){super(e),this.windowLength=t}trimDocument(e){return e.source.slice(0,e.offset).split("\n").slice(-this.windowLength).join("\n")}similarityScore(e,t){return c(e,t)}}function c(e,t){const r=new Set;return e.forEach((e=>{t.has(e)&&r.add(e)})),r.size/(e.size+t.size-r.size)}t.FunctionJaccardMatcher=a,a.FACTORY=e=>({to:t=>new a(t,e)}),t.computeScore=c},27289:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getNeighborSnippets=t.neighborOptionToSelection=t.NeighboringSnippetType=t.NeighboringTabsOption=void 0;const n=r(91186),i=r(8748);var o,s;(s=t.NeighboringTabsOption||(t.NeighboringTabsOption={})).None="none",s.Conservative="conservative",s.Medium="medium",s.Eager="eager",s.EagerButLittle="eagerButLittle",s.EagerButMedium="eagerButMedium",function(e){e.NeighboringFunctions="neighboringFunction",e.NeighboringSnippets="neighboringSnippet"}(o=t.NeighboringSnippetType||(t.NeighboringSnippetType={})),t.neighborOptionToSelection={none:{snippetLength:1,threshold:-1,numberOfSnippets:0},conservative:{snippetLength:10,threshold:.3,numberOfSnippets:1},medium:{snippetLength:20,threshold:.1,numberOfSnippets:2},eager:{snippetLength:60,threshold:0,numberOfSnippets:4},eagerButLittle:{snippetLength:10,threshold:0,numberOfSnippets:1},eagerButMedium:{snippetLength:20,threshold:0,numberOfSnippets:4}},t.getNeighborSnippets=async function(e,r,s,a,c,l,u,d){const p={...t.neighborOptionToSelection[a]},h=function(e,t,r,i,s){let a;return a=t===o.NeighboringSnippets?void 0!==i&&void 0!==s?n.IndentationBasedJaccardMatcher.FACTORY(i,s):n.FixedWindowSizeJaccardMatcher.FACTORY(r.snippetLength):n.FunctionJaccardMatcher.FACTORY(r.snippetLength),a.to(e)}(e,s,p,c,l);return(await r.filter((e=>e.source.length<1e4&&e.source.length>0)).slice(0,20).reduce((async(e,t)=>(await e).concat((await h.findMatches(t,u,d)).map((e=>({relativePath:t.relativePath,...e}))))),Promise.resolve([]))).filter((e=>e.score&&e.snippet&&e.score>p.threshold)).sort(((e,t)=>e.score-t.score)).slice(-p.numberOfSnippets).map((e=>({...e,provider:i.SnippetProvider.NeighboringTabs,semantics:s==o.NeighboringFunctions?i.SnippetSemantics.Function:i.SnippetSemantics.Snippet})))}},11864:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.splitIntoWords=t.FunctionalMatcher=t.WindowedMatcher=t.SortOptions=void 0;const n=r(28684),i=r(42133);var o;!function(e){e.Ascending="ascending",e.Descending="descending",e.None="none"}(o=t.SortOptions||(t.SortOptions={}));class s{constructor(e){this.stopsForLanguage=p.get(e.languageId)??d}tokenize(e){return new Set(l(e).filter((e=>!this.stopsForLanguage.has(e))))}}const a=new class{constructor(e){this.keys=[],this.cache={},this.size=e}put(e,t){if(this.cache[e]=t,this.keys.length>this.size){this.keys.push(e);const t=this.keys.shift()??"";delete this.cache[t]}}get(e){return this.cache[e]}}(20);class c{constructor(e){this.tokenizer=new s(e),this.referenceTokens=this.tokenizer.tokenize(this.trimDocument(e))}sortScoredSnippets(e,t=o.Descending){return t==o.Ascending?e.sort(((e,t)=>e.score>t.score?1:-1)):t==o.Descending?e.sort(((e,t)=>e.score>t.score?-1:1)):e}retrieveAllSnippets(e,t=o.Descending){const r=[];if(0===e.source.length||0===this.referenceTokens.size)return r;const n=e.source.split("\n"),i=this.id()+":"+e.source,s=a.get(i)??[],c=0==s.length,l=c?n.map(this.tokenizer.tokenize,this.tokenizer):[];for(const[e,[t,i]]of this.getWindowsDelineations(n).entries()){if(c){const e=new Set;l.slice(t,i).forEach((t=>t.forEach(e.add,e))),s.push(e)}const n=s[e],o=this.similarityScore(n,this.referenceTokens);r.push({score:o,startLine:t,endLine:i})}return c&&a.put(i,s),this.sortScoredSnippets(r,t)}async findMatches(e,t=n.SnippetSelectionOption.BestMatch,r){if(t==n.SnippetSelectionOption.BestMatch){const t=await this.findBestMatch(e);return t?[t]:[]}return t==n.SnippetSelectionOption.TopK&&await this.findTopKMatches(e,r)||[]}async findBestMatch(e){if(0===e.source.length||0===this.referenceTokens.size)return;const t=e.source.split("\n"),r=this.retrieveAllSnippets(e,o.Descending);return 0!==r.length&&0!==r[0].score?{snippet:t.slice(r[0].startLine,r[0].endLine).join("\n"),...r[0]}:void 0}async findTopKMatches(e,t=1){if(0===e.source.length||0===this.referenceTokens.size||t<1)return;const r=e.source.split("\n"),n=this.retrieveAllSnippets(e,o.Descending);if(0===n.length||0===n[0].score)return;const i=[n[0]];for(let e=1;en[e].startLinet.startLine))&&i.push(n[e]);return i.map((e=>({snippet:r.slice(e.startLine,e.endLine).join("\n"),...e})))}}function l(e){return e.split(/[^a-zA-Z0-9]/).filter((e=>e.length>0))}t.WindowedMatcher=c,t.FunctionalMatcher=class extends c{constructor(e){super(e)}getMatchingScore(e){const t=this.tokenizer.tokenize(e.source),r=this.similarityScore(t,this.referenceTokens);return{snippet:e.source,score:r,startLine:0,endLine:0}}async findBestMatch(e){const t=await this.findMatches(e);if(0!==t.length&&0!==t[0].score)return t[0]}async findMatches(e,t,r){if(0===e.source.length||0===this.referenceTokens.size)return[];const n=await async function(e){let t=[];const r=await(0,i.getFunctionPositions)(e.languageId,e.source);for(let n=0;n{"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeSnippetScore=t.announceSnippet=t.SnippetSemantics=t.SnippetProvider=void 0,function(e){e.NeighboringTabs="neighboring-tabs",e.Retrieval="retrieval"}(r=t.SnippetProvider||(t.SnippetProvider={})),function(e){e.Function="function",e.Snippet="snippet"}(n=t.SnippetSemantics||(t.SnippetSemantics={}));const i={[n.Function]:"function",[n.Snippet]:"snippet"};t.announceSnippet=function(e){const t=i[e.semantics];return[e.relativePath?`Compare this ${t} from ${e.relativePath}:`:`Compare this ${t}:`].concat(e.snippet.split("\n"))},t.normalizeSnippetScore=function(e){var t;if(e.provider===r.Retrieval)t=-e.score;else{if(e.provider!==r.NeighboringTabs)throw new Error("Unknown snippet source");t=e.score}return{...e,score:t}}},6885:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findEditDistanceScore=void 0,t.findEditDistanceScore=function(e,t){if(0===e.length||0===t.length)return{score:e.length+t.length};const r=Array.from({length:e.length}).map((()=>Array.from({length:t.length}).map((()=>0))));for(let t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTokenizer=t.TokenizerName=void 0;const n=r(57147),i=r(71017),o=r(73837),s=(e,t)=>Array.from(Array(t).keys()).slice(e),a=e=>e.charCodeAt(0),c=new o.TextDecoder("utf-8"),l=e=>c.decode(new Uint8Array(e));function u(e){const t=new Set;let r=e[0];for(let n=1;nArray.from(this.textEncoder.encode(e));let t="",r="";if(e===p.cushman001)t="vocab_cushman001.bpe",r="tokenizer_cushman001.json";else{if(e!==p.cushman002)throw new Error(`Unknown tokenizer name: ${e}`);t="vocab_cushman002.bpe",r="tokenizer_cushman002.json"}const c=n.readFileSync(i.resolve(__dirname,"..","dist",r)),l=JSON.parse(c.toString());this.encoder=new Map(Object.entries(l));for(let[e,t]of this.encoder)this.decoder.set(t,e);const u=n.readFileSync(i.resolve(__dirname,"..","dist",t),"utf-8").split("\n").slice(1).filter((e=>e.trim().length>0));this.bpe_ranks=((e,t)=>{const r=new Map;return e.forEach(((n,i)=>{r.set(e[i],t[i])})),r})(u,s(0,u.length)),function(e){const t=s(a("!"),a("~")+1).concat(s(a("¡"),a("¬")+1),s(a("®"),a("ÿ")+1));let r=t.slice(),n=0;for(let e=0;e<256;e++)t.includes(e)||(t.push(e),r.push(256+n),n+=1);const i=r.map((e=>(e=>String.fromCharCode(e))(e)));for(let r=0;r{this.byte_decoder.set(e,t)}))}byteEncodeStr(e){return this.encodeStr(e).map((e=>this.byte_encoder.get(e)))}bpe(e){if(this.cache.has(e))return this.cache.get(e);let t=this.byteEncodeStr(e),r=u(t);if(!r)return t.map((e=>this.encoder.get(e)));for(;;){const e=new Map;r.forEach((t=>{const r=t.join(" "),n=this.bpe_ranks.get(r);e.set(void 0===n||isNaN(n)?1e11:n,t)}));const n=Array.from(e.keys()).map((e=>Number(e))),i=e.get(Math.min(...n));if(!i||!this.bpe_ranks.has(i.join(" ")))break;const o=i[0],s=i[1];let a=[],c=0;for(;cthis.encoder.get(e)));return this.cache.set(e,n),n}tokenize(e){let t=[];const r=Array.from(e.matchAll(d)).map((e=>e[0]));for(let e of r){const r=this.bpe(e);Array.prototype.push.apply(t,r)}return t}tokenLength(e){return this.tokenize(e).length}takeLastTokens(e,t){if(t<=0)return"";let r=Math.min(e.length,4*t),n=e.slice(-r),i=this.tokenize(n);for(;i.lengththis.decoder.get(e))).join("");return t=l(t.split("").map((e=>this.byte_decoder.get(e)))),t}tokenizeStrings(e){return this.tokenize(e).map((e=>l(this.decoder.get(e).split("").map((e=>this.byte_decoder.get(e))))))}}class g{constructor(){this.hash=e=>{let t=0;for(let r=0;re.toString())).join(" ")}tokenizeStrings(e){return e.split(/\b/)}tokenLength(e){return this.tokenizeStrings(e).length}takeLastTokens(e,t){return this.tokenizeStrings(e).slice(-t).join("")}takeFirstTokens(e,t){const r=this.tokenizeStrings(e).slice(0,t);return{text:r.join(""),tokens:r.map(this.hash)}}takeLastLinesTokens(e,t){const r=this.takeLastTokens(e,t);if(r.length===e.length||"\n"===e[e.length-r.length-1])return r;let n=r.indexOf("\n");return r.substring(n+1)}}},17503:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Priorities=t.PromptWishlist=t.PromptElementRanges=t.PromptChoices=t.PromptBackground=t.PromptElementKind=void 0;const n=r(28684);var i;!function(e){e.BeforeCursor="BeforeCursor",e.AfterCursor="AfterCursor",e.SimilarFile="SimilarFile",e.ImportedFile="ImportedFile",e.LanguageMarker="LanguageMarker",e.PathMarker="PathMarker"}(i=t.PromptElementKind||(t.PromptElementKind={}));class o{constructor(){this.used=new Map,this.unused=new Map}markUsed(e){this.IsNeighboringTab(e)&&this.used.set(e.id,this.convert(e))}undoMarkUsed(e){this.IsNeighboringTab(e)&&this.used.delete(e.id)}markUnused(e){this.IsNeighboringTab(e)&&this.unused.set(e.id,this.convert(e))}convert(e){return{score:e.score.toFixed(4),length:e.text.length}}IsNeighboringTab(e){return e.kind==i.SimilarFile}}t.PromptBackground=o;class s{constructor(){this.used=new Map,this.unused=new Map}markUsed(e){this.used.set(e.kind,(this.used.get(e.kind)||0)+e.tokens)}undoMarkUsed(e){this.used.set(e.kind,(this.used.get(e.kind)||0)-e.tokens)}markUnused(e){this.unused.set(e.kind,(this.used.get(e.kind)||0)+e.tokens)}}t.PromptChoices=s;class a{constructor(e){this.ranges=new Array;let t,r=0;for(const{element:n}of e)0!==n.text.length&&(t===i.BeforeCursor&&n.kind===i.BeforeCursor?this.ranges[this.ranges.length-1].end+=n.text.length:this.ranges.push({kind:n.kind,start:r,end:r+n.text.length}),t=n.kind,r+=n.text.length)}}t.PromptElementRanges=a,t.PromptWishlist=class{constructor(e,t){this.tokenizer=e,this.content=[],this.tokenizer=e,this.lineEndingOption=t}getContent(){return[...this.content]}convertLineEndings(e){return this.lineEndingOption===n.LineEndingOptions.ConvertToUnix&&(e=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n")),e}append(e,t,r,n=this.tokenizer.tokenLength(e),i=NaN){e=this.convertLineEndings(e);const o=this.content.length;return this.content.push({id:o,text:e,kind:t,priority:r,tokens:n,requires:[],excludes:[],score:i}),o}appendLineForLine(e,t,r){const n=(e=this.convertLineEndings(e)).split("\n");for(let e=0;e{"\n"===e&&i.length>0&&!i[i.length-1].endsWith("\n\n")?i[i.length-1]+="\n":i.push(e)}));const o=[];return i.forEach(((e,n)=>{""!==e&&(o.push(this.append(e,t,r)),n>0&&(this.content[this.content.length-2].requires=[this.content[this.content.length-1]]))})),o}require(e,t){const r=this.content.find((t=>t.id===e)),n=this.content.find((e=>e.id===t));r&&n&&r.requires.push(n)}exclude(e,t){const r=this.content.find((t=>t.id===e)),n=this.content.find((e=>e.id===t));r&&n&&r.excludes.push(n)}fulfill(e){const t=new s,r=new o,n=this.content.map(((e,t)=>({element:e,index:t})));n.sort(((e,t)=>e.element.priority===t.element.priority?t.index-e.index:t.element.priority-e.element.priority));const i=new Set,c=new Set;let l;const u=[];let d=e;n.forEach((e=>{const n=e.element,o=e.index;if(d>=0&&(d>0||void 0===l)&&n.requires.every((e=>i.has(e.id)))&&!c.has(n.id)){let s=n.tokens;const a=function(e,t){let r,n=1/0;for(const i of e)i.index>t&&i.index=s?(d-=s,i.add(n.id),n.excludes.forEach((e=>c.add(e.id))),t.markUsed(n),r.markUsed(n),u.push(e)):l=l??e}else t.markUnused(n),r.markUnused(n)})),u.sort(((e,t)=>e.index-t.index));let p=u.reduce(((e,t)=>e+t.element.text),""),h=this.tokenizer.tokenLength(p);for(;h>e;){u.sort(((e,t)=>t.element.priority===e.element.priority?t.index-e.index:t.element.priority-e.element.priority));const e=u.pop();e&&(t.undoMarkUsed(e.element),t.markUnused(e.element),r.undoMarkUsed(e.element),r.markUnused(e.element),l=void 0),u.sort(((e,t)=>e.index-t.index)),p=u.reduce(((e,t)=>e+t.element.text),""),h=this.tokenizer.tokenLength(p)}const f=[...u];if(void 0!==l){f.push(l),f.sort(((e,t)=>e.index-t.index));const n=f.reduce(((e,t)=>e+t.element.text),""),i=this.tokenizer.tokenLength(n);if(i<=e){t.markUsed(l.element),r.markUsed(l.element);const e=new a(f);return{prefix:n,suffix:"",prefixLength:i,suffixLength:0,promptChoices:t,promptBackground:r,promptElementRanges:e}}t.markUnused(l.element),r.markUnused(l.element)}const g=new a(u);return{prefix:p,suffix:"",prefixLength:h,suffixLength:0,promptChoices:t,promptBackground:r,promptElementRanges:g}}};class c{constructor(){this.registeredPriorities=[0,1]}register(e){if(e>c.TOP||ee>t)));return this.register((r+t)/2)}justBelow(...e){const t=Math.min(...e),r=Math.max(...this.registeredPriorities.filter((e=>er>e&&r{e.exports=r(1193)},1193:(e,t,r)=>{"use strict";r(41808);var n,i=r(24404),o=r(13685),s=r(95687),a=r(82361),c=(r(39491),r(73837));function l(e){var t=this;t.options=e||{},t.proxyOptions=t.options.proxy||{},t.maxSockets=t.options.maxSockets||o.Agent.defaultMaxSockets,t.requests=[],t.sockets=[],t.on("free",(function(e,r,n,i){for(var o=d(r,n,i),s=0,a=t.requests.length;s=this.maxSockets?i.requests.push(o):i.createSocket(o,(function(t){function r(){i.emit("free",t,o)}function n(e){i.removeSocket(t),t.removeListener("free",r),t.removeListener("close",n),t.removeListener("agentRemove",n)}t.on("free",r),t.on("close",n),t.on("agentRemove",n),e.onSocket(t)}))},l.prototype.createSocket=function(e,t){var r=this,i={};r.sockets.push(i);var o=p({},r.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(o.localAddress=e.localAddress),o.proxyAuth&&(o.headers=o.headers||{},o.headers["Proxy-Authorization"]="Basic "+new Buffer(o.proxyAuth).toString("base64")),n("making CONNECT request");var s=r.request(o);function a(o,a,c){var l;return s.removeAllListeners(),a.removeAllListeners(),200!==o.statusCode?(n("tunneling socket could not be established, statusCode=%d",o.statusCode),a.destroy(),(l=new Error("tunneling socket could not be established, statusCode="+o.statusCode)).code="ECONNRESET",e.request.emit("error",l),void r.removeSocket(i)):c.length>0?(n("got illegal response body from proxy"),a.destroy(),(l=new Error("got illegal response body from proxy")).code="ECONNRESET",e.request.emit("error",l),void r.removeSocket(i)):(n("tunneling connection has established"),r.sockets[r.sockets.indexOf(i)]=a,t(a))}s.useChunkedEncodingByDefault=!1,s.once("response",(function(e){e.upgrade=!0})),s.once("upgrade",(function(e,t,r){process.nextTick((function(){a(e,t,r)}))})),s.once("connect",a),s.once("error",(function(t){s.removeAllListeners(),n("tunneling socket could not be established, cause=%s\n",t.message,t.stack);var o=new Error("tunneling socket could not be established, cause="+t.message);o.code="ECONNRESET",e.request.emit("error",o),r.removeSocket(i)})),s.end()},l.prototype.removeSocket=function(e){var t=this.sockets.indexOf(e);if(-1!==t){this.sockets.splice(t,1);var r=this.requests.shift();r&&this.createSocket(r,(function(e){r.request.onSocket(e)}))}},n=process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments);"string"==typeof e[0]?e[0]="TUNNEL: "+e[0]:e.unshift("TUNNEL:"),console.error.apply(console,e)}:function(){},t.debug=n},22371:function(e,t){!function(e){"use strict";function t(){for(var e=arguments.length,t=Array(e),r=0;r1){t[0]=t[0].slice(0,-1);for(var n=t.length-1,i=1;i= 0x80 (not a basic code point)","invalid-input":"Invalid input"},g=Math.floor,m=String.fromCharCode;function y(e){throw new RangeError(f[e])}function v(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+function(e,t){for(var r=[],n=e.length;n--;)r[n]=t(e[n]);return r}((e=e.replace(h,".")).split("."),t).join(".")}function _(e){for(var t=[],r=0,n=e.length;r=55296&&i<=56319&&r>1,e+=g(e/t);e>455;n+=u)e=g(e/35);return g(n+36*e/(e+38))},C=function(e){var t,r=[],n=e.length,i=0,o=128,s=72,a=e.lastIndexOf("-");a<0&&(a=0);for(var c=0;c=128&&y("not-basic"),r.push(e.charCodeAt(c));for(var d=a>0?a+1:0;d=n&&y("invalid-input");var m=(t=e.charCodeAt(d++))-48<10?t-22:t-65<26?t-65:t-97<26?t-97:u;(m>=u||m>g((l-i)/h))&&y("overflow"),i+=m*h;var v=f<=s?1:f>=s+26?26:f-s;if(mg(l/_)&&y("overflow"),h*=_}var b=r.length+1;s=w(i-p,b,0==p),g(i/b)>l-o&&y("overflow"),o+=g(i/b),i%=b,r.splice(i++,0,o)}return String.fromCodePoint.apply(String,r)},E=function(e){var t=[],r=(e=_(e)).length,n=128,i=0,o=72,s=!0,a=!1,c=void 0;try{for(var d,p=e[Symbol.iterator]();!(s=(d=p.next()).done);s=!0){var h=d.value;h<128&&t.push(m(h))}}catch(e){a=!0,c=e}finally{try{!s&&p.return&&p.return()}finally{if(a)throw c}}var f=t.length,v=f;for(f&&t.push("-");v=n&&Ig((l-i)/A)&&y("overflow"),i+=(C-n)*A,n=C;var P=!0,R=!1,N=void 0;try{for(var O,L=e[Symbol.iterator]();!(P=(O=L.next()).done);P=!0){var D=O.value;if(Dl&&y("overflow"),D==n){for(var M=i,B=u;;B+=u){var F=B<=o?1:B>=o+26?26:B-o;if(M>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function I(e){for(var t="",r=0,n=e.length;r=194&&i<224){if(n-r>=6){var o=parseInt(e.substr(r+4,2),16);t+=String.fromCharCode((31&i)<<6|63&o)}else t+=e.substr(r,6);r+=6}else if(i>=224){if(n-r>=9){var s=parseInt(e.substr(r+4,2),16),a=parseInt(e.substr(r+7,2),16);t+=String.fromCharCode((15&i)<<12|(63&s)<<6|63&a)}else t+=e.substr(r,9);r+=9}else t+=e.substr(r,3),r+=3}return t}function A(e,t){function r(e){var r=I(e);return r.match(t.UNRESERVED)?r:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,r).replace(t.NOT_USERINFO,k).replace(t.PCT_ENCODED,i)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_HOST,k).replace(t.PCT_ENCODED,i)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,r).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,k).replace(t.PCT_ENCODED,i)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,r).replace(t.NOT_QUERY,k).replace(t.PCT_ENCODED,i)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,r).replace(t.NOT_FRAGMENT,k).replace(t.PCT_ENCODED,i)),e}function P(e){return e.replace(/^0*(.*)/,"$1")||"0"}function R(e,t){var r=e.match(t.IPV4ADDRESS)||[],n=c(r,2)[1];return n?n.split(".").map(P).join("."):e}function N(e,t){var r=e.match(t.IPV6ADDRESS)||[],n=c(r,3),i=n[1],o=n[2];if(i){for(var s=i.toLowerCase().split("::").reverse(),a=c(s,2),l=a[0],u=a[1],d=u?u.split(":").map(P):[],p=l.split(":").map(P),h=t.IPV4ADDRESS.test(p[p.length-1]),f=h?7:8,g=p.length-f,m=Array(f),y=0;y1){var b=m.slice(0,v.index),w=m.slice(v.index+v.length);_=b.join(":")+"::"+w.join(":")}else _=m.join(":");return o&&(_+="%"+o),_}return e}var O=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,L=void 0==="".match(/(){0}/)[1];function D(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={},n=!1!==t.iri?a:s;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var i=e.match(O);if(i){L?(r.scheme=i[1],r.userinfo=i[3],r.host=i[4],r.port=parseInt(i[5],10),r.path=i[6]||"",r.query=i[7],r.fragment=i[8],isNaN(r.port)&&(r.port=i[5])):(r.scheme=i[1]||void 0,r.userinfo=-1!==e.indexOf("@")?i[3]:void 0,r.host=-1!==e.indexOf("//")?i[4]:void 0,r.port=parseInt(i[5],10),r.path=i[6]||"",r.query=-1!==e.indexOf("?")?i[7]:void 0,r.fragment=-1!==e.indexOf("#")?i[8]:void 0,isNaN(r.port)&&(r.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?i[4]:void 0)),r.host&&(r.host=N(R(r.host,n),n)),void 0!==r.scheme||void 0!==r.userinfo||void 0!==r.host||void 0!==r.port||r.path||void 0!==r.query?void 0===r.scheme?r.reference="relative":void 0===r.fragment?r.reference="absolute":r.reference="uri":r.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==r.reference&&(r.error=r.error||"URI is not a "+t.reference+" reference.");var o=x[(t.scheme||r.scheme||"").toLowerCase()];if(t.unicodeSupport||o&&o.unicodeSupport)A(r,n);else{if(r.host&&(t.domainHost||o&&o.domainHost))try{r.host=T(r.host.replace(n.PCT_ENCODED,I).toLowerCase())}catch(e){r.error=r.error||"Host's domain name can not be converted to ASCII via punycode: "+e}A(r,s)}o&&o.parse&&o.parse(r,t)}else r.error=r.error||"URI can not be parsed.";return r}function M(e,t){var r=!1!==t.iri?a:s,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(N(R(String(e.host),r),r).replace(r.IPV6ADDRESS,(function(e,t,r){return"["+t+(r?"%25"+r:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}var B=/^\.\.?\//,F=/^\/\.(\/|$)/,j=/^\/\.\.(\/|$)/,U=/^\/?(?:.|\n)*?(?=\/|$)/;function $(e){for(var t=[];e.length;)if(e.match(B))e=e.replace(B,"");else if(e.match(F))e=e.replace(F,"/");else if(e.match(j))e=e.replace(j,"/"),t.pop();else if("."===e||".."===e)e="";else{var r=e.match(U);if(!r)throw new Error("Unexpected dot segment condition");var n=r[0];e=e.slice(n.length),t.push(n)}return t.join("")}function q(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.iri?a:s,n=[],i=x[(t.scheme||e.scheme||"").toLowerCase()];if(i&&i.serialize&&i.serialize(e,t),e.host)if(r.IPV6ADDRESS.test(e.host));else if(t.domainHost||i&&i.domainHost)try{e.host=t.iri?S(e.host):T(e.host.replace(r.PCT_ENCODED,I).toLowerCase())}catch(r){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+r}A(e,r),"suffix"!==t.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var o=M(e,t);if(void 0!==o&&("suffix"!==t.reference&&n.push("//"),n.push(o),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var c=e.path;t.absolutePath||i&&i.absolutePath||(c=$(c)),void 0===o&&(c=c.replace(/^\/\//,"/%2F")),n.push(c)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function H(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=D(q(e,r),r),t=D(q(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=$(t.path||""),n.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=$(t.path||""),n.query=t.query):(t.path?("/"===t.path.charAt(0)?n.path=$(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path:n.path="/"+t.path,n.path=$(n.path)),n.query=t.query):(n.path=e.path,void 0!==t.query?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function V(e,t){return e&&e.toString().replace(t&&t.iri?a.PCT_ENCODED:s.PCT_ENCODED,I)}var z={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){var r="https"===String(e.scheme).toLowerCase();return e.port!==(r?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},K={scheme:"https",domainHost:z.domainHost,parse:z.parse,serialize:z.serialize};function W(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var G={scheme:"ws",domainHost:!0,parse:function(e,t){var r=e;return r.secure=W(r),r.resourceName=(r.path||"/")+(r.query?"?"+r.query:""),r.path=void 0,r.query=void 0,r},serialize:function(e,t){if(e.port!==(W(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var r=e.resourceName.split("?"),n=c(r,2),i=n[0],o=n[1];e.path=i&&"/"!==i?i:void 0,e.query=o,e.resourceName=void 0}return e.fragment=void 0,e}},Q={scheme:"wss",domainHost:G.domainHost,parse:G.parse,serialize:G.serialize},J={},Y="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",X="[0-9A-Fa-f]",Z=r(r("%[EFef]"+X+"%"+X+X+"%"+X+X)+"|"+r("%[89A-Fa-f]"+X+"%"+X+X)+"|"+r("%"+X+X)),ee=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),te=new RegExp(Y,"g"),re=new RegExp(Z,"g"),ne=new RegExp(t("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',ee),"g"),ie=new RegExp(t("[^]",Y,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),oe=ie;function se(e){var t=I(e);return t.match(te)?t:e}var ae={scheme:"mailto",parse:function(e,t){var r=e,n=r.to=r.path?r.path.split(","):[];if(r.path=void 0,r.query){for(var i=!1,o={},s=r.query.split("&"),a=0,c=s.length;a{"use strict";r.r(t),r.d(t,{NIL:()=>C,parse:()=>y,stringify:()=>d,v1:()=>m,v3:()=>_,v4:()=>b,v5:()=>w,validate:()=>l,version:()=>E});var n=r(6113),i=r.n(n);const o=new Uint8Array(256);let s=o.length;function a(){return s>o.length-16&&(i().randomFillSync(o),s=0),o.slice(s,s+=16)}const c=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,l=function(e){return"string"==typeof e&&c.test(e)},u=[];for(let e=0;e<256;++e)u.push((e+256).toString(16).substr(1));const d=function(e,t=0){const r=(u[e[t+0]]+u[e[t+1]]+u[e[t+2]]+u[e[t+3]]+"-"+u[e[t+4]]+u[e[t+5]]+"-"+u[e[t+6]]+u[e[t+7]]+"-"+u[e[t+8]]+u[e[t+9]]+"-"+u[e[t+10]]+u[e[t+11]]+u[e[t+12]]+u[e[t+13]]+u[e[t+14]]+u[e[t+15]]).toLowerCase();if(!l(r))throw TypeError("Stringified UUID is invalid");return r};let p,h,f=0,g=0;const m=function(e,t,r){let n=t&&r||0;const i=t||new Array(16);let o=(e=e||{}).node||p,s=void 0!==e.clockseq?e.clockseq:h;if(null==o||null==s){const t=e.random||(e.rng||a)();null==o&&(o=p=[1|t[0],t[1],t[2],t[3],t[4],t[5]]),null==s&&(s=h=16383&(t[6]<<8|t[7]))}let c=void 0!==e.msecs?e.msecs:Date.now(),l=void 0!==e.nsecs?e.nsecs:g+1;const u=c-f+(l-g)/1e4;if(u<0&&void 0===e.clockseq&&(s=s+1&16383),(u<0||c>f)&&void 0===e.nsecs&&(l=0),l>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");f=c,g=l,h=s,c+=122192928e5;const m=(1e4*(268435455&c)+l)%4294967296;i[n++]=m>>>24&255,i[n++]=m>>>16&255,i[n++]=m>>>8&255,i[n++]=255&m;const y=c/4294967296*1e4&268435455;i[n++]=y>>>8&255,i[n++]=255&y,i[n++]=y>>>24&15|16,i[n++]=y>>>16&255,i[n++]=s>>>8|128,i[n++]=255&s;for(let e=0;e<6;++e)i[n+e]=o[e];return t||d(i)},y=function(e){if(!l(e))throw TypeError("Invalid UUID");let t;const r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=255&t,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=255&t,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=255&t,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=255&t,r};function v(e,t,r){function n(e,n,i,o){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=[];for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),process.env.APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL=!0;var n=r(57147),i=r(22037),o=r(71017),s=r(58212),a=r(58144),c=function(){function e(e,t,r,i){var a=this;this.extensionId=e,this.extensionVersion=t,this.firstParty=!1,this.userOptIn=!1,this.firstParty=!!i;var c=process.env.VSCODE_LOGS||"";c&&e&&"trace"===process.env.VSCODE_LOG_LEVEL&&(c=o.join(c,e+".txt"),this.logStream=n.createWriteStream(c,{flags:"a",encoding:"utf8",autoClose:!0})),this.updateUserOptIn(r),void 0!==s.env.onDidChangeTelemetryEnabled?this.optOutListener=s.env.onDidChangeTelemetryEnabled((function(){return a.updateUserOptIn(r)})):this.optOutListener=s.workspace.onDidChangeConfiguration((function(){return a.updateUserOptIn(r)}))}return e.prototype.updateUserOptIn=function(t){var r=s.workspace.getConfiguration(e.TELEMETRY_CONFIG_ID),n=void 0===s.env.isTelemetryEnabled?r.get(e.TELEMETRY_CONFIG_ENABLED_ID,!0):s.env.isTelemetryEnabled;this.userOptIn!==n&&(this.userOptIn=n,this.userOptIn?this.createAppInsightsClient(t):this.dispose())},e.prototype.createAppInsightsClient=function(e){a.defaultClient?(this.appInsightsClient=new a.TelemetryClient(e),this.appInsightsClient.channel.setUseDiskRetryCaching(!0)):(a.setup(e).setAutoCollectRequests(!1).setAutoCollectPerformance(!1).setAutoCollectExceptions(!1).setAutoCollectDependencies(!1).setAutoDependencyCorrelation(!1).setAutoCollectConsole(!1).setUseDiskRetryCaching(!0).start(),this.appInsightsClient=a.defaultClient),this.appInsightsClient.commonProperties=this.getCommonProperties(),s&&s.env&&(this.appInsightsClient.context.tags[this.appInsightsClient.context.keys.userId]=s.env.machineId,this.appInsightsClient.context.tags[this.appInsightsClient.context.keys.sessionId]=s.env.sessionId),e&&0===e.indexOf("AIF-")&&(this.appInsightsClient.config.endpointUrl="https://vortex.data.microsoft.com/collect/v1",this.firstParty=!0)},e.prototype.getCommonProperties=function(){var e=Object.create(null);if(e["common.os"]=i.platform(),e["common.platformversion"]=(i.release()||"").replace(/^(\d+)(\.\d+)?(\.\d+)?(.*)/,"$1$2$3"),e["common.extname"]=this.extensionId,e["common.extversion"]=this.extensionVersion,s&&s.env){switch(e["common.vscodemachineid"]=s.env.machineId,e["common.vscodesessionid"]=s.env.sessionId,e["common.vscodeversion"]=s.version,e["common.isnewappinstall"]=s.env.isNewAppInstall,s.env.uiKind){case s.UIKind.Web:e["common.uikind"]="web";break;case s.UIKind.Desktop:e["common.uikind"]="desktop";break;default:e["common.uikind"]="unknown"}e["common.remotename"]=this.cleanRemoteName(s.env.remoteName)}return e},e.prototype.cleanRemoteName=function(e){if(!e)return"none";var t="other";return["ssh-remote","dev-container","attached-container","wsl"].forEach((function(r){0===e.indexOf(r+"+")&&(t=r)})),t},e.prototype.shouldSendErrorTelemetry=function(){return!this.firstParty||"other"!==this.cleanRemoteName(s.env.remoteName)||void 0!==this.extension&&this.extension.extensionKind!==s.ExtensionKind.Workspace&&s.env.uiKind!==s.UIKind.Web},Object.defineProperty(e.prototype,"extension",{get:function(){return void 0===this._extension&&(this._extension=s.extensions.getExtension(this.extensionId)),this._extension},enumerable:!1,configurable:!0}),e.prototype.cloneAndChange=function(e,t){if(null===e||"object"!=typeof e)return e;if("function"!=typeof t)return e;var r={};for(var n in e)r[n]=t(n,e[n]);return r},e.prototype.anonymizeFilePaths=function(e,t){if(null==e)return"";var r=[new RegExp(s.env.appRoot.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gi")];this.extension&&r.push(new RegExp(this.extension.extensionPath.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gi"));var n=e;if(t){for(var i=[],o=0,a=r;o=n}))&&(n+=e.substring(p,t.index)+"",p=d.lastIndex)};"break"!==h(););p{"use strict";var n;r.r(t),r.d(t,{URI:()=>i,Utils:()=>o}),n=(()=>{var e={470:e=>{function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function r(e,t){for(var r,n="",i=0,o=-1,s=0,a=0;a<=e.length;++a){if(a2){var c=n.lastIndexOf("/");if(c!==n.length-1){-1===c?(n="",i=0):i=(n=n.slice(0,c)).length-1-n.lastIndexOf("/"),o=a,s=0;continue}}else if(2===n.length||1===n.length){n="",i=0,o=a,s=0;continue}t&&(n.length>0?n+="/..":n="..",i=2)}else n.length>0?n+="/"+e.slice(o+1,a):n=e.slice(o+1,a),i=a-o-1;o=a,s=0}else 46===r&&-1!==s?++s:s=-1}return n}var n={resolve:function(){for(var e,n="",i=!1,o=arguments.length-1;o>=-1&&!i;o--){var s;o>=0?s=arguments[o]:(void 0===e&&(e=process.cwd()),s=e),t(s),0!==s.length&&(n=s+"/"+n,i=47===s.charCodeAt(0))}return n=r(n,!i),i?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(e){if(t(e),0===e.length)return".";var n=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=r(e,!n)).length||n||(e="."),e.length>0&&i&&(e+="/"),n?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,r=0;r0&&(void 0===e?e=i:e+="/"+i)}return void 0===e?".":n.normalize(e)},relative:function(e,r){if(t(e),t(r),e===r)return"";if((e=n.resolve(e))===(r=n.resolve(r)))return"";for(var i=1;il){if(47===r.charCodeAt(a+d))return r.slice(a+d+1);if(0===d)return r.slice(a+d)}else s>l&&(47===e.charCodeAt(i+d)?u=d:0===d&&(u=0));break}var p=e.charCodeAt(i+d);if(p!==r.charCodeAt(a+d))break;47===p&&(u=d)}var h="";for(d=i+u+1;d<=o;++d)d!==o&&47!==e.charCodeAt(d)||(0===h.length?h+="..":h+="/..");return h.length>0?h+r.slice(a+u):(a+=u,47===r.charCodeAt(a)&&++a,r.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var r=e.charCodeAt(0),n=47===r,i=-1,o=!0,s=e.length-1;s>=1;--s)if(47===(r=e.charCodeAt(s))){if(!o){i=s;break}}else o=!1;return-1===i?n?"/":".":n&&1===i?"//":e.slice(0,i)},basename:function(e,r){if(void 0!==r&&"string"!=typeof r)throw new TypeError('"ext" argument must be a string');t(e);var n,i=0,o=-1,s=!0;if(void 0!==r&&r.length>0&&r.length<=e.length){if(r.length===e.length&&r===e)return"";var a=r.length-1,c=-1;for(n=e.length-1;n>=0;--n){var l=e.charCodeAt(n);if(47===l){if(!s){i=n+1;break}}else-1===c&&(s=!1,c=n+1),a>=0&&(l===r.charCodeAt(a)?-1==--a&&(o=n):(a=-1,o=c))}return i===o?o=c:-1===o&&(o=e.length),e.slice(i,o)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!s){i=n+1;break}}else-1===o&&(s=!1,o=n+1);return-1===o?"":e.slice(i,o)},extname:function(e){t(e);for(var r=-1,n=0,i=-1,o=!0,s=0,a=e.length-1;a>=0;--a){var c=e.charCodeAt(a);if(47!==c)-1===i&&(o=!1,i=a+1),46===c?-1===r?r=a:1!==s&&(s=1):-1!==r&&(s=-1);else if(!o){n=a+1;break}}return-1===r||-1===i||0===s||1===s&&r===i-1&&r===n+1?"":e.slice(r,i)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var r=t.dir||t.root,n=t.base||(t.name||"")+(t.ext||"");return r?r===t.root?r+n:r+"/"+n:n}(0,e)},parse:function(e){t(e);var r={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return r;var n,i=e.charCodeAt(0),o=47===i;o?(r.root="/",n=1):n=0;for(var s=-1,a=0,c=-1,l=!0,u=e.length-1,d=0;u>=n;--u)if(47!==(i=e.charCodeAt(u)))-1===c&&(l=!1,c=u+1),46===i?-1===s?s=u:1!==d&&(d=1):-1!==s&&(d=-1);else if(!l){a=u+1;break}return-1===s||-1===c||0===d||1===d&&s===c-1&&s===a+1?-1!==c&&(r.base=r.name=0===a&&o?e.slice(1,c):e.slice(a,c)):(0===a&&o?(r.name=e.slice(1,s),r.base=e.slice(1,c)):(r.name=e.slice(a,s),r.base=e.slice(a,c)),r.ext=e.slice(s,c)),a>0?r.dir=e.slice(0,a-1):o&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};n.posix=n,e.exports=n},447:(e,t,r)=>{var n;if(r.r(t),r.d(t,{URI:()=>f,Utils:()=>S}),"object"==typeof process)n="win32"===process.platform;else if("object"==typeof navigator){var i=navigator.userAgent;n=i.indexOf("Windows")>=0}var o,s,a=(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),c=/^\w[\w\d+.-]*$/,l=/^\//,u=/^\/\//,d="",p="/",h=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,f=function(){function e(e,t,r,n,i,o){void 0===o&&(o=!1),"object"==typeof e?(this.scheme=e.scheme||d,this.authority=e.authority||d,this.path=e.path||d,this.query=e.query||d,this.fragment=e.fragment||d):(this.scheme=function(e,t){return e||t?e:"file"}(e,o),this.authority=t||d,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==p&&(t=p+t):t=p}return t}(this.scheme,r||d),this.query=n||d,this.fragment=i||d,function(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&&!c.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!l.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(u.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 ("//")')}(this,o))}return e.isUri=function(t){return t instanceof e||!!t&&"string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme&&"function"==typeof t.fsPath&&"function"==typeof t.with&&"function"==typeof t.toString},Object.defineProperty(e.prototype,"fsPath",{get:function(){return b(this,!1)},enumerable:!1,configurable:!0}),e.prototype.with=function(e){if(!e)return this;var t=e.scheme,r=e.authority,n=e.path,i=e.query,o=e.fragment;return void 0===t?t=this.scheme:null===t&&(t=d),void 0===r?r=this.authority:null===r&&(r=d),void 0===n?n=this.path:null===n&&(n=d),void 0===i?i=this.query:null===i&&(i=d),void 0===o?o=this.fragment:null===o&&(o=d),t===this.scheme&&r===this.authority&&n===this.path&&i===this.query&&o===this.fragment?this:new m(t,r,n,i,o)},e.parse=function(e,t){void 0===t&&(t=!1);var r=h.exec(e);return r?new m(r[2]||d,T(r[4]||d),T(r[5]||d),T(r[7]||d),T(r[9]||d),t):new m(d,d,d,d,d)},e.file=function(e){var t=d;if(n&&(e=e.replace(/\\/g,p)),e[0]===p&&e[1]===p){var r=e.indexOf(p,2);-1===r?(t=e.substring(2),e=p):(t=e.substring(2,r),e=e.substring(r)||p)}return new m("file",t,e,d,d)},e.from=function(e){return new m(e.scheme,e.authority,e.path,e.query,e.fragment)},e.prototype.toString=function(e){return void 0===e&&(e=!1),w(this,e)},e.prototype.toJSON=function(){return this},e.revive=function(t){if(t){if(t instanceof e)return t;var r=new m(t);return r._formatted=t.external,r._fsPath=t._sep===g?t.fsPath:null,r}return t},e}(),g=n?1:void 0,m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._formatted=null,t._fsPath=null,t}return a(t,e),Object.defineProperty(t.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=b(this,!1)),this._fsPath},enumerable:!1,configurable:!0}),t.prototype.toString=function(e){return void 0===e&&(e=!1),e?w(this,!0):(this._formatted||(this._formatted=w(this,!1)),this._formatted)},t.prototype.toJSON=function(){var e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=g),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e},t}(f),y=((s={})[58]="%3A",s[47]="%2F",s[63]="%3F",s[35]="%23",s[91]="%5B",s[93]="%5D",s[64]="%40",s[33]="%21",s[36]="%24",s[38]="%26",s[39]="%27",s[40]="%28",s[41]="%29",s[42]="%2A",s[43]="%2B",s[44]="%2C",s[59]="%3B",s[61]="%3D",s[32]="%20",s);function v(e,t){for(var r=void 0,n=-1,i=0;i=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||45===o||46===o||95===o||126===o||t&&47===o)-1!==n&&(r+=encodeURIComponent(e.substring(n,i)),n=-1),void 0!==r&&(r+=e.charAt(i));else{void 0===r&&(r=e.substr(0,i));var s=y[o];void 0!==s?(-1!==n&&(r+=encodeURIComponent(e.substring(n,i)),n=-1),r+=s):-1===n&&(n=i)}}return-1!==n&&(r+=encodeURIComponent(e.substring(n))),void 0!==r?r:e}function _(e){for(var t=void 0,r=0;r1&&"file"===e.scheme?"//"+e.authority+e.path:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,n&&(r=r.replace(/\//g,"\\")),r}function w(e,t){var r=t?_:v,n="",i=e.scheme,o=e.authority,s=e.path,a=e.query,c=e.fragment;if(i&&(n+=i,n+=":"),(o||"file"===i)&&(n+=p,n+=p),o){var l=o.indexOf("@");if(-1!==l){var u=o.substr(0,l);o=o.substr(l+1),-1===(l=u.indexOf(":"))?n+=r(u,!1):(n+=r(u.substr(0,l),!1),n+=":",n+=r(u.substr(l+1),!1)),n+="@"}-1===(l=(o=o.toLowerCase()).indexOf(":"))?n+=r(o,!1):(n+=r(o.substr(0,l),!1),n+=o.substr(l))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2))(d=s.charCodeAt(1))>=65&&d<=90&&(s="/"+String.fromCharCode(d+32)+":"+s.substr(3));else if(s.length>=2&&58===s.charCodeAt(1)){var d;(d=s.charCodeAt(0))>=65&&d<=90&&(s=String.fromCharCode(d+32)+":"+s.substr(2))}n+=r(s,!0)}return a&&(n+="?",n+=r(a,!1)),c&&(n+="#",n+=t?c:v(c,!1)),n}function C(e){try{return decodeURIComponent(e)}catch(t){return e.length>3?e.substr(0,3)+C(e.substr(3)):e}}var E=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function T(e){return e.match(E)?e.replace(E,(function(e){return C(e)})):e}var S,x=r(470),k=function(){for(var e=0,t=0,r=arguments.length;t{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r(447)})();const{URI:i,Utils:o}=n},60809:(e,t,r)=>{e.exports=r(79321)},94974:(e,t,r)=>{e.exports=r(79321)},59424:(e,t,r)=>{var n,i,o,s,a,c,l;for(s in e.exports=u,n=r(98094),o=[],i={der:d,pem:p,txt:function(e){var t;return"Subject\t"+(t=h(e)).subject.value.map((function(e){return l(e.value[0].value[1].value,"binary").toString("utf8")})).join("/")+"\nValid\t"+t.valid.value.map((function(e){return e.value})).join(" - ")+"\n"+p(e)},asn1:h,x509:function(e){return n().pki.certificateFromAsn1(n().asn1.fromDer(e.toString("binary")))}})a=i[s],u[s]=o.length,o.push(a);function u(e,t){var r;return r=o[e]||o[0],null!=t?r(t):r}function d(e){return c(e)?e:l(e,"binary")}function p(e){var t,r,n,i;for(t=["-----BEGIN CERTIFICATE-----"],r=0,n=(e=d(e).toString("base64")).length;r{var n;e.exports=function(){var e,t,i,o;if(!n)for(t in e=(n=r(35758)).oids,i=r(45337))o=i[t],null==e[t]&&(e[t]=o),null==e[o]&&(e[o]=t);return n}},54586:(e,t,r)=>{var n,i,o,s,a,c;function l(e){var t;return t=n.createHash("sha1"),a(e).subject.value.forEach((function(e){var r,n;(r=(e=s.copy(e)).value[0].value[1]).value&&(r.type=s.Type.UTF8,n=(n=c(r.value,"binary").toString("utf8")).trim().replace(/[A-Z]+/g,(function(e){return e.toLowerCase()})).replace(/\s+/g," "),r.value=c(n,"utf8").toString("binary"),t.update(s.toDer(e).getBytes(),"binary"))})),d(t)}function u(e){var t,r;return t=n.createHash("md5"),r=a(e).subject,t.update(s.toDer(r).getBytes(),"binary"),d(t)}function d(e){return(e=e.digest().slice(0,4)).writeUInt32LE(e.readUInt32BE(0),0),e.toString("hex")}n=r(6113),i=r(98094),o=r(59424),s=i().asn1,a=o(o.asn1),e.exports=function(e,t){var r;return r=0===e?u:l,null!=t?r(t):r},c=Buffer.from||function(e,t){return new Buffer(e,t)}},79321:(e,t,r)=>{var n,i,o;function s(e){var t,s,c,l,u,d,p,h,f;if(null==e&&(e={}),t=n||e.disabled?r(97328):(null!=(s=e.fallback)?s:!i)?r(30141):r(36188),(c=e.store)?Array.isArray(c)||(c=[c]):c=[],t=t[(l=e.async)?"async":"sync"](c),u=l?function(e){Promise.resolve(e).then(g)}:g,!1!==e.unique&&(d=r(59091)()),p=o(e.format),Array.isArray(e.ondata)&&(e.ondata=e.ondata.push.bind(e.ondata)),(e.save||e.$ave)&&(h=r(28553)(e)),e.inject&&(f=r(70229)(e.inject)),e.generator)return(l?function(){var e,t;return(e={})[null!=(t=Symbol.asyncIterator)?t:"@"]=a,e.return=y,e.next=_,e}:function(){var e;return(e={})[Symbol.iterator]=a,e.return=y,e.next=v,e})();function g(t){h&&h(t),t?(f&&f(t),"function"==typeof e.ondata&&e.ondata(p(t))):"function"==typeof e.onend&&e.onend()}function m(e){return u(e),{done:!e,value:null!=e?p(e):e}}function y(e){return t.done(),{done:!0,value:e}}function v(){for(var e;(e=t.next())&&d&&!d(e););return m(e)}function _(){return function e(){return Promise.resolve().then(t.next).then((function(t){return t&&d&&!d(t)?e():m(t)}))}()}t.run((function(e){e&&d&&!d(e)||u(e)}))}function a(){return this}e.exports=s,s.disabled=n="win32"!==process.platform,s.nApi=i=!!process.versions.napi&&s===r(94974)&&!(s.electron=r(53571)()),s.der2=o=r(59424),s.hash=function(){return(s.hash=r(54586)).apply(this,arguments)},s.inject=function(){return(s.inject=r(70229).inject).apply(this,arguments)},s.exe=function(){return(s.exe=r(30141).exe).apply(this,arguments)},function(e,t){for(var r in t)e[r]=t[r]}(s,r(84244)),n||s!==r(60809)||s({inject:!0,$ave:!0,async:!0})},70229:(e,t,r)=>{var n,i,o,s,a,c,l,u;function d(e){return h(e,[]),p}function p(e){c.push(s(e))}function h(e,t){if(t&&(c.length=0,c.push.apply(c,t)),(e="+"===e?2:e?1:0)!==l){switch(l){case 1:a.ca===c&&delete a.ca;break;case 2:i.createSecureContext===f&&(i.createSecureContext=u,u=void 0)}switch(l=e){case 1:a.ca=c;break;case 2:u||(u=i.createSecureContext,i.createSecureContext=f)}}}function f(e){var t,r,n,i,o;if(t=u.apply(this,arguments),2===l&&(null==e||!e.ca))for(r=0,i=(n=c).length;r{e.exports={dc:"0.9.2342.19200300.100.1.25"}},28553:(e,t,r)=>{var n,i,o,s,a,c,l,u,d,p,h;function f(e){return function(){var t,r=this;return t=[].slice.call(arguments),new Promise((function(n,i){t.push((function(e,t){e?i(e):n(t)})),e.apply(r,t)}))}}function g(){}n=r(57147),i=r(22037),o=r(71017),s=r(46467),a=r(59424),c=r(54586),e.exports=function(e){var t,a,c,f,m;return f={},m=new Set,function(e){return Promise.resolve(e).then(y)};function y(p){var h,m;p?(a||(a=(h=e.save||e.$ave,"string"==typeof h?h=[h]:Array.isArray(h)||(h=[o.join(__dirname,"../pem"),o.join(i.homedir(),".local/win-ca/pem")]),m=0,function e(){return m{var n;n=r(6113),e.exports=function(){var e;return e=new Set,function(t){var r;if(r=n.createHash("sha256").update(t).digest("base64"),!e.has(r))return e.add(r),!0}}},84244:(e,t,r)=>{function n(){var e;i(arguments,e={unique:!0,ondata:function(t){"function"==typeof e.$cb&&e.$cb(t)}})}function i(e,t){var n,i;n=r(79321),i=e[0],null==t.unique&&(t.unique=!1),t.format=null!=i?i:n.der2.x509,t.$cb=e[1]||i,n(t)}t.all=function(){var e;return i(arguments,{ondata:e=[]}),e},t.each=n,n.async=function(){var e;i(arguments,e={async:!0,ondata:function(t){"function"==typeof e.$cb&&e.$cb(void 0,t)},onend:function(){"function"==typeof e.$cb&&e.$cb()}})}},51815:(e,t,r)=>{var n={"./crypt32-ia32.node":60660,"./crypt32-x64.node":91225};function i(e){var t=o(e);return r(t)}function o(e){if(!r.o(n,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return n[e]}i.keys=function(){return Object.keys(n)},i.resolve=o,e.exports=i,i.id=51815},46467:(e,t,r)=>{"use strict";const n=r(57147),i=r(71017),o=r(55575),s={mode:511&~process.umask(),fs:n},a=e=>{if("win32"===process.platform&&/[<>:"|?*]/.test(e.replace(i.parse(e).root,""))){const t=new Error(`Path contains invalid characters: ${e}`);throw t.code="EINVAL",t}};e.exports=(e,t)=>Promise.resolve().then((()=>{a(e),t=Object.assign({},s,t);const r=o(t.fs.mkdir),n=o(t.fs.stat),c=e=>r(e,t.mode).then((()=>e)).catch((t=>{if("ENOENT"===t.code){if(t.message.includes("null bytes")||i.dirname(e)===e)throw t;return c(i.dirname(e)).then((()=>c(e)))}return n(e).then((t=>t.isDirectory()?e:Promise.reject())).catch((()=>{throw t}))}));return c(i.resolve(e))})),e.exports.sync=(e,t)=>{a(e),t=Object.assign({},s,t);const r=e=>{try{t.fs.mkdirSync(e,t.mode)}catch(n){if("ENOENT"===n.code){if(n.message.includes("null bytes")||i.dirname(e)===e)throw n;return r(i.dirname(e)),r(e)}try{if(!t.fs.statSync(e).isDirectory())throw new Error("The path is not a directory")}catch(e){throw n}}return e};return r(i.resolve(e))}},44617:(e,t,r)=>{var n,i,o;n={271:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultFileSystem=t.FileSystem=void 0;const n=r(747);t.FileSystem=class{},t.defaultFileSystem={readFile:e=>n.promises.readFile(e),mtime:async e=>(await n.promises.stat(e)).mtimeMs,async stat(e){const t=await n.promises.stat(e);return{ctime:t.ctimeMs,mtime:t.mtimeMs,size:t.size}}}},876:(e,t)=>{"use strict";function r(e){return"virtual"===e.type}function n(e){return"top"===e.type}Object.defineProperty(t,"__esModule",{value:!0}),t.duplicateTree=t.cutTreeAfterLine=t.isTop=t.isVirtual=t.isLine=t.isBlank=t.topNode=t.blankNode=t.lineNode=t.virtualNode=void 0,t.virtualNode=function(e,t,r){return{type:"virtual",indentation:e,subs:t,label:r}},t.lineNode=function(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}},t.blankNode=function(e){return{type:"blank",lineNumber:e,subs:[]}},t.topNode=function(e){return{type:"top",indentation:-1,subs:e??[]}},t.isBlank=function(e){return"blank"===e.type},t.isLine=function(e){return"line"===e.type},t.isVirtual=r,t.isTop=n,t.cutTreeAfterLine=function(e,t){!function e(i){if(!r(i)&&!n(i)&&i.lineNumber===t)return i.subs=[],!0;for(let t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.lastLineOf=t.firstLineOf=t.encodeTree=t.describeTree=t.deparseAndCutTree=t.deparseTree=t.deparseLine=void 0;const n=r(876),i=r(617);function o(e){return" ".repeat(e.indentation)+e.sourceLine+"\n"}function s(e){return(0,i.foldTree)(e,"",(function(e,t){let r="";return(0,n.isLine)(e)?r=o(e):(0,n.isBlank)(e)&&(r="\n"),t+r}),"topDown")}t.deparseLine=o,t.deparseTree=s,t.deparseAndCutTree=function(e,t){const r=new Set(t),i=[];let a="";return function e(t){void 0!==t.label&&r.has(t.label)?(""!==a&&i.push({label:void 0,source:a}),i.push({label:t.label,source:s(t)}),a=""):((0,n.isLine)(t)&&(a+=o(t)),t.subs.forEach(e))}(e),""!==a&&i.push({label:void 0,source:a}),i},t.describeTree=function e(t,r=0){const i=" ".repeat(r);if(void 0===t)return"UNDEFINED NODE";let o;o=void 0===t.subs?"UNDEFINED SUBS":t.subs.map((t=>e(t,r+2))).join(",\n"),o=""===o?"[]":`[\n${o}\n ${i}]`;const s=((0,n.isVirtual)(t)||(0,n.isTop)(t)?" ":String(t.lineNumber).padStart(3," "))+`: ${i}`,a=void 0===t.label?"":JSON.stringify(t.label);return(0,n.isVirtual)(t)||(0,n.isTop)(t)?`${s}vnode(${t.indentation}, ${a}, ${o})`:(0,n.isBlank)(t)?`${s}blank(${a??""})`:`${s}lnode(${t.indentation}, ${a}, ${JSON.stringify(t.sourceLine)}, ${o})`},t.encodeTree=function e(t,r=""){const i=void 0===t.label?"":`, ${JSON.stringify(t.label)}`,o=!(0,n.isBlank)(t)&&t.subs.length>0?`[\n${t.subs.map((t=>e(t,r+" "))).join(", \n")}\n${r}]`:"[]";switch(t.type){case"blank":return`${r}blankNode(${t.lineNumber}${i})`;case"top":return`topNode(${o}${i})`;case"virtual":return`${r}virtualNode(${t.indentation}, ${o}${i})`;case"line":return`${r}lineNode(${t.indentation}, ${t.lineNumber}, "${t.sourceLine}", ${o}${i})`}},t.firstLineOf=function e(t){if((0,n.isLine)(t)||(0,n.isBlank)(t))return t.lineNumber;for(const r of t.subs){const t=e(r);if(void 0!==t)return t}},t.lastLineOf=function e(t){let r,i=t.subs.length-1;for(;i>=0&&void 0===r;)r=e(t.subs[i]),i--;return void 0!==r||(0,n.isVirtual)(t)||(0,n.isTop)(t)?r:t.lineNumber}},180:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0});const o=r(647),s=r(152),a=r(469);(0,a.registerLanguageSpecificParser)("markdown",s.processMarkdown),(0,a.registerLanguageSpecificParser)("java",o.processJava),i(r(876),t),i(r(59),t),i(r(617),t),i(r(469),t),i(r(312),t)},647:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.processJava=void 0;const n=r(876),i=r(617),o=r(469),s=(0,o.buildLabelRules)({package:/^package /,import:/^import /,class:/\bclass /,interface:/\binterface /,javadoc:/^\/\*\*/,comment_multi:/^\/\*[^*]/,comment_single:/^\/\//,annotation:/^@/,opener:/^[\[({]/,closer:/^[\])}]/});t.processJava=function(e){let t=e;return(0,o.labelLines)(t,s),t=(0,o.combineClosersAndOpeners)(t),t=(0,o.flattenVirtual)(t),(0,o.labelVirtualInherited)(t),(0,i.visitTree)(t,(e=>{if("class"===e.label||"interface"===e.label)for(const t of e.subs)(0,n.isBlank)(t)||void 0!==t.label&&"annotation"!==t.label||(t.label="member")}),"bottomUp"),t}},617:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.rebuildTree=t.foldTree=t.visitTreeConditionally=t.visitTree=t.resetLineNumbers=t.mapLabels=t.clearLabelsIf=t.clearLabels=void 0;const n=r(876);function i(e,t,r){!function e(n){"topDown"===r&&t(n),n.subs.forEach((t=>{e(t)})),"bottomUp"===r&&t(n)}(e)}t.clearLabels=function(e){return i(e,(e=>{e.label=void 0}),"bottomUp"),e},t.clearLabelsIf=function(e,t){return i(e,(e=>{e.label=e.label?t(e.label)?void 0:e.label:void 0}),"bottomUp"),e},t.mapLabels=function e(t,r){switch(t.type){case"line":case"virtual":const n=t.subs.map((t=>e(t,r)));return{...t,subs:n,label:t.label?r(t.label):void 0};case"blank":return{...t,label:t.label?r(t.label):void 0};case"top":return{...t,subs:t.subs.map((t=>e(t,r))),label:t.label?r(t.label):void 0}}},t.resetLineNumbers=function(e){let t=0;i(e,(function(e){(0,n.isVirtual)(e)||(0,n.isTop)(e)||(e.lineNumber=t,t++)}),"topDown")},t.visitTree=i,t.visitTreeConditionally=function(e,t,r){!function e(n){if("topDown"===r&&!t(n))return!1;let i=!0;return n.subs.forEach((t=>{i=i&&e(t)})),"bottomUp"===r&&(i=i&&t(n)),i}(e)},t.foldTree=function(e,t,r,n){let o=t;return i(e,(function(e){o=r(e,o)}),n),o},t.rebuildTree=function(e,t,r){const i=e=>{if(void 0!==r&&r(e))return e;{const r=e.subs.map(i).filter((e=>void 0!==e));return e.subs=r,t(e)}},o=i(e);return void 0!==o?o:(0,n.topNode)()}},152:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.processMarkdown=void 0;const n=r(876),i=r(469),o=(0,i.buildLabelRules)({heading:/^# /,subheading:/^## /,subsubheading:/### /});t.processMarkdown=function(e){let t=e;if((0,i.labelLines)(t,o),(0,n.isBlank)(t))return t;function r(e){return"heading"===e.label?1:"subheading"===e.label?2:"subsubheading"===e.label?3:void 0}let s=[t],a=[...t.subs];t.subs=[];for(const e of a){const t=r(e);if(void 0===t||(0,n.isBlank)(e))s[s.length-1].subs.push(e);else{for(;s.lengtht+1;)s.pop()}}return t=(0,i.groupBlocks)(t),t=(0,i.flattenVirtual)(t),(0,i.labelVirtualInherited)(t),t}},469:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseTree=t.registerLanguageSpecificParser=t.flattenVirtual=t.groupBlocks=t.combineClosersAndOpeners=t.buildLabelRules=t.labelVirtualInherited=t.labelLines=t.parseRaw=void 0;const n=r(876),i=r(617);function o(e){const t=e.split("\n"),r=t.map((e=>e.match(/^\s*/)[0].length)),i=t.map((e=>e.trimLeft()));function o(e){const[t,o]=s(e+1,r[e]);return[(0,n.lineNode)(r[e],e,i[e],t),o]}function s(e,t){let s;const a=[];let c,l=e;for(;lt);)if(""===i[l])void 0===c&&(c=l),l+=1;else{if(void 0!==c){for(let e=c;et.matches(e.sourceLine)));r&&(e.label=r.label)}}),"bottomUp")}function a(e){return Object.keys(e).map((t=>{let r;return r=e[t].test?r=>e[t].test(r):e[t],{matches:r,label:t}}))}function c(e){const t=(0,i.rebuildTree)(e,(function(e){if(0===e.subs.length||-1===e.subs.findIndex((e=>"closer"===e.label||"opener"===e.label)))return e;const t=[];let r;for(let i=0;is.subs.push(e))),o.subs=[];else if("closer"===o.label&&void 0!==r&&((0,n.isLine)(o)||(0,n.isVirtual)(o))&&o.indentation>=r.indentation){let e=t.length-1;for(;e>0&&(0,n.isBlank)(t[e]);)e-=1;if(r.subs.push(...t.splice(e+1)),o.subs.length>0){const e=r.subs.findIndex((e=>"newVirtual"!==e.label)),t=r.subs.slice(0,e),i=r.subs.slice(e),s=i.length>0?[(0,n.virtualNode)(o.indentation,i,"newVirtual")]:[];r.subs=[...t,...s,o]}else r.subs.push(o)}else t.push(o),(0,n.isBlank)(o)||(r=o)}return e.subs=t,e}));return(0,i.clearLabelsIf)(e,(e=>"newVirtual"===e)),t}t.parseRaw=o,t.labelLines=s,t.labelVirtualInherited=function(e){(0,i.visitTree)(e,(function(e){if((0,n.isVirtual)(e)&&void 0===e.label){const t=e.subs.filter((e=>!(0,n.isBlank)(e)));1===t.length&&(e.label=t[0].label)}}),"bottomUp")},t.buildLabelRules=a,t.combineClosersAndOpeners=c,t.groupBlocks=function(e,t=n.isBlank,r){return(0,i.rebuildTree)(e,(function(e){if(e.subs.length<=1)return e;const i=[];let o,s=[],a=!1;function c(e=!1){if(void 0!==o&&(i.length>0||!e)){const e=(0,n.virtualNode)(o,s,r);i.push(e)}else s.forEach((e=>i.push(e)))}for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getWindowsDelineations=void 0;const n=r(469),i=r(617);t.getWindowsDelineations=function(e,t,r,o){if(e.length{if("blank"===e.type)return void(e.label={totalLength:1,firstLineAfter:e.lineNumber+1});let t="line"===e.type?1:0,n="line"===e.type?e.lineNumber+1:NaN;function i(r){return-1==r?n-t:e.subs[r].label.firstLineAfter-e.subs[r].label.totalLength}function a(t,r){return 0==t?r+1:e.subs[t-1].label.firstLineAfter}let c="line"===e.type?-1:0,l="line"===e.type?1:0,u=0;for(let d=0;d=0&&co){const t=i(c),n=a(d,t),p=u==d?n:a(u,t);for(r<=n-t&&s.push([t,p]);l>o;)l-=-1==c?"line"==e.type?1:0:e.subs[c].label.totalLength,c++}}if(ce[0]-t[0]||e[1]-t[1])).filter(((e,t,r)=>0==t||e[0]!=r[t-1][0]||e[1]!=r[t-1][1]))}},417:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPathMarker=t.getLanguageMarker=t.comment=t.hasLanguageMarker=t.languageCommentMarkers=void 0,t.languageCommentMarkers={abap:{start:'"',end:""},bat:{start:"REM",end:""},bibtex:{start:"%",end:""},blade:{start:"#",end:""},c:{start:"//",end:""},clojure:{start:";",end:""},coffeescript:{start:"//",end:""},cpp:{start:"//",end:""},csharp:{start:"//",end:""},css:{start:"/*",end:"*/"},dart:{start:"//",end:""},dockerfile:{start:"#",end:""},elixir:{start:"#",end:""},erb:{start:"<%#",end:"%>"},erlang:{start:"%",end:""},fsharp:{start:"//",end:""},go:{start:"//",end:""},groovy:{start:"//",end:""},haml:{start:"-#",end:""},handlebars:{start:"{{!",end:"}}"},haskell:{start:"--",end:""},html:{start:"\x3c!--",end:"--\x3e"},ini:{start:";",end:""},java:{start:"//",end:""},javascript:{start:"//",end:""},javascriptreact:{start:"//",end:""},jsonc:{start:"//",end:""},jsx:{start:"//",end:""},julia:{start:"#",end:""},kotlin:{start:"//",end:""},latex:{start:"%",end:""},less:{start:"//",end:""},lua:{start:"--",end:""},makefile:{start:"#",end:""},markdown:{start:"[]: #",end:""},"objective-c":{start:"//",end:""},"objective-cpp":{start:"//",end:""},perl:{start:"#",end:""},php:{start:"//",end:""},powershell:{start:"#",end:""},pug:{start:"//",end:""},python:{start:"#",end:""},ql:{start:"//",end:""},r:{start:"#",end:""},razor:{start:"\x3c!--",end:"--\x3e"},ruby:{start:"#",end:""},rust:{start:"//",end:""},sass:{start:"//",end:""},scala:{start:"//",end:""},scss:{start:"//",end:""},shellscript:{start:"#",end:""},slim:{start:"/",end:""},solidity:{start:"//",end:""},sql:{start:"--",end:""},stylus:{start:"//",end:""},svelte:{start:"\x3c!--",end:"--\x3e"},swift:{start:"//",end:""},terraform:{start:"#",end:""},tex:{start:"%",end:""},typescript:{start:"//",end:""},typescriptreact:{start:"//",end:""},vb:{start:"'",end:""},verilog:{start:"//",end:""},"vue-html":{start:"\x3c!--",end:"--\x3e"},vue:{start:"//",end:""},xml:{start:"\x3c!--",end:"--\x3e"},xsl:{start:"\x3c!--",end:"--\x3e"},yaml:{start:"#",end:""}};const r=["php","plaintext"],n={html:"",python:"#!/usr/bin/env python3",ruby:"#!/usr/bin/env ruby",shellscript:"#!/bin/sh",yaml:"# YAML data"};function i({source:e}){return e.startsWith("#!")||e.startsWith("{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extractLocalImportContext=t.getDocComment=void 0;const n=r(622),i=r(306);function o(e,t){let r=t.namedChild(1)?.text.slice(1,-1);if(!r||!r.startsWith("."))return null;if(""===(0,n.extname)(r))r+=".ts";else if(".ts"!==(0,n.extname)(r))return null;return(0,n.join)((0,n.dirname)(e),r)}function s(e){let t=[];if("import_clause"===e.namedChild(0)?.type){let r=e.namedChild(0);if("named_imports"===r?.namedChild(0)?.type){let e=r.namedChild(0);for(let r of e?.namedChildren??[])if("import_specifier"===r.type){const e=r.childForFieldName("name")?.text;if(e){const n=r.childForFieldName("alias")?.text;t.push({name:e,alias:n})}}}}return t}const a=new Map;function c(e,t){let r=t?.childForFieldName("name")?.text??"";switch(t?.type){case"ambient_declaration":return c(e,t.namedChild(0));case"interface_declaration":case"enum_declaration":case"type_alias_declaration":return{name:r,decl:t.text};case"function_declaration":case"function_signature":return{name:r,decl:l(e,t)};case"class_declaration":{let n=function(e,t){let r=t.childForFieldName("body");if(r)return r.namedChildren.map((t=>d(e,t))).filter((e=>e))}(e,t),i="";if(n){let r=t.childForFieldName("body");i=`declare ${e.substring(t.startIndex,r.startIndex+1)}`,i+=n.map((e=>"\n"+e)).join(""),i+="\n}"}return{name:r,decl:i}}}return{name:r,decl:""}}function l(e,t){const r=t.childForFieldName("return_type")?.endIndex??t.childForFieldName("parameters")?.endIndex;if(void 0!==r){let n=e.substring(t.startIndex,r)+";";return"function_declaration"===t.type||"function_signature"===t.type?"declare "+n:n}return""}function u(e,t){const r=(0,i.getFirstPrecedingComment)(t);return r?e.substring(r.startIndex,t.startIndex):""}function d(e,t){if("accessibility_modifier"===t?.firstChild?.type&&"private"===t.firstChild.text)return"";const r=function(e,t){let r=t.startIndex-1;for(;r>=0&&(" "===e[r]||"\t"===e[r]);)r--;if(r<0||"\n"===e[r])return e.substring(r+1,t.startIndex)}(e,(0,i.getFirstPrecedingComment)(t)??t)??" ",n=u(e,t);switch(t.type){case"ambient_declaration":const i=t.namedChild(0);return i?r+n+d(e,i):"";case"method_definition":case"method_signature":return r+n+l(e,t);case"public_field_definition":{let i=t.childForFieldName("type")?.endIndex??t.childForFieldName("name")?.endIndex;if(void 0!==i)return r+n+e.substring(t.startIndex,i)+";"}}return""}async function p(e,t,r){let n=new Map,o=-1;try{o=await r.mtime(e)}catch{return n}let s=a.get(e);if(s&&s.mtime===o)return s.exports;if("typescript"===t){let o=null;try{let s=(await r.readFile(e)).toString();o=await(0,i.parseTreeSitter)(t,s);for(let e of(0,i.queryExports)(t,o.rootNode))for(let t of e.captures){let e=t.node;if("export_statement"===e.type){let t=e.childForFieldName("declaration");if(t?.hasError())continue;let{name:r,decl:i}=c(s,t);if(r){i=u(s,e)+i;let t=n.get(r);t||(t=[],n.set(r,t)),t.push(i)}}}}catch{}finally{o&&o.delete()}}if(a.size>2e3)for(let e of a.keys())if(a.delete(e),n.size<=1e3)break;return a.set(e,{mtime:o,exports:n}),n}t.getDocComment=u;const h=/^\s*import\s*(type|)\s*\{[^}]*\}\s*from\s*['"]\./gm;t.extractLocalImportContext=async function(e,t){let{source:r,uri:n,languageId:a}=e;return t&&"typescript"===a?async function(e,t,r){let n="typescript",a=[];const c=function(e){let t,r=-1;h.lastIndex=-1;do{t=h.exec(e),t&&(r=h.lastIndex+t.length)}while(t);if(-1===r)return-1;const n=e.indexOf("\n",r);return-1!==n?n:e.length}(e);if(-1===c)return a;e=e.substring(0,c);let l=await(0,i.parseTreeSitter)(n,e);try{for(let e of function(e){let t=[];for(let r of e.namedChildren)"import_statement"===r.type&&t.push(r);return t}(l.rootNode)){let i=o(t,e);if(!i)continue;let c=s(e);if(0===c.length)continue;let l=await p(i,n,r);for(let e of c)l.has(e.name)&&a.push(...l.get(e.name))}}finally{l.delete()}return a}(r,n,t):[]}},306:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFunctionPositions=t.getFirstPrecedingComment=t.isFunctionDefinition=t.isFunction=t.getAncestorWithSiblingFunctions=t.queryPythonIsDocstring=t.queryGlobalVars=t.queryExports=t.queryImports=t.queryFunctions=t.getBlockCloseToken=t.parsesWithoutError=t.parseTreeSitter=t.getLanguage=t.languageIdToWasmLanguage=t.isSupportedLanguageId=t.WASMLanguage=void 0;const n=r(622),i=r(87),o=r(87);var s;!function(e){e.Python="python",e.JavaScript="javascript",e.TypeScript="typescript",e.Go="go",e.Ruby="ruby"}(s=t.WASMLanguage||(t.WASMLanguage={}));const a={python:s.Python,javascript:s.JavaScript,javascriptreact:s.JavaScript,jsx:s.JavaScript,typescript:s.TypeScript,typescriptreact:s.TypeScript,go:s.Go,ruby:s.Ruby};function c(e){if(!(e in a))throw new Error(`Unrecognized language: ${e}`);return a[e]}t.isSupportedLanguageId=function(e){return e in a},t.languageIdToWasmLanguage=c;const l={python:[["(function_definition body: (block\n (expression_statement (string))? @docstring) @body) @function"],['(ERROR ("def" (identifier) (parameters))) @function']],javascript:[["[\n (function body: (statement_block) @body)\n (function_declaration body: (statement_block) @body)\n (generator_function body: (statement_block) @body)\n (generator_function_declaration body: (statement_block) @body)\n (method_definition body: (statement_block) @body)\n ] @function"]],typescript:[["[\n (function body: (statement_block) @body)\n (function_declaration body: (statement_block) @body)\n (generator_function body: (statement_block) @body)\n (generator_function_declaration body: (statement_block) @body)\n (method_definition body: (statement_block) @body)\n ] @function"]],go:[["[\n (function_declaration body: (block) @body)\n (method_declaration body: (block) @body)\n ] @function"]],ruby:[['[\n (method name: (_) parameters: (method_parameters)? @params [(_)+ "end"] @body)\n (singleton_method name: (_) parameters: (method_parameters)? @params [(_)+ "end"] @body)\n ] @function']]},u='(variable_declarator value: (call_expression function: ((identifier) @req (#eq? @req "require"))))',d=`\n (lexical_declaration ${u}+)\n (variable_declaration ${u}+)\n`,p={python:[["(module (future_import_statement) @import)"],["(module (import_statement) @import)"],["(module (import_from_statement) @import)"]],javascript:[[`(program [ ${d} ] @import)`],["(program [ (import_statement) ] @import)"]],typescript:[[`(program [ ${d} ] @import)`],["(program [ (import_statement) (import_alias) ] @import)"]],go:[],ruby:[]},h={python:[],javascript:[["(program (export_statement) @export)"]],typescript:[["(program (export_statement) @export)"]],go:[],ruby:[]},f={python:[["(module (global_statement) @globalVar)"],["(module (expression_statement) @globalVar)"]],javascript:[],typescript:[],go:[],ruby:[]},g={python:new Set(["function_definition"]),javascript:new Set(["function","function_declaration","generator_function","generator_function_declaration","method_definition","arrow_function"]),typescript:new Set(["function","function_declaration","generator_function","generator_function_declaration","method_definition","arrow_function"]),go:new Set(["function_declaration","method_declaration"]),ruby:new Set(["method","singleton_method"])},m={python:e=>"module"===e.type||"block"===e.type&&"class_definition"===e.parent?.type,javascript:e=>"program"===e.type||"class_body"===e.type,typescript:e=>"program"===e.type||"class_body"===e.type,go:e=>"source_file"===e.type,ruby:e=>"program"===e.type||"class"===e.type},y=new Map;async function v(e){const t=c(e);if(!y.has(t)){const e=await async function(e){await i.init();const t=(0,n.resolve)(__dirname,"..","dist",`tree-sitter-${e}.wasm`);return o.Language.load(t)}(t);y.set(t,e)}return y.get(t)}async function _(e,t){let r=await v(e);const n=new i;n.setLanguage(r);const o=n.parse(t);return n.delete(),o}function b(e,t){const r=[];for(const n of e){if(!n[1]){const e=t.tree.getLanguage();n[1]=e.query(n[0])}r.push(...n[1].matches(t))}return r}function w(e,t){return b(l[c(e)],t)}t.getLanguage=v,t.parseTreeSitter=_,t.parsesWithoutError=async function(e,t){const r=await _(e,t),n=!r.rootNode.hasError();return r.delete(),n},t.getBlockCloseToken=function(e){switch(c(e)){case s.Python:return null;case s.JavaScript:case s.TypeScript:case s.Go:return"}";case s.Ruby:return"end"}},t.queryFunctions=w,t.queryImports=function(e,t){return b(p[c(e)],t)},t.queryExports=function(e,t){return b(h[c(e)],t)},t.queryGlobalVars=function(e,t){return b(f[c(e)],t)};const C=["[\n (class_definition (block (expression_statement (string))))\n (function_definition (block (expression_statement (string))))\n]"];function E(e,t){return g[c(e)].has(t.type)}t.queryPythonIsDocstring=function(e){return 1==b([C],e).length},t.getAncestorWithSiblingFunctions=function(e,t){const r=m[c(e)];for(;t.parent;){if(r(t.parent))return t;t=t.parent}return t.parent?t:null},t.isFunction=E,t.isFunctionDefinition=function(e,t){switch(c(e)){case s.Python:case s.Go:case s.Ruby:return E(e,t);case s.JavaScript:case s.TypeScript:if("function_declaration"===t.type||"generator_function_declaration"===t.type||"method_definition"===t.type)return!0;if("lexical_declaration"===t.type||"variable_declaration"===t.type){if(t.namedChildCount>1)return!1;let r=t.namedChild(0);if(null==r)return!1;let n=r.namedChild(1);return null!==n&&E(e,n)}if("expression_statement"===t.type){let r=t.namedChild(0);if("assignment_expression"===r?.type){let t=r.namedChild(1);return null!==t&&E(e,t)}}return!1}},t.getFirstPrecedingComment=function(e){let t=e;for(;"comment"===t.previousSibling?.type;){let e=t.previousSibling;if(e.endPosition.row{const t=e.captures.find((e=>"function"===e.name)).node;return{startIndex:t.startIndex,endIndex:t.endIndex}}));return r.delete(),n}},610:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getNodeStart=t.isBlockBodyFinished=t.isEmptyBlockStart=t.getBlockParser=void 0;const n=r(306);class i{constructor(e,t,r){this.languageId=e,this.nodeMatch=t,this.nodeTypesWithBlockOrStmtChild=r}async getNodeMatchAtPosition(e,t,r){const i=await(0,n.parseTreeSitter)(this.languageId,e);try{let e=i.rootNode.descendantForIndex(t);for(;e;){const t=this.nodeMatch[e.type];if(t){if(!this.nodeTypesWithBlockOrStmtChild.has(e.type))break;const r=this.nodeTypesWithBlockOrStmtChild.get(e.type);if((""==r?e.namedChildren[0]:e.childForFieldName(r))?.type==t)break}e=e.parent}if(!e)return;return r(e)}finally{i.delete()}}getNextBlockAtPosition(e,t,r){return this.getNodeMatchAtPosition(e,t,(e=>{let t=e.children.reverse().find((t=>t.type==this.nodeMatch[e.type]));if(t){if("python"==this.languageId&&t.parent){const e=":"==t.parent.type?t.parent.parent:t.parent;let r=e?.nextSibling;for(;r&&"comment"==r.type;){const n=r.startPosition.row==t.endPosition.row&&r.startPosition.column>=t.endPosition.column,i=r.startPosition.row>e.endPosition.row&&r.startPosition.column>e.startPosition.column;if(!n&&!i)break;t=r,r=r.nextSibling}}if(!(t.endIndex>=t.tree.rootNode.endIndex-1&&(t.hasError()||t.parent.hasError())))return r(t)}}))}async isBlockBodyFinished(e,t,r){const n=(e+t).trimEnd(),i=await this.getNextBlockAtPosition(n,r,(e=>e.endIndex));if(void 0!==i&&i0?t:void 0}}getNodeStart(e,t){const r=e.trimEnd();return this.getNodeMatchAtPosition(r,t,(e=>e.startIndex))}}class o extends i{constructor(e,t,r,n,i){super(e,n,i),this.blockEmptyMatch=t,this.lineMatch=r}isBlockStart(e){return this.lineMatch.test(e.trimStart())}async isBlockBodyEmpty(e,t){const r=await this.getNextBlockAtPosition(e,t,(r=>{r.startIndex0&&/\s/.test(e.charAt(r-1));)r--;return r}function a(e,t){const r=e.startIndex,n=e.startIndex-e.startPosition.column,i=t.substring(n,r);if(/^\s*$/.test(i))return i}function c(e,t,r){if(t.startPosition.row<=e.startPosition.row)return!1;const n=a(e,r),i=a(t,r);return void 0!==n&&void 0!==i&&n.startsWith(i)}class l extends i{constructor(e,t,r,n,i,o,s){super(e,t,r),this.startKeywords=n,this.blockNodeType=i,this.emptyStatementType=o,this.curlyBraceLanguage=s}isBlockEmpty(e,t){let r=e.text.trim();return this.curlyBraceLanguage&&(r.startsWith("{")&&(r=r.slice(1)),r.endsWith("}")&&(r=r.slice(0,-1)),r=r.trim()),0==r.length||!("python"!=this.languageId||"class_definition"!=e.parent?.type&&"function_definition"!=e.parent?.type||1!=e.children.length||!(0,n.queryPythonIsDocstring)(e.parent))}async isEmptyBlockStart(e,t){if(t>e.length)throw new RangeError("Invalid offset");for(let r=t;r";"==e.type))&&r.endIndex<=t}r=r.parent}}let i=null,o=null,s=null,a=n;for(;null!=a;){if(a.type==this.blockNodeType){o=a;break}if(this.nodeMatch[a.type]){s=a;break}if("ERROR"==a.type){i=a;break}a=a.parent}if(null!=o){if(!o.parent||!this.nodeMatch[o.parent.type])return!1;if("python"==this.languageId){const e=o.previousSibling;if(null!=e&&e.hasError()&&(e.text.startsWith('"""')||e.text.startsWith("'''")))return!0}return this.isBlockEmpty(o,t)}if(null!=i){if("module"==i.previousSibling?.type||"internal_module"==i.previousSibling?.type)return!0;const e=[...i.children].reverse(),r=e.find((e=>this.startKeywords.includes(e.type)));let o=e.find((e=>e.type==this.blockNodeType));if(r){switch(this.languageId){case"python":{"try"==r.type&&"identifier"==n.type&&n.text.length>4&&(o=e.find((e=>e.hasError()))?.children.find((e=>"block"==e.type)));const t=e.find((e=>":"==e.type));if(t&&r.endIndex<=t.startIndex&&t.nextSibling){if("def"==r.type){const e=t.nextSibling;if('"'==e.type||"'"==e.type)return!0;if("ERROR"==e.type&&('"""'==e.text||"'''"==e.text))return!0}return!1}break}case"javascript":{const t=e.find((e=>"formal_parameters"==e.type));if("class"==r.type&&t)return!0;const n=e.find((e=>"{"==e.type));if(n&&n.startIndex>r.endIndex&&null!=n.nextSibling)return!1;if(e.find((e=>"do"==e.type))&&"while"==r.type)return!1;if("=>"==r.type&&r.nextSibling&&"{"!=r.nextSibling.type)return!1;break}case"typescript":{const t=e.find((e=>"{"==e.type));if(t&&t.startIndex>r.endIndex&&null!=t.nextSibling)return!1;if(e.find((e=>"do"==e.type))&&"while"==r.type)return!1;if("=>"==r.type&&r.nextSibling&&"{"!=r.nextSibling.type)return!1;break}}return!(o&&o.startIndex>r.endIndex)||this.isBlockEmpty(o,t)}}if(null!=s){const e=this.nodeMatch[s.type],r=s.children.slice().reverse().find((t=>t.type==e));if(r)return this.isBlockEmpty(r,t);if(this.nodeTypesWithBlockOrStmtChild.has(s.type)){const e=this.nodeTypesWithBlockOrStmtChild.get(s.type),t=""==e?s.children[0]:s.childForFieldName(e);if(t&&t.type!=this.blockNodeType&&t.type!=this.emptyStatementType)return!1}return!0}return!1}finally{r.delete()}}}const u={python:new l("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 l("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 l("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),go:new o("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 o("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)};function d(e){return u[(0,n.languageIdToWasmLanguage)(e)]}t.getBlockParser=d,t.isEmptyBlockStart=async function(e,t,r){return!!(0,n.isSupportedLanguageId)(e)&&d(e).isEmptyBlockStart(t,r)},t.isBlockBodyFinished=async function(e,t,r,i){if((0,n.isSupportedLanguageId)(e))return d(e).isBlockBodyFinished(t,r,i)},t.getNodeStart=async function(e,t,r){if((0,n.isSupportedLanguageId)(e))return d(e).getNodeStart(t,r)}},360:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPrompt=t.newLineEnded=t.normalizeLanguageId=t.PromptOptions=t.SuffixStartMode=t.SuffixMatchOption=t.SuffixOption=t.LineEndingOptions=t.LocalImportContextOption=t.SnippetSelectionOption=t.SnippetPositionOption=t.SiblingOption=t.PathMarkerOption=t.LanguageMarkerOption=t.TOKENS_RESERVED_FOR_SUFFIX_ENCODING=t.MAX_EDIT_DISTANCE_LENGTH=t.MAX_PROMPT_LENGTH=void 0;const n=r(417),i=r(179),o=r(125),s=r(670),a=r(411),c=r(456),l=r(395),u=r(830);let d={text:"",tokens:[]};var p,h,f,g,m,y,v,_,b,w;t.MAX_PROMPT_LENGTH=1500,t.MAX_EDIT_DISTANCE_LENGTH=50,t.TOKENS_RESERVED_FOR_SUFFIX_ENCODING=5,function(e){e.NoMarker="nomarker",e.Top="top",e.Always="always"}(p=t.LanguageMarkerOption||(t.LanguageMarkerOption={})),function(e){e.NoMarker="nomarker",e.Top="top",e.Always="always"}(h=t.PathMarkerOption||(t.PathMarkerOption={})),function(e){e.NoSiblings="nosiblings",e.SiblingsOverContext="siblingabove",e.ContextOverSiblings="contextabove"}(f=t.SiblingOption||(t.SiblingOption={})),function(e){e.TopOfText="top",e.DirectlyAboveCursor="aboveCursor",e.AfterSiblings="afterSiblings"}(g=t.SnippetPositionOption||(t.SnippetPositionOption={})),function(e){e.BestMatch="bestMatch",e.TopK="topK"}(m=t.SnippetSelectionOption||(t.SnippetSelectionOption={})),function(e){e.NoContext="nocontext",e.Declarations="declarations"}(y=t.LocalImportContextOption||(t.LocalImportContextOption={})),function(e){e.ConvertToUnix="unix",e.KeepOriginal="keep"}(v=t.LineEndingOptions||(t.LineEndingOptions={})),(w=t.SuffixOption||(t.SuffixOption={})).None="none",w.FifteenPercent="fifteenPercent",function(e){e.Equal="equal",e.Levenshtein="levenshteineditdistance"}(_=t.SuffixMatchOption||(t.SuffixMatchOption={})),function(e){e.Cursor="cursor",e.CursorTrimStart="cursortrimstart",e.SiblingBlock="siblingblock",e.SiblingBlockTrimStart="siblingblocktrimstart"}(b=t.SuffixStartMode||(t.SuffixStartMode={}));class C{constructor(e,r){if(this.fs=e,this.maxPromptLength=t.MAX_PROMPT_LENGTH,this.languageMarker=p.Top,this.pathMarker=h.Top,this.includeSiblingFunctions=f.ContextOverSiblings,this.localImportContext=y.Declarations,this.snippetPosition=g.TopOfText,this.numberOfSnippets=4,this.neighboringTabs=o.NeighboringTabsOption.Eager,this.neighboringSnippetTypes=o.NeighboringSnippetType.NeighboringSnippets,this.lineEnding=v.ConvertToUnix,this.suffixPercent=0,this.suffixStartMode=b.Cursor,this.tokenizerName=a.TokenizerName.cushman001,this.suffixMatchThreshold=0,this.suffixMatchCriteria=_.Levenshtein,this.fimSuffixLengthThreshold=0,r)for(const e in r)this[e]=r[e];if(this.suffixPercent<0||this.suffixPercent>100)throw new Error(`suffixPercent must be between 0 and 100, but was ${this.suffixPercent}`);if(this.suffixPercent>0&&this.includeSiblingFunctions!=f.NoSiblings)throw new Error(`Invalid option combination. Cannot set suffixPercent > 0 (${this.suffixPercent}) and includeSiblingFunctions ${this.includeSiblingFunctions}`);if(this.suffixMatchThreshold<0||this.suffixMatchThreshold>100)throw new Error(`suffixMatchThreshold must be at between 0 and 100, but was ${this.suffixMatchThreshold}`);if(this.fimSuffixLengthThreshold<-1)throw new Error(`fimSuffixLengthThreshold must be at least -1, but was ${this.fimSuffixLengthThreshold}`);if(null!=this.indentationMinLength&&null!=this.indentationMaxLength&&this.indentationMinLength>this.indentationMaxLength)throw new Error(`indentationMinLength must be less than or equal to indentationMaxLength, but was ${this.indentationMinLength} and ${this.indentationMaxLength}`);if(this.snippetSelection===m.TopK&&void 0===this.snippetSelectionK)throw new Error("snippetSelectionK must be defined.");if(this.snippetSelection===m.TopK&&this.snippetSelectionK&&this.snippetSelectionK<=0)throw new Error(`snippetSelectionK must be greater than 0, but was ${this.snippetSelectionK}`)}}t.PromptOptions=C;const E={javascriptreact:"javascript",jsx:"javascript",typescriptreact:"typescript",jade:"pug",cshtml:"razor"};function T(e){return e=e.toLowerCase(),E[e]??e}function S(e){return""==e||e.endsWith("\n")?e:e+"\n"}t.normalizeLanguageId=T,t.newLineEnded=S,t.getPrompt=async function(e,r,m={},v=[],w=[]){const E=new C(e,m),x=(0,a.getTokenizer)(E.tokenizerName);let k=!1;const{source:I,offset:A}=r;if(A<0||A>I.length)throw new Error(`Offset ${A} is out of range.`);r.languageId=T(r.languageId);const P=new c.Priorities,R=P.justBelow(c.Priorities.TOP),N=E.languageMarker==p.Always?P.justBelow(c.Priorities.TOP):P.justBelow(R),O=E.pathMarker==h.Always?P.justBelow(c.Priorities.TOP):P.justBelow(R),L=E.includeSiblingFunctions==f.ContextOverSiblings?P.justBelow(R):P.justAbove(R),D=P.justBelow(R,L),M=P.justBelow(D),B=new c.PromptWishlist(x,E.lineEnding);let F,j;if(E.languageMarker!=p.NoMarker){const e=S((0,n.getLanguageMarker)(r));F=B.append(e,c.PromptElementKind.LanguageMarker,N)}if(E.pathMarker!=h.NoMarker){const e=S((0,n.getPathMarker)(r));e.length>0&&(j=B.append(e,c.PromptElementKind.PathMarker,O))}if(E.localImportContext!=y.NoContext)for(const e of await(0,i.extractLocalImportContext)(r,E.fs))B.append(S(e),c.PromptElementKind.ImportedFile,D);const U=E.neighboringTabs==o.NeighboringTabsOption.None||0==v.length?[]:await(0,o.getNeighborSnippets)(r,v,E.neighboringSnippetTypes,E.neighboringTabs,E.indentationMinLength,E.indentationMaxLength,E.snippetSelectionOption,E.snippetSelectionK);if(w=w.concat(U),new Set(w.map((e=>e.provider))).size>1)throw new Error("Cannot combine snippets from different providers.");function $(){w.map(u.normalizeSnippetScore).sort(((e,t)=>e.score-t.score)).slice(-E.numberOfSnippets).map((e=>({score:e.score,snippet:(0,u.announceSnippet)(e).map((e=>(0,n.comment)(e,r.languageId)+"\n")).join(""),startLine:e.startLine,endLine:e.endLine}))).forEach((e=>{B.append(e.snippet,c.PromptElementKind.SimilarFile,M,x.tokenLength(e.snippet),e.score)}))}E.snippetPosition==g.TopOfText&&$();const q=[];let H;if(E.includeSiblingFunctions==f.NoSiblings)H=I.substring(0,A);else{const{siblings:e,beforeInsertion:t,afterInsertion:n}=await(0,s.getSiblingFunctions)(r);B.appendLineForLine(t,c.PromptElementKind.BeforeCursor,R).forEach((e=>q.push(e)));let i=L;e.forEach((e=>{B.append(e,c.PromptElementKind.AfterCursor,i),i=P.justBelow(i)})),E.snippetPosition==g.AfterSiblings&&$(),H=n}if(E.snippetPosition==g.DirectlyAboveCursor){const e=H.lastIndexOf("\n")+1,t=H.substring(0,e),r=H.substring(e);B.appendLineForLine(t,c.PromptElementKind.BeforeCursor,R).forEach((e=>q.push(e))),$(),r.length>0&&(q.push(B.append(r,c.PromptElementKind.AfterCursor,R)),q.length>1&&B.require(q[q.length-2],q[q.length-1]))}else B.appendLineForLine(H,c.PromptElementKind.BeforeCursor,R).forEach((e=>q.push(e)));p.Top==E.languageMarker&&q.length>0&&void 0!==F&&B.require(F,q[0]),h.Top==E.pathMarker&&q.length>0&&void 0!==j&&(F?B.require(j,F):B.require(j,q[0])),void 0!==F&&void 0!==j&&B.exclude(j,F);let V=I.slice(A);if(0==E.suffixPercent||V.length<=E.fimSuffixLengthThreshold)return B.fulfill(E.maxPromptLength);{let e=r.offset;E.suffixStartMode!==b.Cursor&&E.suffixStartMode!==b.CursorTrimStart&&(e=await(0,s.getSiblingFunctionStart)(r));const n=E.maxPromptLength-t.TOKENS_RESERVED_FOR_SUFFIX_ENCODING;let i=Math.floor(n*(100-E.suffixPercent)/100),o=B.fulfill(i);const a=n-o.prefixLength;let c=I.slice(e);E.suffixStartMode!=b.SiblingBlockTrimStart&&E.suffixStartMode!=b.CursorTrimStart||(c=c.trimStart());const u=x.takeFirstTokens(c,a);if(u.tokens.length<=a-3&&(i=n-u.tokens.length,o=B.fulfill(i)),E.suffixMatchCriteria==_.Equal)u.tokens.length===d.tokens.length&&u.tokens.every(((e,t)=>e===d.tokens[t]))&&(k=!0);else if(E.suffixMatchCriteria==_.Levenshtein&&u.tokens.length>0&&E.suffixMatchThreshold>0){const e=(0,l.findEditDistanceScore)(u.tokens.slice(0,t.MAX_EDIT_DISTANCE_LENGTH),d.tokens.slice(0,t.MAX_EDIT_DISTANCE_LENGTH))?.score;100*e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSiblingFunctionStart=t.getSiblingFunctions=void 0;const n=r(360),i=r(306);t.getSiblingFunctions=async function({source:e,offset:t,languageId:r}){const o=[];let s="",a=e.substring(0,t);if((0,i.isSupportedLanguageId)(r)){const c=await(0,i.parseTreeSitter)(r,e);try{let l=t;for(;l>=0&&/\s/.test(e[l]);)l--;const u=c.rootNode.descendantForIndex(l),d=(0,i.getAncestorWithSiblingFunctions)(r,u);if(d){const c=(0,i.getFirstPrecedingComment)(d)?.startIndex??d.startIndex;let l,u=0;for(;" "==(l=e[c-u-1])||"\t"==l;)u++;const p=e.substring(c-u,c);for(let s=d.nextSibling;s;s=s.nextSibling)if((0,i.isFunctionDefinition)(r,s)){const r=(0,i.getFirstPrecedingComment)(s)?.startIndex??s.startIndex;if(r=0&&/\s/.test(e[o]);)o--;const s=n.rootNode.descendantForIndex(o),a=(0,i.getAncestorWithSiblingFunctions)(r,s);if(a){for(let e=a.nextSibling;e;e=e.nextSibling)if((0,i.isFunctionDefinition)(r,e)){const r=(0,i.getFirstPrecedingComment)(e)?.startIndex??e.startIndex;if(r=t)return a.endIndex}}finally{n.delete()}}return t}},404:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.computeScore=t.FunctionJaccardMatcher=t.IndentationBasedJaccardMatcher=t.FixedWindowSizeJaccardMatcher=void 0;const n=r(312),i=r(467);class o extends i.WindowedMatcher{constructor(e,t){super(e),this.windowLength=t}id(){return"fixed:"+this.windowLength}getWindowsDelineations(e){const t=[],r=e.length;for(let e=0;0==e||e({to:t=>new o(t,e)});class s extends i.WindowedMatcher{constructor(e,t,r){super(e),this.indentationMinLength=t,this.indentationMaxLength=r,this.languageId=e.languageId}id(){return`indent:${this.indentationMinLength}:${this.indentationMaxLength}:${this.languageId}`}getWindowsDelineations(e){return(0,n.getWindowsDelineations)(e,this.languageId,this.indentationMinLength,this.indentationMaxLength)}trimDocument(e){return e.source.slice(0,e.offset).split("\n").slice(-this.indentationMaxLength).join("\n")}similarityScore(e,t){return c(e,t)}}t.IndentationBasedJaccardMatcher=s,s.FACTORY=(e,t)=>({to:r=>new s(r,e,t)});class a extends i.FunctionalMatcher{id(){return"function"}getWindowsDelineations(e){return[]}constructor(e,t){super(e),this.windowLength=t}trimDocument(e){return e.source.slice(0,e.offset).split("\n").slice(-this.windowLength).join("\n")}similarityScore(e,t){return c(e,t)}}function c(e,t){const r=new Set;return e.forEach((e=>{t.has(e)&&r.add(e)})),r.size/(e.size+t.size-r.size)}t.FunctionJaccardMatcher=a,a.FACTORY=e=>({to:t=>new a(t,e)}),t.computeScore=c},125:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getNeighborSnippets=t.neighborOptionToSelection=t.NeighboringSnippetType=t.NeighboringTabsOption=void 0;const n=r(404),i=r(830);var o,s;(s=t.NeighboringTabsOption||(t.NeighboringTabsOption={})).None="none",s.Conservative="conservative",s.Medium="medium",s.Eager="eager",s.EagerButLittle="eagerButLittle",s.EagerButMedium="eagerButMedium",function(e){e.NeighboringFunctions="neighboringFunction",e.NeighboringSnippets="neighboringSnippet"}(o=t.NeighboringSnippetType||(t.NeighboringSnippetType={})),t.neighborOptionToSelection={none:{snippetLength:1,threshold:-1,numberOfSnippets:0},conservative:{snippetLength:10,threshold:.3,numberOfSnippets:1},medium:{snippetLength:20,threshold:.1,numberOfSnippets:2},eager:{snippetLength:60,threshold:0,numberOfSnippets:4},eagerButLittle:{snippetLength:10,threshold:0,numberOfSnippets:1},eagerButMedium:{snippetLength:20,threshold:0,numberOfSnippets:4}},t.getNeighborSnippets=async function(e,r,s,a,c,l,u,d){const p={...t.neighborOptionToSelection[a]},h=function(e,t,r,i,s){let a;return a=t===o.NeighboringSnippets?void 0!==i&&void 0!==s?n.IndentationBasedJaccardMatcher.FACTORY(i,s):n.FixedWindowSizeJaccardMatcher.FACTORY(r.snippetLength):n.FunctionJaccardMatcher.FACTORY(r.snippetLength),a.to(e)}(e,s,p,c,l);return(await r.filter((e=>e.source.length<1e4&&e.source.length>0)).slice(0,20).reduce((async(e,t)=>(await e).concat((await h.findMatches(t,u,d)).map((e=>({relativePath:t.relativePath,...e}))))),Promise.resolve([]))).filter((e=>e.score&&e.snippet&&e.score>p.threshold)).sort(((e,t)=>e.score-t.score)).slice(-p.numberOfSnippets).map((e=>({...e,provider:i.SnippetProvider.NeighboringTabs,semantics:s==o.NeighboringFunctions?i.SnippetSemantics.Function:i.SnippetSemantics.Snippet})))}},467:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.splitIntoWords=t.FunctionalMatcher=t.WindowedMatcher=t.SortOptions=void 0;const n=r(360),i=r(306);var o;!function(e){e.Ascending="ascending",e.Descending="descending",e.None="none"}(o=t.SortOptions||(t.SortOptions={}));class s{constructor(e){this.stopsForLanguage=p.get(e.languageId)??d}tokenize(e){return new Set(l(e).filter((e=>!this.stopsForLanguage.has(e))))}}const a=new class{constructor(e){this.keys=[],this.cache={},this.size=e}put(e,t){if(this.cache[e]=t,this.keys.length>this.size){this.keys.push(e);const t=this.keys.shift()??"";delete this.cache[t]}}get(e){return this.cache[e]}}(20);class c{constructor(e){this.tokenizer=new s(e),this.referenceTokens=this.tokenizer.tokenize(this.trimDocument(e))}sortScoredSnippets(e,t=o.Descending){return t==o.Ascending?e.sort(((e,t)=>e.score>t.score?1:-1)):t==o.Descending?e.sort(((e,t)=>e.score>t.score?-1:1)):e}retrieveAllSnippets(e,t=o.Descending){const r=[];if(0===e.source.length||0===this.referenceTokens.size)return r;const n=e.source.split("\n"),i=this.id()+":"+e.source,s=a.get(i)??[],c=0==s.length,l=c?n.map(this.tokenizer.tokenize,this.tokenizer):[];for(const[e,[t,i]]of this.getWindowsDelineations(n).entries()){if(c){const e=new Set;l.slice(t,i).forEach((t=>t.forEach(e.add,e))),s.push(e)}const n=s[e],o=this.similarityScore(n,this.referenceTokens);r.push({score:o,startLine:t,endLine:i})}return c&&a.put(i,s),this.sortScoredSnippets(r,t)}async findMatches(e,t=n.SnippetSelectionOption.BestMatch,r){if(t==n.SnippetSelectionOption.BestMatch){const t=await this.findBestMatch(e);return t?[t]:[]}return t==n.SnippetSelectionOption.TopK&&await this.findTopKMatches(e,r)||[]}async findBestMatch(e){if(0===e.source.length||0===this.referenceTokens.size)return;const t=e.source.split("\n"),r=this.retrieveAllSnippets(e,o.Descending);return 0!==r.length&&0!==r[0].score?{snippet:t.slice(r[0].startLine,r[0].endLine).join("\n"),...r[0]}:void 0}async findTopKMatches(e,t=1){if(0===e.source.length||0===this.referenceTokens.size||t<1)return;const r=e.source.split("\n"),n=this.retrieveAllSnippets(e,o.Descending);if(0===n.length||0===n[0].score)return;const i=[n[0]];for(let e=1;en[e].startLinet.startLine))&&i.push(n[e]);return i.map((e=>({snippet:r.slice(e.startLine,e.endLine).join("\n"),...e})))}}function l(e){return e.split(/[^a-zA-Z0-9]/).filter((e=>e.length>0))}t.WindowedMatcher=c,t.FunctionalMatcher=class extends c{constructor(e){super(e)}getMatchingScore(e){const t=this.tokenizer.tokenize(e.source),r=this.similarityScore(t,this.referenceTokens);return{snippet:e.source,score:r,startLine:0,endLine:0}}async findBestMatch(e){const t=await this.findMatches(e);if(0!==t.length&&0!==t[0].score)return t[0]}async findMatches(e,t,r){if(0===e.source.length||0===this.referenceTokens.size)return[];const n=await async function(e){let t=[];const r=await(0,i.getFunctionPositions)(e.languageId,e.source);for(let n=0;n{"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeSnippetScore=t.announceSnippet=t.SnippetSemantics=t.SnippetProvider=void 0,function(e){e.NeighboringTabs="neighboring-tabs",e.Retrieval="retrieval"}(r=t.SnippetProvider||(t.SnippetProvider={})),function(e){e.Function="function",e.Snippet="snippet"}(n=t.SnippetSemantics||(t.SnippetSemantics={}));const i={[n.Function]:"function",[n.Snippet]:"snippet"};t.announceSnippet=function(e){const t=i[e.semantics];return[e.relativePath?`Compare this ${t} from ${e.relativePath}:`:`Compare this ${t}:`].concat(e.snippet.split("\n"))},t.normalizeSnippetScore=function(e){var t;if(e.provider===r.Retrieval)t=-e.score;else{if(e.provider!==r.NeighboringTabs)throw new Error("Unknown snippet source");t=e.score}return{...e,score:t}}},395:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findEditDistanceScore=void 0,t.findEditDistanceScore=function(e,t){if(0===e.length||0===t.length)return{score:e.length+t.length};const r=Array.from({length:e.length}).map((()=>Array.from({length:t.length}).map((()=>0))));for(let t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTokenizer=t.TokenizerName=void 0;const n=r(747),i=r(622),o=r(669),s=(e,t)=>Array.from(Array(t).keys()).slice(e),a=e=>e.charCodeAt(0),c=new o.TextDecoder("utf-8"),l=e=>c.decode(new Uint8Array(e));function u(e){const t=new Set;let r=e[0];for(let n=1;nArray.from(this.textEncoder.encode(e));let t="",r="";if(e===p.cushman001)t="vocab_cushman001.bpe",r="tokenizer_cushman001.json";else{if(e!==p.cushman002)throw new Error(`Unknown tokenizer name: ${e}`);t="vocab_cushman002.bpe",r="tokenizer_cushman002.json"}const c=n.readFileSync(i.resolve(__dirname,"..","dist",r)),l=JSON.parse(c.toString());this.encoder=new Map(Object.entries(l));for(let[e,t]of this.encoder)this.decoder.set(t,e);const u=n.readFileSync(i.resolve(__dirname,"..","dist",t),"utf-8").split("\n").slice(1).filter((e=>e.trim().length>0));this.bpe_ranks=((e,t)=>{const r=new Map;return e.forEach(((n,i)=>{r.set(e[i],t[i])})),r})(u,s(0,u.length)),function(e){const t=s(a("!"),a("~")+1).concat(s(a("¡"),a("¬")+1),s(a("®"),a("ÿ")+1));let r=t.slice(),n=0;for(let e=0;e<256;e++)t.includes(e)||(t.push(e),r.push(256+n),n+=1);const i=r.map((e=>(e=>String.fromCharCode(e))(e)));for(let r=0;r{this.byte_decoder.set(e,t)}))}byteEncodeStr(e){return this.encodeStr(e).map((e=>this.byte_encoder.get(e)))}bpe(e){if(this.cache.has(e))return this.cache.get(e);let t=this.byteEncodeStr(e),r=u(t);if(!r)return t.map((e=>this.encoder.get(e)));for(;;){const e=new Map;r.forEach((t=>{const r=t.join(" "),n=this.bpe_ranks.get(r);e.set(void 0===n||isNaN(n)?1e11:n,t)}));const n=Array.from(e.keys()).map((e=>Number(e))),i=e.get(Math.min(...n));if(!i||!this.bpe_ranks.has(i.join(" ")))break;const o=i[0],s=i[1];let a=[],c=0;for(;cthis.encoder.get(e)));return this.cache.set(e,n),n}tokenize(e){let t=[];const r=Array.from(e.matchAll(d)).map((e=>e[0]));for(let e of r){const r=this.bpe(e);Array.prototype.push.apply(t,r)}return t}tokenLength(e){return this.tokenize(e).length}takeLastTokens(e,t){if(t<=0)return"";let r=Math.min(e.length,4*t),n=e.slice(-r),i=this.tokenize(n);for(;i.lengththis.decoder.get(e))).join("");return t=l(t.split("").map((e=>this.byte_decoder.get(e)))),t}tokenizeStrings(e){return this.tokenize(e).map((e=>l(this.decoder.get(e).split("").map((e=>this.byte_decoder.get(e))))))}}class g{constructor(){this.hash=e=>{let t=0;for(let r=0;re.toString())).join(" ")}tokenizeStrings(e){return e.split(/\b/)}tokenLength(e){return this.tokenizeStrings(e).length}takeLastTokens(e,t){return this.tokenizeStrings(e).slice(-t).join("")}takeFirstTokens(e,t){const r=this.tokenizeStrings(e).slice(0,t);return{text:r.join(""),tokens:r.map(this.hash)}}takeLastLinesTokens(e,t){const r=this.takeLastTokens(e,t);if(r.length===e.length||"\n"===e[e.length-r.length-1])return r;let n=r.indexOf("\n");return r.substring(n+1)}}},456:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Priorities=t.PromptWishlist=t.PromptElementRanges=t.PromptChoices=t.PromptBackground=t.PromptElementKind=void 0;const n=r(360);var i;!function(e){e.BeforeCursor="BeforeCursor",e.AfterCursor="AfterCursor",e.SimilarFile="SimilarFile",e.ImportedFile="ImportedFile",e.LanguageMarker="LanguageMarker",e.PathMarker="PathMarker"}(i=t.PromptElementKind||(t.PromptElementKind={}));class o{constructor(){this.used=new Map,this.unused=new Map}markUsed(e){this.IsNeighboringTab(e)&&this.used.set(e.id,this.convert(e))}undoMarkUsed(e){this.IsNeighboringTab(e)&&this.used.delete(e.id)}markUnused(e){this.IsNeighboringTab(e)&&this.unused.set(e.id,this.convert(e))}convert(e){return{score:e.score.toFixed(4),length:e.text.length}}IsNeighboringTab(e){return e.kind==i.SimilarFile}}t.PromptBackground=o;class s{constructor(){this.used=new Map,this.unused=new Map}markUsed(e){this.used.set(e.kind,(this.used.get(e.kind)||0)+e.tokens)}undoMarkUsed(e){this.used.set(e.kind,(this.used.get(e.kind)||0)-e.tokens)}markUnused(e){this.unused.set(e.kind,(this.used.get(e.kind)||0)+e.tokens)}}t.PromptChoices=s;class a{constructor(e){this.ranges=new Array;let t,r=0;for(const{element:n}of e)0!==n.text.length&&(t===i.BeforeCursor&&n.kind===i.BeforeCursor?this.ranges[this.ranges.length-1].end+=n.text.length:this.ranges.push({kind:n.kind,start:r,end:r+n.text.length}),t=n.kind,r+=n.text.length)}}t.PromptElementRanges=a,t.PromptWishlist=class{constructor(e,t){this.tokenizer=e,this.content=[],this.tokenizer=e,this.lineEndingOption=t}getContent(){return[...this.content]}convertLineEndings(e){return this.lineEndingOption===n.LineEndingOptions.ConvertToUnix&&(e=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n")),e}append(e,t,r,n=this.tokenizer.tokenLength(e),i=NaN){e=this.convertLineEndings(e);const o=this.content.length;return this.content.push({id:o,text:e,kind:t,priority:r,tokens:n,requires:[],excludes:[],score:i}),o}appendLineForLine(e,t,r){const n=(e=this.convertLineEndings(e)).split("\n");for(let e=0;e{"\n"===e&&i.length>0&&!i[i.length-1].endsWith("\n\n")?i[i.length-1]+="\n":i.push(e)}));const o=[];return i.forEach(((e,n)=>{""!==e&&(o.push(this.append(e,t,r)),n>0&&(this.content[this.content.length-2].requires=[this.content[this.content.length-1]]))})),o}require(e,t){const r=this.content.find((t=>t.id===e)),n=this.content.find((e=>e.id===t));r&&n&&r.requires.push(n)}exclude(e,t){const r=this.content.find((t=>t.id===e)),n=this.content.find((e=>e.id===t));r&&n&&r.excludes.push(n)}fulfill(e){const t=new s,r=new o,n=this.content.map(((e,t)=>({element:e,index:t})));n.sort(((e,t)=>e.element.priority===t.element.priority?t.index-e.index:t.element.priority-e.element.priority));const i=new Set,c=new Set;let l;const u=[];let d=e;n.forEach((e=>{const n=e.element,o=e.index;if(d>=0&&(d>0||void 0===l)&&n.requires.every((e=>i.has(e.id)))&&!c.has(n.id)){let s=n.tokens;const a=function(e,t){let r,n=1/0;for(const i of e)i.index>t&&i.index=s?(d-=s,i.add(n.id),n.excludes.forEach((e=>c.add(e.id))),t.markUsed(n),r.markUsed(n),u.push(e)):l=l??e}else t.markUnused(n),r.markUnused(n)})),u.sort(((e,t)=>e.index-t.index));let p=u.reduce(((e,t)=>e+t.element.text),""),h=this.tokenizer.tokenLength(p);for(;h>e;){u.sort(((e,t)=>t.element.priority===e.element.priority?t.index-e.index:t.element.priority-e.element.priority));const e=u.pop();e&&(t.undoMarkUsed(e.element),t.markUnused(e.element),r.undoMarkUsed(e.element),r.markUnused(e.element),l=void 0),u.sort(((e,t)=>e.index-t.index)),p=u.reduce(((e,t)=>e+t.element.text),""),h=this.tokenizer.tokenLength(p)}const f=[...u];if(void 0!==l){f.push(l),f.sort(((e,t)=>e.index-t.index));const n=f.reduce(((e,t)=>e+t.element.text),""),i=this.tokenizer.tokenLength(n);if(i<=e){t.markUsed(l.element),r.markUsed(l.element);const e=new a(f);return{prefix:n,suffix:"",prefixLength:i,suffixLength:0,promptChoices:t,promptBackground:r,promptElementRanges:e}}t.markUnused(l.element),r.markUnused(l.element)}const g=new a(u);return{prefix:p,suffix:"",prefixLength:h,suffixLength:0,promptChoices:t,promptBackground:r,promptElementRanges:g}}};class c{constructor(){this.registeredPriorities=[0,1]}register(e){if(e>c.TOP||ee>t)));return this.register((r+t)/2)}justBelow(...e){const t=Math.min(...e),r=Math.max(...this.registeredPriorities.filter((e=>er>e&&r{var n=void 0!==n?n:{},i=function(){var t,i="object"==typeof window?{currentScript:window.document.currentScript}:null;class o{constructor(){this.initialize()}initialize(){throw new Error("cannot construct a Parser before calling `init()`")}static init(s){return t||(n=Object.assign({},n,s),t=new Promise((t=>{var s=Object.assign({},n),a=[],c="./this.program",l=(e,t)=>{throw t},u="object"==typeof window,d="function"==typeof importScripts,p="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,h=!u&&!p&&!d;if(n.ENVIRONMENT)throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -sENVIRONMENT=web or -sENVIRONMENT=node)");var f,g,m,y="";function v(e){if(e instanceof Se)return;let t=e;e&&"object"==typeof e&&e.stack&&(t=[e,e.stack]),E("exiting due to exception: "+t)}if(p){if("undefined"==typeof process||!process.release||"node"!==process.release.name)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");var _,b;y=d?r(622).dirname(y)+"/":__dirname+"/",_=r(747),b=r(622),f=(e,t)=>(e=b.normalize(e),_.readFileSync(e,t?void 0:"utf8")),m=e=>{var t=f(e,!0);return t.buffer||(t=new Uint8Array(t)),B(t.buffer),t},g=(e,t,r)=>{e=b.normalize(e),_.readFile(e,(function(e,n){e?r(e):t(n.buffer)}))},process.argv.length>1&&(c=process.argv[1].replace(/\\/g,"/")),a=process.argv.slice(2),e.exports=n,l=(e,t)=>{if(ce())throw process.exitCode=e,t;v(t),process.exit(e)},n.inspect=function(){return"[Emscripten Module object]"}}else if(h){if("object"==typeof process||"object"==typeof window||"function"==typeof importScripts)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");"undefined"!=typeof read&&(f=function(e){return read(e)}),m=function(e){let t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(t=read(e,"binary"),B("object"==typeof t),t)},g=function(e,t,r){setTimeout((()=>t(m(e))),0)},"undefined"!=typeof scriptArgs?a=scriptArgs:void 0!==arguments&&(a=arguments),"function"==typeof quit&&(l=(e,t)=>{v(t),quit(e)}),"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)}else{if(!u&&!d)throw new Error("environment detection error");if(d?y=self.location.href:void 0!==i&&i.currentScript&&(y=i.currentScript.src),y=0!==y.indexOf("blob:")?y.substr(0,y.replace(/[?#].*/,"").lastIndexOf("/")+1):"","object"!=typeof window&&"function"!=typeof importScripts)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");f=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},d&&(m=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),g=(e,t,r)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?t(n.response):r()},n.onerror=r,n.send(null)}}var w,C=n.print||console.log.bind(console),E=n.printErr||console.warn.bind(console);function T(e,t){Object.getOwnPropertyDescriptor(n,e)||Object.defineProperty(n,e,{configurable:!0,get:function(){ge("Module."+e+" has been replaced with plain "+t+" (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}})}function S(e){return"FS_createPath"===e||"FS_createDataFile"===e||"FS_createPreloadedFile"===e||"FS_unlink"===e||"addRunDependency"===e||"FS_createLazyFile"===e||"FS_createDevice"===e||"removeRunDependency"===e}Object.assign(n,s),s=null,w="fetchSettings",Object.getOwnPropertyDescriptor(n,w)&&ge("`Module."+w+"` was supplied but `"+w+"` not included in INCOMING_MODULE_JS_API"),n.arguments&&(a=n.arguments),T("arguments","arguments_"),n.thisProgram&&(c=n.thisProgram),T("thisProgram","thisProgram"),n.quit&&(l=n.quit),T("quit","quit_"),B(void 0===n.memoryInitializerPrefixURL,"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),B(void 0===n.pthreadMainPrefixURL,"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),B(void 0===n.cdInitializerPrefixURL,"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),B(void 0===n.filePackagePrefixURL,"Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),B(void 0===n.read,"Module.read option was removed (modify read_ in JS)"),B(void 0===n.readAsync,"Module.readAsync option was removed (modify readAsync in JS)"),B(void 0===n.readBinary,"Module.readBinary option was removed (modify readBinary in JS)"),B(void 0===n.setWindowTitle,"Module.setWindowTitle option was removed (modify setWindowTitle in JS)"),B(void 0===n.TOTAL_MEMORY,"Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY"),T("read","read_"),T("readAsync","readAsync"),T("readBinary","readBinary"),T("setWindowTitle","setWindowTitle"),B(!h,"shell environment detected but not enabled at build time. Add 'shell' to `-sENVIRONMENT` to enable.");var x,k=n.dynamicLibraries||[];n.wasmBinary&&(x=n.wasmBinary),T("wasmBinary","wasmBinary");var I,A=n.noExitRuntime||!0;function P(e,t){switch(e){case 1:return"i8";case 2:return"i16";case 4:return t?"float":"i32";case 8:return t?"double":"i64";default:B(0)}}function R(e,t,r,n){if(e<=0&&ge("segmentation fault storing "+r+" bytes to address "+e),e%r!=0&&ge("alignment error storing to address "+e+", which was expected to be aligned to a multiple of "+r),ae){var i=Ct()>>>0;e+r>i&&ge("segmentation fault, exceeded the top of the available dynamic heap when storing "+r+" bytes to address "+e+". DYNAMICTOP="+i),B(i>=St()),B(i<=j.length)}return function(e,t,r){switch(r){case"i1":case"i8":j[e>>0]=t;break;case"i16":$[e>>1]=t;break;case"i32":q[e>>2]=t;break;case"i64":_e=[t>>>0,(ve=t,+Math.abs(ve)>=1?ve>0?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)],q[e>>2]=_e[0],q[e+4>>2]=_e[1];break;case"float":H[e>>2]=t;break;case"double":V[e>>3]=t;break;default:ge("invalid type for setValue: "+r)}}(e,t,P(r,n)),t}function N(e,t,r){return R(e,t,r,!0)}function O(e,t,r,n){if(e<=0&&ge("segmentation fault loading "+t+" bytes from address "+e),e%t!=0&&ge("alignment error loading from address "+e+", which was expected to be aligned to a multiple of "+t),ae){var i=Ct()>>>0;e+t>i&&ge("segmentation fault, exceeded the top of the available dynamic heap when loading "+t+" bytes from address "+e+". DYNAMICTOP="+i),B(i>=St()),B(i<=j.length)}var o,s,a=P(t,n),c=function(e,t){switch(t){case"i1":case"i8":return j[e>>0];case"i16":return $[e>>1];case"i32":case"i64":return q[e>>2];case"float":return H[e>>2];case"double":return V[e>>3];default:ge("invalid type for getValue: "+t)}}(e,a);return r&&(o=c,s=parseInt(a.substr(1),10),c=o>=0?o:s<=32?2*Math.abs(1<=n);)++i;if(i-t>16&&e.buffer&&z)return z.decode(e.subarray(t,i));for(var o="";t>10,56320|1023&l)}}else o+=String.fromCharCode((31&s)<<6|a)}else o+=String.fromCharCode(s)}return o}function W(e,t){return e?K(U,e,t):""}function G(e,t,r,n){if(!(n>0))return 0;for(var i=r,o=r+n-1,s=0;s=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++s)),a<=127){if(r>=o)break;t[r++]=a}else if(a<=2047){if(r+1>=o)break;t[r++]=192|a>>6,t[r++]=128|63&a}else if(a<=65535){if(r+2>=o)break;t[r++]=224|a>>12,t[r++]=128|a>>6&63,t[r++]=128|63&a}else{if(r+3>=o)break;a>1114111&&Xe("Invalid Unicode code point 0x"+a.toString(16)+" encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF)."),t[r++]=240|a>>18,t[r++]=128|a>>12&63,t[r++]=128|a>>6&63,t[r++]=128|63&a}}return t[r]=0,r-i}function Q(e,t,r){return B("number"==typeof r,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),G(e,U,t,r)}function J(e){for(var t=0,r=0;r=55296&&n<=57343?(t+=4,++r):t+=3}return t}function Y(e){F=e,n.HEAP8=j=new Int8Array(e),n.HEAP16=$=new Int16Array(e),n.HEAP32=q=new Int32Array(e),n.HEAPU8=U=new Uint8Array(e),n.HEAPU16=new Uint16Array(e),n.HEAPU32=new Uint32Array(e),n.HEAPF32=H=new Float32Array(e),n.HEAPF64=V=new Float64Array(e)}var X=5242880;n.STACK_SIZE&&B(X===n.STACK_SIZE,"the stack size can no longer be determined at runtime");var Z=n.INITIAL_MEMORY||33554432;T("INITIAL_MEMORY","INITIAL_MEMORY"),B(Z>=X,"INITIAL_MEMORY should be larger than STACK_SIZE, was "+Z+"! (STACK_SIZE="+X+")"),B("undefined"!=typeof Int32Array&&"undefined"!=typeof Float64Array&&null!=Int32Array.prototype.subarray&&null!=Int32Array.prototype.set,"JS engine does not provide full typed array support"),(I=n.wasmMemory?n.wasmMemory:new WebAssembly.Memory({initial:Z/65536,maximum:32768}))&&(F=I.buffer),B((Z=F.byteLength)%65536==0),Y(F);var ee=new WebAssembly.Table({initial:25,element:"anyfunc"});function te(){if(!M){var e=xt(),t=O(4*(e>>2),4,1),r=O(4*(e+4>>2),4,1);34821223==t&&2310721022==r||ge("Stack overflow! Stack cookie has been overwritten at 0x"+e.toString(16)+", expected hex dwords 0x89BACDFE and 0x2135467, but received 0x"+r.toString(16)+" 0x"+t.toString(16))}}!function(){var e=new Int16Array(1),t=new Int8Array(e.buffer);if(e[0]=25459,115!==t[0]||99!==t[1])throw"Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)"}();var re=[],ne=[],ie=[],oe=[],se=[],ae=!1;function ce(){return A}B(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),B(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),B(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),B(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var le=0,ue=null,de=null,pe={};function he(e){le++,n.monitorRunDependencies&&n.monitorRunDependencies(le),e?(B(!pe[e]),pe[e]=1,null===ue&&"undefined"!=typeof setInterval&&(ue=setInterval((function(){if(M)return clearInterval(ue),void(ue=null);var e=!1;for(var t in pe)e||(e=!0,E("still waiting on run dependencies:")),E("dependency: "+t);e&&E("(end of list)")}),1e4))):E("warning: run dependency added without ID")}function fe(e){if(le--,n.monitorRunDependencies&&n.monitorRunDependencies(le),e?(B(pe[e]),delete pe[e]):E("warning: run dependency removed without ID"),0==le&&(null!==ue&&(clearInterval(ue),ue=null),de)){var t=de;de=null,t()}}function ge(e){throw n.onAbort&&n.onAbort(e),E(e="Aborted("+e+")"),M=!0,D=1,new WebAssembly.RuntimeError(e)}var me,ye,ve,_e,be={error:function(){ge("Filesystem support (FS) was not included. The problem is that you are using files from JS, but files were not used from C/C++, so filesystem support was not auto-included. You can force-include filesystem support with -sFORCE_FILESYSTEM")},init:function(){be.error()},createDataFile:function(){be.error()},createPreloadedFile:function(){be.error()},createLazyFile:function(){be.error()},open:function(){be.error()},mkdev:function(){be.error()},registerDevice:function(){be.error()},analyzePath:function(){be.error()},loadFilesFromDB:function(){be.error()},ErrnoError:function(){be.error()}};function we(e){return e.startsWith("data:application/octet-stream;base64,")}function Ce(e){return e.startsWith("file://")}function Ee(e,t){return function(){var r=e,i=t;return t||(i=n.asm),B(ae,"native function `"+r+"` called before runtime initialization"),i[e]||B(i[e],"exported native function `"+r+"` not found"),i[e].apply(null,arguments)}}function Te(e){try{if(e==me&&x)return new Uint8Array(x);if(m)return m(e);throw"both async and sync fetching of the wasm failed"}catch(e){ge(e)}}function Se(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}n.FS_createDataFile=be.createDataFile,n.FS_createPreloadedFile=be.createPreloadedFile,we(me="tree-sitter.wasm")||(ye=me,me=n.locateFile?n.locateFile(ye,y):y+ye);var xe={},ke=new Set([]),Ie={get:function(e,t){var r=xe[t];return r||(r=xe[t]=new WebAssembly.Global({value:"i32",mutable:!0})),ke.has(t)||(r.required=!0),r}};function Ae(e){for(;e.length>0;)e.shift()(n)}function Pe(e){var t=0,r=0;function n(){for(var r=0,n=1;;){var i=e[t++];if(r+=(127&i)*n,n*=128,!(128&i))break}return r}function i(){var r=n();return K(e,(t+=r)-r,r)}function o(e,t){if(e)throw new Error(t)}var s="dylink.0";if(e instanceof WebAssembly.Module){var a=WebAssembly.Module.customSections(e,s);0===a.length&&(s="dylink",a=WebAssembly.Module.customSections(e,s)),o(0===a.length,"need dylink section"),r=(e=new Uint8Array(a[0])).length}else{o(!(1836278016==new Uint32Array(new Uint8Array(e.subarray(0,24)).buffer)[0]),"need to see wasm magic number"),o(0!==e[8],"need the dylink section to be first"),t=9;var c=n();r=t+c,s=i()}var l={neededDynlibs:[],tlsExports:new Set,weakImports:new Set};if("dylink"==s){l.memorySize=n(),l.memoryAlign=n(),l.tableSize=n(),l.tableAlign=n();for(var u=n(),d=0;d>0,1,0);case"i16":return O(2*(e>>1),2,0);case"i32":case"i64":return O(4*(e>>2),4,0);case"float":return L(4*(e>>2),4,0);case"double":return L(8*(e>>3),8,0);case"*":return O(4*(e>>2),4,1);default:ge("invalid type for getValue: "+t)}return null}function Ne(e){return 0==e.indexOf("dynCall_")||["stackAlloc","stackSave","stackRestore","getTempRet0","setTempRet0"].includes(e)?e:"_"+e}function Oe(e,t){for(var r in e)if(e.hasOwnProperty(r)){_t.hasOwnProperty(r)||(_t[r]=e[r]);var i=Ne(r);n.hasOwnProperty(i)||(n[i]=e[r]),"__main_argc_argv"==r&&(n._main=e[r])}}var Le={loadedLibsByName:{},loadedLibsByHandle:{}},De=[];function Me(e){var t=De[e];return t||(e>=De.length&&(De.length=e+1),De[e]=t=ee.get(e)),B(ee.get(e)==t,"JavaScript-side Wasm function table mirror is out of date!"),t}function Be(e,t,r){return e.includes("j")?function(e,t,r){B("dynCall_"+e in n,"bad function pointer type - dynCall function not found for sig '"+e+"'"),r&&r.length?B(r.length===e.substring(1).replace(/j/g,"--").length):B(1==e.length);var i=n["dynCall_"+e];return r&&r.length?i.apply(null,[t].concat(r)):i.call(null,t)}(e,t,r):(B(Me(t),"missing table entry in dynCall: "+t),Me(t).apply(null,r))}var Fe=5255488;function je(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"].includes(e)}function Ue(e,t){B(e<16384),e<128?t.push(e):t.push(e%128|128,e>>7)}function $e(e,t){if(qe)for(var r=e;r>0,1,0))c=O(4*(r+28>>2),4,1),l=O(4*(r+36>>2),4,1);else{var a=Math.pow(2,n.memoryAlign);a=Math.max(a,16);var c=n.memorySize?(o=function(e){if(ae)return function(e,t){return U.fill(0,e,e+t),e}(bt(e),e);var t=Fe,r=t+e+15&-16;return B(r<=j.length,"failure to getMemory - memory growth etc. is not supported there, call malloc/sbrk directly or increase INITIAL_MEMORY"),Fe=r,xe.__heap_base.value=r,t}(n.memorySize+a),B(s=a,"alignment argument is required"),Math.ceil(o/s)*s):0,l=n.tableSize?ee.length:0;r&&(R(r+24>>0,1,1),R(4*(r+28>>2),c,4),R(4*(r+32>>2),n.memorySize,4),R(4*(r+36>>2),l,4),R(4*(r+40>>2),n.tableSize,4))}var u,d=l+n.tableSize-ee.length;function p(e){var t=We(e,!1);return t||(t=u[e]),B(t,"undefined symbol `"+e+"`. perhaps a side module was not linked in? if this global was expected to arrive from a system library, try to build the MAIN_MODULE with EMCC_FORCE_STDLIBS=1 in the environment"),t}d>0&&ee.grow(d);var h={get:function(e,t){switch(t){case"__memory_base":return c;case"__table_base":return l}return t in _t?_t[t]:(t in e||(e[t]=function(){return r||(r=p(t)),r.apply(null,arguments)}),e[t]);var r}},f=new Proxy({},h),g={"GOT.mem":new Proxy({},Ie),"GOT.func":new Proxy({},Ie),env:f,wasi_snapshot_preview1:f};function m(e){B(ee===i),$e(l,n.tableSize),u=Ke(e.exports,c),t.allowUndefined||Je();var r=u.__wasm_apply_data_relocs;r&&(ae?r():se.push(r));var o=u.__wasm_call_ctors;return o&&(ae?o():ne.push(o)),u}if(t.loadAsync){if(e instanceof WebAssembly.Module){var y=new WebAssembly.Instance(e,g);return Promise.resolve(m(y))}return WebAssembly.instantiate(e,g).then((function(e){return m(e.instance)}))}var v=e instanceof WebAssembly.Module?e:new WebAssembly.Module(e);return m(y=new WebAssembly.Instance(v,g))}return t.loadAsync?n.neededDynlibs.reduce((function(e,r){return e.then((function(){return Qe(r,t)}))}),Promise.resolve()).then((function(){return o()})):(n.neededDynlibs.forEach((function(e){Qe(e,t)})),o())}function Qe(e,t,r){t=t||{global:!0,nodelete:!0};var n=Le.loadedLibsByName[e];if(n)return t.global&&!n.global&&(n.global=!0,"loading"!==n.module&&Oe(n.module)),t.nodelete&&n.refcount!==1/0&&(n.refcount=1/0),n.refcount++,r&&(Le.loadedLibsByHandle[r]=n),!t.loadAsync||Promise.resolve(!0);function i(e){if(t.fs&&t.fs.findObject(e)){var r=t.fs.readFile(e,{encoding:"binary"});return r instanceof Uint8Array||(r=new Uint8Array(r)),t.loadAsync?Promise.resolve(r):r}if(t.loadAsync)return new Promise((function(t,r){g(e,(e=>t(new Uint8Array(e))),r)}));if(!m)throw new Error(e+": file not found, and synchronous loading of external files is not available");return m(e)}function o(){if("undefined"!=typeof preloadedWasm&&preloadedWasm[e]){var n=preloadedWasm[e];return t.loadAsync?Promise.resolve(n):n}return t.loadAsync?i(e).then((function(e){return Ge(e,t,r)})):Ge(i(e),t,r)}function s(e){n.global&&Oe(e),n.module=e}return n={refcount:t.nodelete?1/0:1,name:e,module:"loading",global:t.global},Le.loadedLibsByName[e]=n,r&&(Le.loadedLibsByHandle[r]=n),t.loadAsync?o().then((function(e){return s(e),!0})):(s(o()),!0)}function Je(){for(var e in xe)if(0==xe[e].value){var t=We(e,!0);if(!t&&!xe[e].required)continue;if(B(t,"undefined symbol `"+e+"`. perhaps a side module was not linked in? if this global was expected to arrive from a system library, try to build the MAIN_MODULE with EMCC_FORCE_STDLIBS=1 in the environment"),"function"==typeof t)xe[e].value=ze(t,t.sig);else{if("number"!=typeof t)throw new Error("bad export type for `"+e+"`: "+typeof t);xe[e].value=t}}}function Ye(e,t,r="i8"){switch(r.endsWith("*")&&(r="*"),r){case"i1":case"i8":R(e>>0,t,1);break;case"i16":R(2*(e>>1),t,2);break;case"i32":case"*":R(4*(e>>2),t,4);break;case"i64":R(4*(e>>2),(_e=[t>>>0,(ve=t,+Math.abs(ve)>=1?ve>0?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)])[0],4),R(4*(e+4>>2),_e[1],4);break;case"float":N(4*(e>>2),t,4);break;case"double":N(8*(e>>3),t,8);break;default:ge("invalid type for setValue: "+r)}}function Xe(e){Xe.shown||(Xe.shown={}),Xe.shown[e]||(Xe.shown[e]=1,p&&(e="warning: "+e),E(e))}var Ze,et=new WebAssembly.Global({value:"i32",mutable:!1},1024),tt=new WebAssembly.Global({value:"i32",mutable:!0},5255488),rt=new WebAssembly.Global({value:"i32",mutable:!1},1);function nt(){return!0}function it(){ge("native code called abort()")}function ot(){return Date.now()}function st(e,t,r){U.copyWithin(e,t,t+r)}function at(e){try{return I.grow(e-F.byteLength+65535>>>16),Y(I.buffer),1}catch(t){E("emscripten_realloc_buffer: Attempted to grow heap from "+F.byteLength+" bytes to "+e+" bytes, but got error: "+t)}}function ct(e){var t=U.length;B((e>>>=0)>t);var r,n=2147483648;if(e>n)return E("Cannot enlarge memory, asked to go up to "+e+" bytes, but the limit is "+n+" bytes!"),!1;for(var i=1;i<=4;i*=2){var o=t*(1+.2/i);o=Math.min(o,e+100663296);var s=Math.min(n,(r=Math.max(e,o))+(65536-r%65536)%65536);if(at(s))return!0}return E("Failed to grow the heap from "+t+" bytes to "+s+" bytes, not enough memory!"),!1}nt.sig="i",n._abort=it,it.sig="v",ot.sig="d",(Ze=p?()=>{var e=process.hrtime();return 1e3*e[0]+e[1]/1e6}:()=>performance.now()).sig="d",st.sig="vppp",ct.sig="ip";var lt={DEFAULT_POLLMASK:5,calculateAt:function(e,t,r){if(PATH.isAbs(t))return t;var n;if(n=-100===e?be.cwd():lt.getStreamFromFD(e).path,0==t.length){if(!r)throw new be.ErrnoError(44);return n}return PATH.join2(n,t)},doStat:function(e,t,r){try{var n=e(t)}catch(e){if(e&&e.node&&PATH.normalize(t)!==PATH.normalize(be.getPath(e.node)))return-54;throw e}return R(4*(r>>2),n.dev,4),R(4*(r+8>>2),n.ino,4),R(4*(r+12>>2),n.mode,4),R(4*(r+16>>2),n.nlink,4),R(4*(r+20>>2),n.uid,4),R(4*(r+24>>2),n.gid,4),R(4*(r+28>>2),n.rdev,4),R(4*(r+40>>2),(_e=[n.size>>>0,(ve=n.size,+Math.abs(ve)>=1?ve>0?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)])[0],4),R(4*(r+44>>2),_e[1],4),R(4*(r+48>>2),4096,4),R(4*(r+52>>2),n.blocks,4),R(4*(r+56>>2),(_e=[Math.floor(n.atime.getTime()/1e3)>>>0,(ve=Math.floor(n.atime.getTime()/1e3),+Math.abs(ve)>=1?ve>0?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)])[0],4),R(4*(r+60>>2),_e[1],4),R(4*(r+64>>2),0,4),R(4*(r+72>>2),(_e=[Math.floor(n.mtime.getTime()/1e3)>>>0,(ve=Math.floor(n.mtime.getTime()/1e3),+Math.abs(ve)>=1?ve>0?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)])[0],4),R(4*(r+76>>2),_e[1],4),R(4*(r+80>>2),0,4),R(4*(r+88>>2),(_e=[Math.floor(n.ctime.getTime()/1e3)>>>0,(ve=Math.floor(n.ctime.getTime()/1e3),+Math.abs(ve)>=1?ve>0?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)])[0],4),R(4*(r+92>>2),_e[1],4),R(4*(r+96>>2),0,4),R(4*(r+104>>2),(_e=[n.ino>>>0,(ve=n.ino,+Math.abs(ve)>=1?ve>0?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)])[0],4),R(4*(r+108>>2),_e[1],4),0},doMsync:function(e,t,r,n,i){if(!be.isFile(t.node.mode))throw new be.ErrnoError(43);if(2&n)return 0;var o=U.slice(e,e+r);be.msync(t,o,i,r,n)},varargs:void 0,get:function(){return B(null!=lt.varargs),lt.varargs+=4,O(4*(lt.varargs-4>>2),4,0)},getStr:function(e){return W(e)},getStreamFromFD:function(e){var t=be.getStream(e);if(!t)throw new be.ErrnoError(8);return t}};function ut(e){D=e,ce()||(n.onExit&&n.onExit(e),M=!0),l(e,new Se(e))}function dt(e,t){D=e,function(){var e=C,t=E,r=!1;C=E=e=>{r=!0};try{wt(0)}catch(e){}C=e,E=t,r&&(Xe("stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the FAQ), or make sure to emit a newline when you printf etc."),Xe("(this may also be due to not including full filesystem support - try building with -sFORCE_FILESYSTEM)"))}(),ce()&&!t&&E("program exited (with status: "+e+"), but EXIT_RUNTIME is not set, so halting execution but not exiting the runtime or preventing further async execution (build with EXIT_RUNTIME=1, if you want a true shutdown)"),ut(e)}ut.sig="vi";var pt=dt;function ht(e){try{var t=lt.getStreamFromFD(e);return be.close(t),0}catch(e){if(void 0===be||!(e instanceof be.ErrnoError))throw e;return e.errno}}function ft(e,t,r,n,i){try{var o=(c=r,B((a=t)==a>>>0||a==(0|a)),B(c===(0|c)),c+2097152>>>0<4194305-!!a?(a>>>0)+4294967296*c:NaN);if(isNaN(o))return 61;var s=lt.getStreamFromFD(e);return be.llseek(s,o,n),R(4*(i>>2),(_e=[s.position>>>0,(ve=s.position,+Math.abs(ve)>=1?ve>0?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)])[0],4),R(4*(i+4>>2),_e[1],4),s.getdents&&0===o&&0===n&&(s.getdents=null),0}catch(e){if(void 0===be||!(e instanceof be.ErrnoError))throw e;return e.errno}var a,c}function gt(e,t,r,n){try{var i=function(e,t,r,n){for(var i=0,o=0;o>2),4,1),a=O(4*(t+4>>2),4,1);t+=8;var c=be.write(e,j,s,a,void 0);if(c<0)return-1;i+=c}return i}(lt.getStreamFromFD(e),t,r);return R(4*(n>>2),i,4),0}catch(e){if(void 0===be||!(e instanceof be.ErrnoError))throw e;return e.errno}}function mt(e,t,r){if(B(t%2==0,"Pointer passed to stringToUTF16 must be aligned to two bytes!"),B("number"==typeof r,"stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),void 0===r&&(r=2147483647),r<2)return 0;for(var n=t,i=(r-=2)<2*e.length?r/2:e.length,o=0;o>1),e.charCodeAt(o),2),t+=2;return R(2*(t>>1),0,2),t-n}function yt(e){for(var t="";;){var r=O(e++>>0,1,1);if(!r)return t;t+=String.fromCharCode(r)}}pt.sig="vi",ht.sig="ii",ft.sig="iijip",gt.sig="iippp";var vt,_t={__heap_base:Fe,__indirect_function_table:ee,__memory_base:et,__stack_high:5255488,__stack_low:12608,__stack_pointer:tt,__table_base:rt,_emscripten_get_now_is_monotonic:nt,abort:it,alignfault:function(){ge("alignment fault")},emscripten_date_now:ot,emscripten_get_now:Ze,emscripten_memcpy_big:st,emscripten_resize_heap:ct,exit:pt,fd_close:ht,fd_seek:ft,fd_write:gt,memory:I,segfault:function(){ge("segmentation fault")},tree_sitter_log_callback:function(e,t){if(Ht){const r=W(t);Ht(r,0!==e)}},tree_sitter_parse_callback:function(e,t,r,n,i){var o=qt(t,{row:r,column:n});"string"==typeof o?(Ye(i,o.length,"i32"),mt(o,e,10240)):Ye(i,0,"i32")}},bt=(function(){var e={env:_t,wasi_snapshot_preview1:_t,"GOT.mem":new Proxy(_t,Ie),"GOT.func":new Proxy(_t,Ie)};function t(e,t){var r=e.exports;r=Ke(r,1024);var i,o=Pe(t);o.neededDynlibs&&(k=o.neededDynlibs.concat(k)),Oe(r),n.asm=r,i=n.asm.__wasm_call_ctors,ne.unshift(i),se.push(n.asm.__wasm_apply_data_relocs),fe("wasm-instantiate")}he("wasm-instantiate");var r=n;function i(e){B(n===r,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),r=null,t(e.instance,e.module)}function o(t){return function(){if(!x&&(u||d)){if("function"==typeof fetch&&!Ce(me))return fetch(me,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+me+"'";return e.arrayBuffer()})).catch((function(){return Te(me)}));if(g)return new Promise((function(e,t){g(me,(function(t){e(new Uint8Array(t))}),t)}))}return Promise.resolve().then((function(){return Te(me)}))}().then((function(t){return WebAssembly.instantiate(t,e)})).then((function(e){return e})).then(t,(function(e){E("failed to asynchronously prepare wasm: "+e),Ce(me)&&E("warning: Loading from a file URI ("+me+") is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing"),ge(e)}))}if(n.instantiateWasm)try{return n.instantiateWasm(e,t)}catch(e){return E("Module.instantiateWasm callback failed with error: "+e),!1}x||"function"!=typeof WebAssembly.instantiateStreaming||we(me)||Ce(me)||p||"function"!=typeof fetch?o(i):fetch(me,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(i,(function(e){return E("wasm streaming compile failed: "+e),E("falling back to ArrayBuffer instantiation"),o(i)}))}))}(),n.___wasm_call_ctors=Ee("__wasm_call_ctors"),n.___wasm_apply_data_relocs=Ee("__wasm_apply_data_relocs"),n._malloc=Ee("malloc")),wt=(n._calloc=Ee("calloc"),n._realloc=Ee("realloc"),n._free=Ee("free"),n._ts_language_symbol_count=Ee("ts_language_symbol_count"),n._ts_language_version=Ee("ts_language_version"),n._ts_language_field_count=Ee("ts_language_field_count"),n._ts_language_symbol_name=Ee("ts_language_symbol_name"),n._ts_language_symbol_for_name=Ee("ts_language_symbol_for_name"),n._ts_language_symbol_type=Ee("ts_language_symbol_type"),n._ts_language_field_name_for_id=Ee("ts_language_field_name_for_id"),n._memset=Ee("memset"),n._memcpy=Ee("memcpy"),n._ts_parser_delete=Ee("ts_parser_delete"),n._ts_parser_set_language=Ee("ts_parser_set_language"),n._ts_parser_reset=Ee("ts_parser_reset"),n._ts_parser_timeout_micros=Ee("ts_parser_timeout_micros"),n._ts_parser_set_timeout_micros=Ee("ts_parser_set_timeout_micros"),n._ts_query_new=Ee("ts_query_new"),n._ts_query_delete=Ee("ts_query_delete"),n._iswspace=Ee("iswspace"),n._ts_query_pattern_count=Ee("ts_query_pattern_count"),n._ts_query_capture_count=Ee("ts_query_capture_count"),n._ts_query_string_count=Ee("ts_query_string_count"),n._ts_query_capture_name_for_id=Ee("ts_query_capture_name_for_id"),n._ts_query_string_value_for_id=Ee("ts_query_string_value_for_id"),n._ts_query_predicates_for_pattern=Ee("ts_query_predicates_for_pattern"),n._memmove=Ee("memmove"),n._memcmp=Ee("memcmp"),n._ts_tree_copy=Ee("ts_tree_copy"),n._ts_tree_delete=Ee("ts_tree_delete"),n._iswalnum=Ee("iswalnum"),n._ts_init=Ee("ts_init"),n._ts_parser_new_wasm=Ee("ts_parser_new_wasm"),n._ts_parser_enable_logger_wasm=Ee("ts_parser_enable_logger_wasm"),n._ts_parser_parse_wasm=Ee("ts_parser_parse_wasm"),n._ts_language_type_is_named_wasm=Ee("ts_language_type_is_named_wasm"),n._ts_language_type_is_visible_wasm=Ee("ts_language_type_is_visible_wasm"),n._ts_tree_root_node_wasm=Ee("ts_tree_root_node_wasm"),n._ts_tree_edit_wasm=Ee("ts_tree_edit_wasm"),n._ts_tree_get_changed_ranges_wasm=Ee("ts_tree_get_changed_ranges_wasm"),n._ts_tree_cursor_new_wasm=Ee("ts_tree_cursor_new_wasm"),n._ts_tree_cursor_delete_wasm=Ee("ts_tree_cursor_delete_wasm"),n._ts_tree_cursor_reset_wasm=Ee("ts_tree_cursor_reset_wasm"),n._ts_tree_cursor_goto_first_child_wasm=Ee("ts_tree_cursor_goto_first_child_wasm"),n._ts_tree_cursor_goto_next_sibling_wasm=Ee("ts_tree_cursor_goto_next_sibling_wasm"),n._ts_tree_cursor_goto_parent_wasm=Ee("ts_tree_cursor_goto_parent_wasm"),n._ts_tree_cursor_current_node_type_id_wasm=Ee("ts_tree_cursor_current_node_type_id_wasm"),n._ts_tree_cursor_current_node_is_named_wasm=Ee("ts_tree_cursor_current_node_is_named_wasm"),n._ts_tree_cursor_current_node_is_missing_wasm=Ee("ts_tree_cursor_current_node_is_missing_wasm"),n._ts_tree_cursor_current_node_id_wasm=Ee("ts_tree_cursor_current_node_id_wasm"),n._ts_tree_cursor_start_position_wasm=Ee("ts_tree_cursor_start_position_wasm"),n._ts_tree_cursor_end_position_wasm=Ee("ts_tree_cursor_end_position_wasm"),n._ts_tree_cursor_start_index_wasm=Ee("ts_tree_cursor_start_index_wasm"),n._ts_tree_cursor_end_index_wasm=Ee("ts_tree_cursor_end_index_wasm"),n._ts_tree_cursor_current_field_id_wasm=Ee("ts_tree_cursor_current_field_id_wasm"),n._ts_tree_cursor_current_node_wasm=Ee("ts_tree_cursor_current_node_wasm"),n._ts_node_symbol_wasm=Ee("ts_node_symbol_wasm"),n._ts_node_child_count_wasm=Ee("ts_node_child_count_wasm"),n._ts_node_named_child_count_wasm=Ee("ts_node_named_child_count_wasm"),n._ts_node_child_wasm=Ee("ts_node_child_wasm"),n._ts_node_named_child_wasm=Ee("ts_node_named_child_wasm"),n._ts_node_child_by_field_id_wasm=Ee("ts_node_child_by_field_id_wasm"),n._ts_node_next_sibling_wasm=Ee("ts_node_next_sibling_wasm"),n._ts_node_prev_sibling_wasm=Ee("ts_node_prev_sibling_wasm"),n._ts_node_next_named_sibling_wasm=Ee("ts_node_next_named_sibling_wasm"),n._ts_node_prev_named_sibling_wasm=Ee("ts_node_prev_named_sibling_wasm"),n._ts_node_parent_wasm=Ee("ts_node_parent_wasm"),n._ts_node_descendant_for_index_wasm=Ee("ts_node_descendant_for_index_wasm"),n._ts_node_named_descendant_for_index_wasm=Ee("ts_node_named_descendant_for_index_wasm"),n._ts_node_descendant_for_position_wasm=Ee("ts_node_descendant_for_position_wasm"),n._ts_node_named_descendant_for_position_wasm=Ee("ts_node_named_descendant_for_position_wasm"),n._ts_node_start_point_wasm=Ee("ts_node_start_point_wasm"),n._ts_node_end_point_wasm=Ee("ts_node_end_point_wasm"),n._ts_node_start_index_wasm=Ee("ts_node_start_index_wasm"),n._ts_node_end_index_wasm=Ee("ts_node_end_index_wasm"),n._ts_node_to_string_wasm=Ee("ts_node_to_string_wasm"),n._ts_node_children_wasm=Ee("ts_node_children_wasm"),n._ts_node_named_children_wasm=Ee("ts_node_named_children_wasm"),n._ts_node_descendants_of_type_wasm=Ee("ts_node_descendants_of_type_wasm"),n._ts_node_is_named_wasm=Ee("ts_node_is_named_wasm"),n._ts_node_has_changes_wasm=Ee("ts_node_has_changes_wasm"),n._ts_node_has_error_wasm=Ee("ts_node_has_error_wasm"),n._ts_node_is_missing_wasm=Ee("ts_node_is_missing_wasm"),n._ts_query_matches_wasm=Ee("ts_query_matches_wasm"),n._ts_query_captures_wasm=Ee("ts_query_captures_wasm"),n.___cxa_atexit=Ee("__cxa_atexit"),n.___errno_location=Ee("__errno_location"),n._fflush=Ee("fflush")),Ct=(n._strlen=Ee("strlen"),n._iswdigit=Ee("iswdigit"),n._iswalpha=Ee("iswalpha"),n._iswlower=Ee("iswlower"),n._memchr=Ee("memchr"),n._towupper=Ee("towupper"),n._sbrk=Ee("sbrk")),Et=(n._emscripten_get_sbrk_ptr=Ee("emscripten_get_sbrk_ptr"),n._setThrew=Ee("setThrew")),Tt=n._emscripten_stack_set_limits=function(){return(Tt=n._emscripten_stack_set_limits=n.asm.emscripten_stack_set_limits).apply(null,arguments)},St=(n._emscripten_stack_get_free=function(){return(n._emscripten_stack_get_free=n.asm.emscripten_stack_get_free).apply(null,arguments)},n._emscripten_stack_get_base=function(){return(St=n._emscripten_stack_get_base=n.asm.emscripten_stack_get_base).apply(null,arguments)}),xt=n._emscripten_stack_get_end=function(){return(xt=n._emscripten_stack_get_end=n.asm.emscripten_stack_get_end).apply(null,arguments)},kt=n.stackSave=Ee("stackSave"),It=n.stackRestore=Ee("stackRestore"),At=n.stackAlloc=Ee("stackAlloc");n.__Znwm=Ee("_Znwm"),n.__ZdlPv=Ee("_ZdlPv"),n.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev=Ee("_ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev"),n.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm=Ee("_ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm"),n.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm=Ee("_ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm"),n.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm=Ee("_ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm"),n.__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm=Ee("_ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm"),n.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc=Ee("_ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc"),n.__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev=Ee("_ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev"),n.__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw=Ee("_ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw"),n.dynCall_jiji=Ee("dynCall_jiji"),n._orig$ts_parser_timeout_micros=Ee("orig$ts_parser_timeout_micros"),n._orig$ts_parser_set_timeout_micros=Ee("orig$ts_parser_set_timeout_micros"),n.AsciiToString=yt,n.stringToUTF16=mt,["run","UTF8ArrayToString","UTF8ToString","stringToUTF8Array","stringToUTF8","lengthBytesUTF8","addOnPreRun","addOnInit","addOnPreMain","addOnExit","addOnPostRun","addRunDependency","removeRunDependency","FS_createFolder","FS_createPath","FS_createDataFile","FS_createPreloadedFile","FS_createLazyFile","FS_createLink","FS_createDevice","FS_unlink","getLEB","getFunctionTables","alignFunctionTables","registerFunctions","prettyPrint","getCompilerSetting","out","err","callMain","abort","keepRuntimeAlive","wasmMemory","stackAlloc","stackSave","stackRestore","getTempRet0","setTempRet0","writeStackCookie","checkStackCookie","ptrToString","zeroMemory","stringToNewUTF8","exitJS","getHeapMax","emscripten_realloc_buffer","ENV","ERRNO_CODES","ERRNO_MESSAGES","setErrNo","inetPton4","inetNtop4","inetPton6","inetNtop6","readSockaddr","writeSockaddr","DNS","getHostByName","Protocols","Sockets","getRandomDevice","warnOnce","traverseStack","UNWIND_CACHE","convertPCtoSourceLocation","readAsmConstArgsArray","readAsmConstArgs","mainThreadEM_ASM","jstoi_q","jstoi_s","getExecutableName","listenOnce","autoResumeAudioContext","dynCallLegacy","getDynCaller","dynCall","handleException","runtimeKeepalivePush","runtimeKeepalivePop","callUserCallback","maybeExit","safeSetTimeout","asmjsMangle","asyncLoad","alignMemory","mmapAlloc","writeI53ToI64","writeI53ToI64Clamped","writeI53ToI64Signaling","writeI53ToU64Clamped","writeI53ToU64Signaling","readI53FromI64","readI53FromU64","convertI32PairToI53","convertI32PairToI53Checked","convertU32PairToI53","getCFunc","ccall","cwrap","uleb128Encode","sigToWasmTypes","generateFuncType","convertJsFunctionToWasm","freeTableIndexes","functionsInTableMap","getEmptyTableSlot","updateTableMap","addFunction","removeFunction","reallyNegative","unSign","strLen","reSign","formatString","setValue","getValue","PATH","PATH_FS","intArrayFromString","intArrayToString","stringToAscii","UTF16Decoder","UTF16ToString","lengthBytesUTF16","UTF32ToString","stringToUTF32","lengthBytesUTF32","allocateUTF8","allocateUTF8OnStack","writeStringToMemory","writeArrayToMemory","writeAsciiToMemory","SYSCALLS","getSocketFromFD","getSocketAddress","JSEvents","registerKeyEventCallback","specialHTMLTargets","maybeCStringToJsString","findEventTarget","findCanvasEventTarget","getBoundingClientRect","fillMouseEventData","registerMouseEventCallback","registerWheelEventCallback","registerUiEventCallback","registerFocusEventCallback","fillDeviceOrientationEventData","registerDeviceOrientationEventCallback","fillDeviceMotionEventData","registerDeviceMotionEventCallback","screenOrientation","fillOrientationChangeEventData","registerOrientationChangeEventCallback","fillFullscreenChangeEventData","registerFullscreenChangeEventCallback","JSEvents_requestFullscreen","JSEvents_resizeCanvasForFullscreen","registerRestoreOldStyle","hideEverythingExceptGivenElement","restoreHiddenElements","setLetterbox","currentFullscreenStrategy","restoreOldWindowedStyle","softFullscreenResizeWebGLRenderTarget","doRequestFullscreen","fillPointerlockChangeEventData","registerPointerlockChangeEventCallback","registerPointerlockErrorEventCallback","requestPointerLock","fillVisibilityChangeEventData","registerVisibilityChangeEventCallback","registerTouchEventCallback","fillGamepadEventData","registerGamepadEventCallback","registerBeforeUnloadEventCallback","fillBatteryEventData","battery","registerBatteryEventCallback","setCanvasElementSize","getCanvasElementSize","demangle","demangleAll","jsStackTrace","stackTrace","ExitStatus","getEnvStrings","checkWasiClock","doReadv","doWritev","GOT","CurrentModuleWeakSymbols","LDSO","getMemory","mergeLibSymbols","loadWebAssemblyModule","loadDynamicLibrary","dlopenInternal","createDyncallWrapper","setImmediateWrapped","clearImmediateWrapped","polyfillSetImmediate","Browser","setMainLoop","wget","tempFixedLengthArray","miniTempWebGLFloatBuffers","heapObjectForWebGLType","heapAccessShiftForWebGLHeap","GL","emscriptenWebGLGet","computeUnpackAlignedImageSize","emscriptenWebGLGetTexPixelData","emscriptenWebGLGetUniform","webglGetUniformLocation","webglPrepareUniformLocationsBeforeFirstUse","webglGetLeftBracePos","emscriptenWebGLGetVertexAttrib","writeGLArray","AL","SDL_unicode","SDL_ttfContext","SDL_audio","SDL","SDL_gfx","GLUT","EGL","GLFW_Window","GLFW","GLEW","IDBStore","runAndAbortIfError","ALLOC_NORMAL","ALLOC_STACK","allocate"].forEach((function(e){Object.getOwnPropertyDescriptor(n,e)||Object.defineProperty(n,e,{configurable:!0,get:function(){var t="'"+e+"' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)";S(e)&&(t+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),ge(t)}})})),["ptrToString","stringToNewUTF8","setErrNo","inetPton4","inetNtop4","inetPton6","inetNtop6","readSockaddr","writeSockaddr","getHostByName","getRandomDevice","traverseStack","convertPCtoSourceLocation","readAsmConstArgs","mainThreadEM_ASM","jstoi_q","jstoi_s","getExecutableName","listenOnce","autoResumeAudioContext","getDynCaller","runtimeKeepalivePush","runtimeKeepalivePop","callUserCallback","maybeExit","safeSetTimeout","asyncLoad","mmapAlloc","writeI53ToI64","writeI53ToI64Clamped","writeI53ToI64Signaling","writeI53ToU64Clamped","writeI53ToU64Signaling","readI53FromI64","readI53FromU64","convertI32PairToI53","convertU32PairToI53","getCFunc","ccall","cwrap","removeFunction","reallyNegative","strLen","reSign","formatString","intArrayFromString","intArrayToString","stringToAscii","UTF16ToString","lengthBytesUTF16","UTF32ToString","stringToUTF32","lengthBytesUTF32","allocateUTF8","writeStringToMemory","writeArrayToMemory","writeAsciiToMemory","getSocketFromFD","getSocketAddress","registerKeyEventCallback","maybeCStringToJsString","findEventTarget","findCanvasEventTarget","getBoundingClientRect","fillMouseEventData","registerMouseEventCallback","registerWheelEventCallback","registerUiEventCallback","registerFocusEventCallback","fillDeviceOrientationEventData","registerDeviceOrientationEventCallback","fillDeviceMotionEventData","registerDeviceMotionEventCallback","screenOrientation","fillOrientationChangeEventData","registerOrientationChangeEventCallback","fillFullscreenChangeEventData","registerFullscreenChangeEventCallback","JSEvents_requestFullscreen","JSEvents_resizeCanvasForFullscreen","registerRestoreOldStyle","hideEverythingExceptGivenElement","restoreHiddenElements","setLetterbox","softFullscreenResizeWebGLRenderTarget","doRequestFullscreen","fillPointerlockChangeEventData","registerPointerlockChangeEventCallback","registerPointerlockErrorEventCallback","requestPointerLock","fillVisibilityChangeEventData","registerVisibilityChangeEventCallback","registerTouchEventCallback","fillGamepadEventData","registerGamepadEventCallback","registerBeforeUnloadEventCallback","fillBatteryEventData","battery","registerBatteryEventCallback","setCanvasElementSize","getCanvasElementSize","demangle","demangleAll","jsStackTrace","stackTrace","getEnvStrings","checkWasiClock","doReadv","dlopenInternal","createDyncallWrapper","setImmediateWrapped","clearImmediateWrapped","polyfillSetImmediate","setMainLoop","heapObjectForWebGLType","heapAccessShiftForWebGLHeap","emscriptenWebGLGet","computeUnpackAlignedImageSize","emscriptenWebGLGetTexPixelData","emscriptenWebGLGetUniform","webglGetUniformLocation","webglPrepareUniformLocationsBeforeFirstUse","webglGetLeftBracePos","emscriptenWebGLGetVertexAttrib","writeGLArray","SDL_unicode","SDL_ttfContext","SDL_audio","GLFW_Window","runAndAbortIfError","ALLOC_NORMAL","ALLOC_STACK","allocate"].forEach((function(e){"undefined"==typeof globalThis||Object.getOwnPropertyDescriptor(globalThis,e)||Object.defineProperty(globalThis,e,{configurable:!0,get:function(){var t="`"+e+"` is a library symbol and not included by default; add it to your library.js __deps or to DEFAULT_LIBRARY_FUNCS_TO_INCLUDE on the command line",r=e;r.startsWith("_")||(r="$"+e),t+=" (e.g. -sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE="+r+")",S(e)&&(t+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),Xe(t)}})})),de=function e(){vt||Rt(),vt||(de=e)};var Pt=!1;function Rt(e){function t(){vt||(vt=!0,n.calledRun=!0,M||(B(!ae),ae=!0,te(),Ae(se),Ae(ne),te(),Ae(ie),n.onRuntimeInitialized&&n.onRuntimeInitialized(),Nt&&function(e){B(0==le,'cannot call main when async dependencies remain! (listen on Module["onRuntimeInitialized"])'),B(0==re.length,"cannot call main when preRun functions remain to be called");var t=n._main;if(t){(e=e||[]).unshift(c);var r=e.length,i=At(4*(r+1)),o=i>>2;e.forEach((e=>{R(4*o++,function(e){var t=J(e)+1,r=At(t);return G(e,j,r,t),r}(e),4)})),R(4*o,0,4);try{dt(t(r,i),!0)}catch(e){return function(e){if(e instanceof Se||"unwind"==e)return D;l(1,e)}(e)}}}(e),function(){if(te(),n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)e=n.postRun.shift(),oe.unshift(e);var e;Ae(oe)}()))}var r;e=e||a,le>0||(Tt(5255488,12608),B(0==(3&(r=xt()))),R(4*(r>>2),34821223,4),R(4*(r+4>>2),2310721022,4),!Pt&&(k.length?(he("preloadDylibs"),k.reduce((function(e,t){return e.then((function(){return Qe(t,{loadAsync:!0,global:!0,nodelete:!0,allowUndefined:!0})}))}),Promise.resolve()).then((function(){Je(),fe("preloadDylibs")}))):Je(),Pt=!0,le>0)||(function(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)e=n.preRun.shift(),re.unshift(e);var e;Ae(re)}(),le>0||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),t()}),1)):t(),te())))}if(n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();var Nt=!0;n.noInitialRun&&(Nt=!1),Rt();const Ot=n,Lt={},Dt=20,Mt={row:0,column:0},Bt=/[\w-.]*/g,Ft=/^_?tree_sitter_\w+/;var jt,Ut,$t,qt,Ht;class Vt{static init(){$t=Ot._ts_init(),jt=Re($t,"i32"),Ut=Re($t+4,"i32")}initialize(){Ot._ts_parser_new_wasm(),this[0]=Re($t,"i32"),this[1]=Re($t+4,"i32")}delete(){Ot._ts_parser_delete(this[0]),Ot._free(this[1]),this[0]=0,this[1]=0}setLanguage(e){let t;if(e){if(e.constructor!==Gt)throw new Error("Argument must be a Language");{t=e[0];const r=Ot._ts_language_version(t);if(re.slice(t,n);else{if("function"!=typeof e)throw new Error("Argument must be a string or a function");qt=e}this.logCallback?(Ht=this.logCallback,Ot._ts_parser_enable_logger_wasm(this[0],1)):(Ht=null,Ot._ts_parser_enable_logger_wasm(this[0],0));let n=0,i=0;if(r&&r.includedRanges){n=r.includedRanges.length,i=Ot._calloc(n,24);let e=i;for(let t=0;t0){let e=r;for(let r=0;r0){let r=t;for(let t=0;t0){let r=t;for(let t=0;t0){let e=a;for(let t=0;t0){if("string"!==i[0].type)throw new Error("Predicates must begin with a literal value");const t=i[0].value;let r=!0;switch(t){case"not-eq?":r=!1;case"eq?":if(3!==i.length)throw new Error("Wrong number of arguments to `#eq?` predicate. Expected 2, got "+(i.length-1));if("capture"!==i[1].type)throw new Error(`First argument of \`#eq?\` predicate must be a capture. Got "${i[1].value}"`);if("capture"===i[2].type){const t=i[1].name,n=i[2].name;h[e].push((function(e){let i,o;for(const r of e)r.name===t&&(i=r.node),r.name===n&&(o=r.node);return void 0===i||void 0===o||i.text===o.text===r}))}else{const t=i[1].name,n=i[2].value;h[e].push((function(e){for(const i of e)if(i.name===t)return i.node.text===n===r;return!0}))}break;case"not-match?":r=!1;case"match?":if(3!==i.length)throw new Error(`Wrong number of arguments to \`#match?\` predicate. Expected 2, got ${i.length-1}.`);if("capture"!==i[1].type)throw new Error(`First argument of \`#match?\` predicate must be a capture. Got "${i[1].value}".`);if("string"!==i[2].type)throw new Error(`Second argument of \`#match?\` predicate must be a string. Got @${i[2].value}.`);const n=i[1].name,o=new RegExp(i[2].value);h[e].push((function(e){for(const t of e)if(t.name===n)return o.test(t.node.text)===r;return!0}));break;case"set!":if(i.length<2||i.length>3)throw new Error(`Wrong number of arguments to \`#set!\` predicate. Expected 1 or 2. Got ${i.length-1}.`);if(i.some((e=>"string"!==e.type)))throw new Error('Arguments to `#set!` predicate must be a strings.".');l[e]||(l[e]={}),l[e][i[1].value]=i[2]?i[2].value:null;break;case"is?":case"is-not?":if(i.length<2||i.length>3)throw new Error(`Wrong number of arguments to \`#${t}\` predicate. Expected 1 or 2. Got ${i.length-1}.`);if(i.some((e=>"string"!==e.type)))throw new Error(`Arguments to \`#${t}\` predicate must be a strings.".`);const s="is?"===t?u:d;s[e]||(s[e]={}),s[e][i[1].value]=i[2]?i[2].value:null;break;default:p[e].push({operator:t,operands:i.slice(1)})}i.length=0}}Object.freeze(l[e]),Object.freeze(u[e]),Object.freeze(d[e])}return Ot._free(r),new Qt(Lt,n,a,h,p,Object.freeze(l),Object.freeze(u),Object.freeze(d))}static load(e){let t;if(e instanceof Uint8Array)t=Promise.resolve(e);else{const n=e;if("undefined"!=typeof process&&process.versions&&process.versions.node){const e=r(747);t=Promise.resolve(e.readFileSync(n))}else t=fetch(n).then((e=>e.arrayBuffer().then((t=>{if(e.ok)return new Uint8Array(t);{const r=new TextDecoder("utf-8").decode(t);throw new Error(`Language.load failed with status ${e.status}.\n\n${r}`)}}))))}const n="function"==typeof loadSideModule?loadSideModule:Ge;return t.then((e=>n(e,{loadAsync:!0}))).then((e=>{const t=Object.keys(e),r=t.find((e=>Ft.test(e)&&!e.includes("external_scanner_")));r||console.log(`Couldn't find language function in WASM file. Symbols:\n${JSON.stringify(t,null,2)}`);const n=e[r]();return new Gt(Lt,n)}))}}class Qt{constructor(e,t,r,n,i,o,s,a){Xt(e),this[0]=t,this.captureNames=r,this.textPredicates=n,this.predicates=i,this.setProperties=o,this.assertedProperties=s,this.refutedProperties=a,this.exceededMatchLimit=!1}delete(){Ot._ts_query_delete(this[0]),this[0]=0}matches(e,t,r,n){t||(t=Mt),r||(r=Mt),n||(n={});let i=n.matchLimit;if(void 0===i)i=0;else if("number"!=typeof i)throw new Error("Arguments must be numbers");er(e),Ot._ts_query_matches_wasm(this[0],e.tree[0],t.row,t.column,r.row,r.column,i);const o=Re($t,"i32"),s=Re($t+4,"i32"),a=Re($t+8,"i32"),c=new Array(o);this.exceededMatchLimit=!!a;let l=0,u=s;for(let t=0;te(i)))){c[l++]={pattern:r,captures:i};const e=this.setProperties[r];e&&(c[t].setProperties=e);const n=this.assertedProperties[r];n&&(c[t].assertedProperties=n);const o=this.refutedProperties[r];o&&(c[t].refutedProperties=o)}}return c.length=l,Ot._free(s),c}captures(e,t,r,n){t||(t=Mt),r||(r=Mt),n||(n={});let i=n.matchLimit;if(void 0===i)i=0;else if("number"!=typeof i)throw new Error("Arguments must be numbers");er(e),Ot._ts_query_captures_wasm(this[0],e.tree[0],t.row,t.column,r.row,r.column,i);const o=Re($t,"i32"),s=Re($t+4,"i32"),a=Re($t+8,"i32"),c=[];this.exceededMatchLimit=!!a;const l=[];let u=s;for(let t=0;te(l)))){const e=l[n],r=this.setProperties[t];r&&(e.setProperties=r);const i=this.assertedProperties[t];i&&(e.assertedProperties=i);const o=this.refutedProperties[t];o&&(e.refutedProperties=o),c.push(e)}}return Ot._free(s),c}predicatesForPattern(e){return this.predicates[e]}didExceedMatchLimit(){return this.exceededMatchLimit}}function Jt(e,t,r){const n=r-t;let i=e.textCallback(t,null,r);for(t+=i.length;t0))break;t+=n.length,i+=n}return t>r&&(i=i.slice(0,n)),i}function Yt(e,t,r,n){for(let i=0,o=n.length;i{Vt.init(),t()}})))}}return o}();e.exports=i},747:e=>{"use strict";e.exports=r(57147)},622:e=>{"use strict";e.exports=r(71017)},669:e=>{"use strict";e.exports=r(73837)},13:e=>{"use strict";e.exports=r(71267)}},i={},o=function e(t){var r=i[t];if(void 0!==r)return r.exports;var o=i[t]={exports:{}};return n[t].call(o.exports,o,o.exports,e),o.exports}(563),e.exports=o},60498:(e,t,r)=>{var n=void 0!==n?n:{},i=function(){var t,i="object"==typeof window?{currentScript:window.document.currentScript}:null;class o{constructor(){this.initialize()}initialize(){throw new Error("cannot construct a Parser before calling `init()`")}static init(s){return t||(n=Object.assign({},n,s),t=new Promise((t=>{var s=Object.assign({},n),a=[],c="./this.program",l=(e,t)=>{throw t},u="object"==typeof window,d="function"==typeof importScripts,p="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,h=!u&&!p&&!d;if(n.ENVIRONMENT)throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -sENVIRONMENT=web or -sENVIRONMENT=node)");var f,g,m,y="";function v(e){if(e instanceof Se)return;let t=e;e&&"object"==typeof e&&e.stack&&(t=[e,e.stack]),E("exiting due to exception: "+t)}if(p){if("undefined"==typeof process||!process.release||"node"!==process.release.name)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");var _,b;y=d?r(71017).dirname(y)+"/":__dirname+"/",_=r(57147),b=r(71017),f=(e,t)=>(e=b.normalize(e),_.readFileSync(e,t?void 0:"utf8")),m=e=>{var t=f(e,!0);return t.buffer||(t=new Uint8Array(t)),B(t.buffer),t},g=(e,t,r)=>{e=b.normalize(e),_.readFile(e,(function(e,n){e?r(e):t(n.buffer)}))},process.argv.length>1&&(c=process.argv[1].replace(/\\/g,"/")),a=process.argv.slice(2),e.exports=n,l=(e,t)=>{if(ce())throw process.exitCode=e,t;v(t),process.exit(e)},n.inspect=function(){return"[Emscripten Module object]"}}else if(h){if("object"==typeof process||"object"==typeof window||"function"==typeof importScripts)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");"undefined"!=typeof read&&(f=function(e){return read(e)}),m=function(e){let t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(t=read(e,"binary"),B("object"==typeof t),t)},g=function(e,t,r){setTimeout((()=>t(m(e))),0)},"undefined"!=typeof scriptArgs?a=scriptArgs:void 0!==arguments&&(a=arguments),"function"==typeof quit&&(l=(e,t)=>{v(t),quit(e)}),"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)}else{if(!u&&!d)throw new Error("environment detection error");if(d?y=self.location.href:void 0!==i&&i.currentScript&&(y=i.currentScript.src),y=0!==y.indexOf("blob:")?y.substr(0,y.replace(/[?#].*/,"").lastIndexOf("/")+1):"","object"!=typeof window&&"function"!=typeof importScripts)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");f=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},d&&(m=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),g=(e,t,r)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?t(n.response):r()},n.onerror=r,n.send(null)}}var w,C=n.print||console.log.bind(console),E=n.printErr||console.warn.bind(console);function T(e,t){Object.getOwnPropertyDescriptor(n,e)||Object.defineProperty(n,e,{configurable:!0,get:function(){ge("Module."+e+" has been replaced with plain "+t+" (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}})}function S(e){return"FS_createPath"===e||"FS_createDataFile"===e||"FS_createPreloadedFile"===e||"FS_unlink"===e||"addRunDependency"===e||"FS_createLazyFile"===e||"FS_createDevice"===e||"removeRunDependency"===e}Object.assign(n,s),s=null,w="fetchSettings",Object.getOwnPropertyDescriptor(n,w)&&ge("`Module."+w+"` was supplied but `"+w+"` not included in INCOMING_MODULE_JS_API"),n.arguments&&(a=n.arguments),T("arguments","arguments_"),n.thisProgram&&(c=n.thisProgram),T("thisProgram","thisProgram"),n.quit&&(l=n.quit),T("quit","quit_"),B(void 0===n.memoryInitializerPrefixURL,"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),B(void 0===n.pthreadMainPrefixURL,"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),B(void 0===n.cdInitializerPrefixURL,"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),B(void 0===n.filePackagePrefixURL,"Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),B(void 0===n.read,"Module.read option was removed (modify read_ in JS)"),B(void 0===n.readAsync,"Module.readAsync option was removed (modify readAsync in JS)"),B(void 0===n.readBinary,"Module.readBinary option was removed (modify readBinary in JS)"),B(void 0===n.setWindowTitle,"Module.setWindowTitle option was removed (modify setWindowTitle in JS)"),B(void 0===n.TOTAL_MEMORY,"Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY"),T("read","read_"),T("readAsync","readAsync"),T("readBinary","readBinary"),T("setWindowTitle","setWindowTitle"),B(!h,"shell environment detected but not enabled at build time. Add 'shell' to `-sENVIRONMENT` to enable.");var x,k=n.dynamicLibraries||[];n.wasmBinary&&(x=n.wasmBinary),T("wasmBinary","wasmBinary");var I,A=n.noExitRuntime||!0;function P(e,t){switch(e){case 1:return"i8";case 2:return"i16";case 4:return t?"float":"i32";case 8:return t?"double":"i64";default:B(0)}}function R(e,t,r,n){if(e<=0&&ge("segmentation fault storing "+r+" bytes to address "+e),e%r!=0&&ge("alignment error storing to address "+e+", which was expected to be aligned to a multiple of "+r),ae){var i=Ct()>>>0;e+r>i&&ge("segmentation fault, exceeded the top of the available dynamic heap when storing "+r+" bytes to address "+e+". DYNAMICTOP="+i),B(i>=St()),B(i<=j.length)}return function(e,t,r){switch(r){case"i1":case"i8":j[e>>0]=t;break;case"i16":$[e>>1]=t;break;case"i32":q[e>>2]=t;break;case"i64":_e=[t>>>0,(ve=t,+Math.abs(ve)>=1?ve>0?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)],q[e>>2]=_e[0],q[e+4>>2]=_e[1];break;case"float":H[e>>2]=t;break;case"double":V[e>>3]=t;break;default:ge("invalid type for setValue: "+r)}}(e,t,P(r,n)),t}function N(e,t,r){return R(e,t,r,!0)}function O(e,t,r,n){if(e<=0&&ge("segmentation fault loading "+t+" bytes from address "+e),e%t!=0&&ge("alignment error loading from address "+e+", which was expected to be aligned to a multiple of "+t),ae){var i=Ct()>>>0;e+t>i&&ge("segmentation fault, exceeded the top of the available dynamic heap when loading "+t+" bytes from address "+e+". DYNAMICTOP="+i),B(i>=St()),B(i<=j.length)}var o,s,a=P(t,n),c=function(e,t){switch(t){case"i1":case"i8":return j[e>>0];case"i16":return $[e>>1];case"i32":case"i64":return q[e>>2];case"float":return H[e>>2];case"double":return V[e>>3];default:ge("invalid type for getValue: "+t)}}(e,a);return r&&(o=c,s=parseInt(a.substr(1),10),c=o>=0?o:s<=32?2*Math.abs(1<=n);)++i;if(i-t>16&&e.buffer&&z)return z.decode(e.subarray(t,i));for(var o="";t>10,56320|1023&l)}}else o+=String.fromCharCode((31&s)<<6|a)}else o+=String.fromCharCode(s)}return o}function W(e,t){return e?K(U,e,t):""}function G(e,t,r,n){if(!(n>0))return 0;for(var i=r,o=r+n-1,s=0;s=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++s)),a<=127){if(r>=o)break;t[r++]=a}else if(a<=2047){if(r+1>=o)break;t[r++]=192|a>>6,t[r++]=128|63&a}else if(a<=65535){if(r+2>=o)break;t[r++]=224|a>>12,t[r++]=128|a>>6&63,t[r++]=128|63&a}else{if(r+3>=o)break;a>1114111&&Xe("Invalid Unicode code point 0x"+a.toString(16)+" encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF)."),t[r++]=240|a>>18,t[r++]=128|a>>12&63,t[r++]=128|a>>6&63,t[r++]=128|63&a}}return t[r]=0,r-i}function Q(e,t,r){return B("number"==typeof r,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),G(e,U,t,r)}function J(e){for(var t=0,r=0;r=55296&&n<=57343?(t+=4,++r):t+=3}return t}function Y(e){F=e,n.HEAP8=j=new Int8Array(e),n.HEAP16=$=new Int16Array(e),n.HEAP32=q=new Int32Array(e),n.HEAPU8=U=new Uint8Array(e),n.HEAPU16=new Uint16Array(e),n.HEAPU32=new Uint32Array(e),n.HEAPF32=H=new Float32Array(e),n.HEAPF64=V=new Float64Array(e)}var X=5242880;n.STACK_SIZE&&B(X===n.STACK_SIZE,"the stack size can no longer be determined at runtime");var Z=n.INITIAL_MEMORY||33554432;T("INITIAL_MEMORY","INITIAL_MEMORY"),B(Z>=X,"INITIAL_MEMORY should be larger than STACK_SIZE, was "+Z+"! (STACK_SIZE="+X+")"),B("undefined"!=typeof Int32Array&&"undefined"!=typeof Float64Array&&null!=Int32Array.prototype.subarray&&null!=Int32Array.prototype.set,"JS engine does not provide full typed array support"),(I=n.wasmMemory?n.wasmMemory:new WebAssembly.Memory({initial:Z/65536,maximum:32768}))&&(F=I.buffer),B((Z=F.byteLength)%65536==0),Y(F);var ee=new WebAssembly.Table({initial:25,element:"anyfunc"});function te(){if(!M){var e=xt(),t=O(4*(e>>2),4,1),r=O(4*(e+4>>2),4,1);34821223==t&&2310721022==r||ge("Stack overflow! Stack cookie has been overwritten at 0x"+e.toString(16)+", expected hex dwords 0x89BACDFE and 0x2135467, but received 0x"+r.toString(16)+" 0x"+t.toString(16))}}!function(){var e=new Int16Array(1),t=new Int8Array(e.buffer);if(e[0]=25459,115!==t[0]||99!==t[1])throw"Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)"}();var re=[],ne=[],ie=[],oe=[],se=[],ae=!1;function ce(){return A}B(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),B(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),B(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),B(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var le=0,ue=null,de=null,pe={};function he(e){le++,n.monitorRunDependencies&&n.monitorRunDependencies(le),e?(B(!pe[e]),pe[e]=1,null===ue&&"undefined"!=typeof setInterval&&(ue=setInterval((function(){if(M)return clearInterval(ue),void(ue=null);var e=!1;for(var t in pe)e||(e=!0,E("still waiting on run dependencies:")),E("dependency: "+t);e&&E("(end of list)")}),1e4))):E("warning: run dependency added without ID")}function fe(e){if(le--,n.monitorRunDependencies&&n.monitorRunDependencies(le),e?(B(pe[e]),delete pe[e]):E("warning: run dependency removed without ID"),0==le&&(null!==ue&&(clearInterval(ue),ue=null),de)){var t=de;de=null,t()}}function ge(e){throw n.onAbort&&n.onAbort(e),E(e="Aborted("+e+")"),M=!0,D=1,new WebAssembly.RuntimeError(e)}var me,ye,ve,_e,be={error:function(){ge("Filesystem support (FS) was not included. The problem is that you are using files from JS, but files were not used from C/C++, so filesystem support was not auto-included. You can force-include filesystem support with -sFORCE_FILESYSTEM")},init:function(){be.error()},createDataFile:function(){be.error()},createPreloadedFile:function(){be.error()},createLazyFile:function(){be.error()},open:function(){be.error()},mkdev:function(){be.error()},registerDevice:function(){be.error()},analyzePath:function(){be.error()},loadFilesFromDB:function(){be.error()},ErrnoError:function(){be.error()}};function we(e){return e.startsWith("data:application/octet-stream;base64,")}function Ce(e){return e.startsWith("file://")}function Ee(e,t){return function(){var r=e,i=t;return t||(i=n.asm),B(ae,"native function `"+r+"` called before runtime initialization"),i[e]||B(i[e],"exported native function `"+r+"` not found"),i[e].apply(null,arguments)}}function Te(e){try{if(e==me&&x)return new Uint8Array(x);if(m)return m(e);throw"both async and sync fetching of the wasm failed"}catch(e){ge(e)}}function Se(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}n.FS_createDataFile=be.createDataFile,n.FS_createPreloadedFile=be.createPreloadedFile,we(me="tree-sitter.wasm")||(ye=me,me=n.locateFile?n.locateFile(ye,y):y+ye);var xe={},ke=new Set([]),Ie={get:function(e,t){var r=xe[t];return r||(r=xe[t]=new WebAssembly.Global({value:"i32",mutable:!0})),ke.has(t)||(r.required=!0),r}};function Ae(e){for(;e.length>0;)e.shift()(n)}function Pe(e){var t=0,r=0;function n(){for(var r=0,n=1;;){var i=e[t++];if(r+=(127&i)*n,n*=128,!(128&i))break}return r}function i(){var r=n();return K(e,(t+=r)-r,r)}function o(e,t){if(e)throw new Error(t)}var s="dylink.0";if(e instanceof WebAssembly.Module){var a=WebAssembly.Module.customSections(e,s);0===a.length&&(s="dylink",a=WebAssembly.Module.customSections(e,s)),o(0===a.length,"need dylink section"),r=(e=new Uint8Array(a[0])).length}else{o(!(1836278016==new Uint32Array(new Uint8Array(e.subarray(0,24)).buffer)[0]),"need to see wasm magic number"),o(0!==e[8],"need the dylink section to be first"),t=9;var c=n();r=t+c,s=i()}var l={neededDynlibs:[],tlsExports:new Set,weakImports:new Set};if("dylink"==s){l.memorySize=n(),l.memoryAlign=n(),l.tableSize=n(),l.tableAlign=n();for(var u=n(),d=0;d>0,1,0);case"i16":return O(2*(e>>1),2,0);case"i32":case"i64":return O(4*(e>>2),4,0);case"float":return L(4*(e>>2),4,0);case"double":return L(8*(e>>3),8,0);case"*":return O(4*(e>>2),4,1);default:ge("invalid type for getValue: "+t)}return null}function Ne(e){return 0==e.indexOf("dynCall_")||["stackAlloc","stackSave","stackRestore","getTempRet0","setTempRet0"].includes(e)?e:"_"+e}function Oe(e,t){for(var r in e)if(e.hasOwnProperty(r)){_t.hasOwnProperty(r)||(_t[r]=e[r]);var i=Ne(r);n.hasOwnProperty(i)||(n[i]=e[r]),"__main_argc_argv"==r&&(n._main=e[r])}}var Le={loadedLibsByName:{},loadedLibsByHandle:{}},De=[];function Me(e){var t=De[e];return t||(e>=De.length&&(De.length=e+1),De[e]=t=ee.get(e)),B(ee.get(e)==t,"JavaScript-side Wasm function table mirror is out of date!"),t}function Be(e,t,r){return e.includes("j")?function(e,t,r){B("dynCall_"+e in n,"bad function pointer type - dynCall function not found for sig '"+e+"'"),r&&r.length?B(r.length===e.substring(1).replace(/j/g,"--").length):B(1==e.length);var i=n["dynCall_"+e];return r&&r.length?i.apply(null,[t].concat(r)):i.call(null,t)}(e,t,r):(B(Me(t),"missing table entry in dynCall: "+t),Me(t).apply(null,r))}var Fe=5255488;function je(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"].includes(e)}function Ue(e,t){B(e<16384),e<128?t.push(e):t.push(e%128|128,e>>7)}function $e(e,t){if(qe)for(var r=e;r>0,1,0))c=O(4*(r+28>>2),4,1),l=O(4*(r+36>>2),4,1);else{var a=Math.pow(2,n.memoryAlign);a=Math.max(a,16);var c=n.memorySize?(o=function(e){if(ae)return function(e,t){return U.fill(0,e,e+t),e}(bt(e),e);var t=Fe,r=t+e+15&-16;return B(r<=j.length,"failure to getMemory - memory growth etc. is not supported there, call malloc/sbrk directly or increase INITIAL_MEMORY"),Fe=r,xe.__heap_base.value=r,t}(n.memorySize+a),B(s=a,"alignment argument is required"),Math.ceil(o/s)*s):0,l=n.tableSize?ee.length:0;r&&(R(r+24>>0,1,1),R(4*(r+28>>2),c,4),R(4*(r+32>>2),n.memorySize,4),R(4*(r+36>>2),l,4),R(4*(r+40>>2),n.tableSize,4))}var u,d=l+n.tableSize-ee.length;function p(e){var t=We(e,!1);return t||(t=u[e]),B(t,"undefined symbol `"+e+"`. perhaps a side module was not linked in? if this global was expected to arrive from a system library, try to build the MAIN_MODULE with EMCC_FORCE_STDLIBS=1 in the environment"),t}d>0&&ee.grow(d);var h={get:function(e,t){switch(t){case"__memory_base":return c;case"__table_base":return l}return t in _t?_t[t]:(t in e||(e[t]=function(){return r||(r=p(t)),r.apply(null,arguments)}),e[t]);var r}},f=new Proxy({},h),g={"GOT.mem":new Proxy({},Ie),"GOT.func":new Proxy({},Ie),env:f,wasi_snapshot_preview1:f};function m(e){B(ee===i),$e(l,n.tableSize),u=Ke(e.exports,c),t.allowUndefined||Je();var r=u.__wasm_apply_data_relocs;r&&(ae?r():se.push(r));var o=u.__wasm_call_ctors;return o&&(ae?o():ne.push(o)),u}if(t.loadAsync){if(e instanceof WebAssembly.Module){var y=new WebAssembly.Instance(e,g);return Promise.resolve(m(y))}return WebAssembly.instantiate(e,g).then((function(e){return m(e.instance)}))}var v=e instanceof WebAssembly.Module?e:new WebAssembly.Module(e);return m(y=new WebAssembly.Instance(v,g))}return t.loadAsync?n.neededDynlibs.reduce((function(e,r){return e.then((function(){return Qe(r,t)}))}),Promise.resolve()).then((function(){return o()})):(n.neededDynlibs.forEach((function(e){Qe(e,t)})),o())}function Qe(e,t,r){t=t||{global:!0,nodelete:!0};var n=Le.loadedLibsByName[e];if(n)return t.global&&!n.global&&(n.global=!0,"loading"!==n.module&&Oe(n.module)),t.nodelete&&n.refcount!==1/0&&(n.refcount=1/0),n.refcount++,r&&(Le.loadedLibsByHandle[r]=n),!t.loadAsync||Promise.resolve(!0);function i(e){if(t.fs&&t.fs.findObject(e)){var r=t.fs.readFile(e,{encoding:"binary"});return r instanceof Uint8Array||(r=new Uint8Array(r)),t.loadAsync?Promise.resolve(r):r}if(t.loadAsync)return new Promise((function(t,r){g(e,(e=>t(new Uint8Array(e))),r)}));if(!m)throw new Error(e+": file not found, and synchronous loading of external files is not available");return m(e)}function o(){if("undefined"!=typeof preloadedWasm&&preloadedWasm[e]){var n=preloadedWasm[e];return t.loadAsync?Promise.resolve(n):n}return t.loadAsync?i(e).then((function(e){return Ge(e,t,r)})):Ge(i(e),t,r)}function s(e){n.global&&Oe(e),n.module=e}return n={refcount:t.nodelete?1/0:1,name:e,module:"loading",global:t.global},Le.loadedLibsByName[e]=n,r&&(Le.loadedLibsByHandle[r]=n),t.loadAsync?o().then((function(e){return s(e),!0})):(s(o()),!0)}function Je(){for(var e in xe)if(0==xe[e].value){var t=We(e,!0);if(!t&&!xe[e].required)continue;if(B(t,"undefined symbol `"+e+"`. perhaps a side module was not linked in? if this global was expected to arrive from a system library, try to build the MAIN_MODULE with EMCC_FORCE_STDLIBS=1 in the environment"),"function"==typeof t)xe[e].value=ze(t,t.sig);else{if("number"!=typeof t)throw new Error("bad export type for `"+e+"`: "+typeof t);xe[e].value=t}}}function Ye(e,t,r="i8"){switch(r.endsWith("*")&&(r="*"),r){case"i1":case"i8":R(e>>0,t,1);break;case"i16":R(2*(e>>1),t,2);break;case"i32":case"*":R(4*(e>>2),t,4);break;case"i64":R(4*(e>>2),(_e=[t>>>0,(ve=t,+Math.abs(ve)>=1?ve>0?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)])[0],4),R(4*(e+4>>2),_e[1],4);break;case"float":N(4*(e>>2),t,4);break;case"double":N(8*(e>>3),t,8);break;default:ge("invalid type for setValue: "+r)}}function Xe(e){Xe.shown||(Xe.shown={}),Xe.shown[e]||(Xe.shown[e]=1,p&&(e="warning: "+e),E(e))}var Ze,et=new WebAssembly.Global({value:"i32",mutable:!1},1024),tt=new WebAssembly.Global({value:"i32",mutable:!0},5255488),rt=new WebAssembly.Global({value:"i32",mutable:!1},1);function nt(){return!0}function it(){ge("native code called abort()")}function ot(){return Date.now()}function st(e,t,r){U.copyWithin(e,t,t+r)}function at(e){try{return I.grow(e-F.byteLength+65535>>>16),Y(I.buffer),1}catch(t){E("emscripten_realloc_buffer: Attempted to grow heap from "+F.byteLength+" bytes to "+e+" bytes, but got error: "+t)}}function ct(e){var t=U.length;B((e>>>=0)>t);var r,n=2147483648;if(e>n)return E("Cannot enlarge memory, asked to go up to "+e+" bytes, but the limit is "+n+" bytes!"),!1;for(var i=1;i<=4;i*=2){var o=t*(1+.2/i);o=Math.min(o,e+100663296);var s=Math.min(n,(r=Math.max(e,o))+(65536-r%65536)%65536);if(at(s))return!0}return E("Failed to grow the heap from "+t+" bytes to "+s+" bytes, not enough memory!"),!1}nt.sig="i",n._abort=it,it.sig="v",ot.sig="d",(Ze=p?()=>{var e=process.hrtime();return 1e3*e[0]+e[1]/1e6}:()=>performance.now()).sig="d",st.sig="vppp",ct.sig="ip";var lt={DEFAULT_POLLMASK:5,calculateAt:function(e,t,r){if(PATH.isAbs(t))return t;var n;if(n=-100===e?be.cwd():lt.getStreamFromFD(e).path,0==t.length){if(!r)throw new be.ErrnoError(44);return n}return PATH.join2(n,t)},doStat:function(e,t,r){try{var n=e(t)}catch(e){if(e&&e.node&&PATH.normalize(t)!==PATH.normalize(be.getPath(e.node)))return-54;throw e}return R(4*(r>>2),n.dev,4),R(4*(r+8>>2),n.ino,4),R(4*(r+12>>2),n.mode,4),R(4*(r+16>>2),n.nlink,4),R(4*(r+20>>2),n.uid,4),R(4*(r+24>>2),n.gid,4),R(4*(r+28>>2),n.rdev,4),R(4*(r+40>>2),(_e=[n.size>>>0,(ve=n.size,+Math.abs(ve)>=1?ve>0?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)])[0],4),R(4*(r+44>>2),_e[1],4),R(4*(r+48>>2),4096,4),R(4*(r+52>>2),n.blocks,4),R(4*(r+56>>2),(_e=[Math.floor(n.atime.getTime()/1e3)>>>0,(ve=Math.floor(n.atime.getTime()/1e3),+Math.abs(ve)>=1?ve>0?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)])[0],4),R(4*(r+60>>2),_e[1],4),R(4*(r+64>>2),0,4),R(4*(r+72>>2),(_e=[Math.floor(n.mtime.getTime()/1e3)>>>0,(ve=Math.floor(n.mtime.getTime()/1e3),+Math.abs(ve)>=1?ve>0?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)])[0],4),R(4*(r+76>>2),_e[1],4),R(4*(r+80>>2),0,4),R(4*(r+88>>2),(_e=[Math.floor(n.ctime.getTime()/1e3)>>>0,(ve=Math.floor(n.ctime.getTime()/1e3),+Math.abs(ve)>=1?ve>0?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)])[0],4),R(4*(r+92>>2),_e[1],4),R(4*(r+96>>2),0,4),R(4*(r+104>>2),(_e=[n.ino>>>0,(ve=n.ino,+Math.abs(ve)>=1?ve>0?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)])[0],4),R(4*(r+108>>2),_e[1],4),0},doMsync:function(e,t,r,n,i){if(!be.isFile(t.node.mode))throw new be.ErrnoError(43);if(2&n)return 0;var o=U.slice(e,e+r);be.msync(t,o,i,r,n)},varargs:void 0,get:function(){return B(null!=lt.varargs),lt.varargs+=4,O(4*(lt.varargs-4>>2),4,0)},getStr:function(e){return W(e)},getStreamFromFD:function(e){var t=be.getStream(e);if(!t)throw new be.ErrnoError(8);return t}};function ut(e){D=e,ce()||(n.onExit&&n.onExit(e),M=!0),l(e,new Se(e))}function dt(e,t){D=e,function(){var e=C,t=E,r=!1;C=E=e=>{r=!0};try{wt(0)}catch(e){}C=e,E=t,r&&(Xe("stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the FAQ), or make sure to emit a newline when you printf etc."),Xe("(this may also be due to not including full filesystem support - try building with -sFORCE_FILESYSTEM)"))}(),ce()&&!t&&E("program exited (with status: "+e+"), but EXIT_RUNTIME is not set, so halting execution but not exiting the runtime or preventing further async execution (build with EXIT_RUNTIME=1, if you want a true shutdown)"),ut(e)}ut.sig="vi";var pt=dt;function ht(e){try{var t=lt.getStreamFromFD(e);return be.close(t),0}catch(e){if(void 0===be||!(e instanceof be.ErrnoError))throw e;return e.errno}}function ft(e,t,r,n,i){try{var o=(c=r,B((a=t)==a>>>0||a==(0|a)),B(c===(0|c)),c+2097152>>>0<4194305-!!a?(a>>>0)+4294967296*c:NaN);if(isNaN(o))return 61;var s=lt.getStreamFromFD(e);return be.llseek(s,o,n),R(4*(i>>2),(_e=[s.position>>>0,(ve=s.position,+Math.abs(ve)>=1?ve>0?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)])[0],4),R(4*(i+4>>2),_e[1],4),s.getdents&&0===o&&0===n&&(s.getdents=null),0}catch(e){if(void 0===be||!(e instanceof be.ErrnoError))throw e;return e.errno}var a,c}function gt(e,t,r,n){try{var i=function(e,t,r,n){for(var i=0,o=0;o>2),4,1),a=O(4*(t+4>>2),4,1);t+=8;var c=be.write(e,j,s,a,undefined);if(c<0)return-1;i+=c}return i}(lt.getStreamFromFD(e),t,r);return R(4*(n>>2),i,4),0}catch(e){if(void 0===be||!(e instanceof be.ErrnoError))throw e;return e.errno}}function mt(e,t,r){if(B(t%2==0,"Pointer passed to stringToUTF16 must be aligned to two bytes!"),B("number"==typeof r,"stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),void 0===r&&(r=2147483647),r<2)return 0;for(var n=t,i=(r-=2)<2*e.length?r/2:e.length,o=0;o>1),e.charCodeAt(o),2),t+=2;return R(2*(t>>1),0,2),t-n}function yt(e){for(var t="";;){var r=O(e++>>0,1,1);if(!r)return t;t+=String.fromCharCode(r)}}pt.sig="vi",ht.sig="ii",ft.sig="iijip",gt.sig="iippp";var vt,_t={__heap_base:Fe,__indirect_function_table:ee,__memory_base:et,__stack_high:5255488,__stack_low:12608,__stack_pointer:tt,__table_base:rt,_emscripten_get_now_is_monotonic:nt,abort:it,alignfault:function(){ge("alignment fault")},emscripten_date_now:ot,emscripten_get_now:Ze,emscripten_memcpy_big:st,emscripten_resize_heap:ct,exit:pt,fd_close:ht,fd_seek:ft,fd_write:gt,memory:I,segfault:function(){ge("segmentation fault")},tree_sitter_log_callback:function(e,t){if(Ht){const r=W(t);Ht(r,0!==e)}},tree_sitter_parse_callback:function(e,t,r,n,i){var o=qt(t,{row:r,column:n});"string"==typeof o?(Ye(i,o.length,"i32"),mt(o,e,10240)):Ye(i,0,"i32")}},bt=(function(){var e={env:_t,wasi_snapshot_preview1:_t,"GOT.mem":new Proxy(_t,Ie),"GOT.func":new Proxy(_t,Ie)};function t(e,t){var r=e.exports;r=Ke(r,1024);var i,o=Pe(t);o.neededDynlibs&&(k=o.neededDynlibs.concat(k)),Oe(r),n.asm=r,i=n.asm.__wasm_call_ctors,ne.unshift(i),se.push(n.asm.__wasm_apply_data_relocs),fe("wasm-instantiate")}he("wasm-instantiate");var r=n;function i(e){B(n===r,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),r=null,t(e.instance,e.module)}function o(t){return function(){if(!x&&(u||d)){if("function"==typeof fetch&&!Ce(me))return fetch(me,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+me+"'";return e.arrayBuffer()})).catch((function(){return Te(me)}));if(g)return new Promise((function(e,t){g(me,(function(t){e(new Uint8Array(t))}),t)}))}return Promise.resolve().then((function(){return Te(me)}))}().then((function(t){return WebAssembly.instantiate(t,e)})).then((function(e){return e})).then(t,(function(e){E("failed to asynchronously prepare wasm: "+e),Ce(me)&&E("warning: Loading from a file URI ("+me+") is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing"),ge(e)}))}if(n.instantiateWasm)try{return n.instantiateWasm(e,t)}catch(e){return E("Module.instantiateWasm callback failed with error: "+e),!1}x||"function"!=typeof WebAssembly.instantiateStreaming||we(me)||Ce(me)||p||"function"!=typeof fetch?o(i):fetch(me,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(i,(function(e){return E("wasm streaming compile failed: "+e),E("falling back to ArrayBuffer instantiation"),o(i)}))}))}(),n.___wasm_call_ctors=Ee("__wasm_call_ctors"),n.___wasm_apply_data_relocs=Ee("__wasm_apply_data_relocs"),n._malloc=Ee("malloc")),wt=(n._calloc=Ee("calloc"),n._realloc=Ee("realloc"),n._free=Ee("free"),n._ts_language_symbol_count=Ee("ts_language_symbol_count"),n._ts_language_version=Ee("ts_language_version"),n._ts_language_field_count=Ee("ts_language_field_count"),n._ts_language_symbol_name=Ee("ts_language_symbol_name"),n._ts_language_symbol_for_name=Ee("ts_language_symbol_for_name"),n._ts_language_symbol_type=Ee("ts_language_symbol_type"),n._ts_language_field_name_for_id=Ee("ts_language_field_name_for_id"),n._memset=Ee("memset"),n._memcpy=Ee("memcpy"),n._ts_parser_delete=Ee("ts_parser_delete"),n._ts_parser_set_language=Ee("ts_parser_set_language"),n._ts_parser_reset=Ee("ts_parser_reset"),n._ts_parser_timeout_micros=Ee("ts_parser_timeout_micros"),n._ts_parser_set_timeout_micros=Ee("ts_parser_set_timeout_micros"),n._ts_query_new=Ee("ts_query_new"),n._ts_query_delete=Ee("ts_query_delete"),n._iswspace=Ee("iswspace"),n._ts_query_pattern_count=Ee("ts_query_pattern_count"),n._ts_query_capture_count=Ee("ts_query_capture_count"),n._ts_query_string_count=Ee("ts_query_string_count"),n._ts_query_capture_name_for_id=Ee("ts_query_capture_name_for_id"),n._ts_query_string_value_for_id=Ee("ts_query_string_value_for_id"),n._ts_query_predicates_for_pattern=Ee("ts_query_predicates_for_pattern"),n._memmove=Ee("memmove"),n._memcmp=Ee("memcmp"),n._ts_tree_copy=Ee("ts_tree_copy"),n._ts_tree_delete=Ee("ts_tree_delete"),n._iswalnum=Ee("iswalnum"),n._ts_init=Ee("ts_init"),n._ts_parser_new_wasm=Ee("ts_parser_new_wasm"),n._ts_parser_enable_logger_wasm=Ee("ts_parser_enable_logger_wasm"),n._ts_parser_parse_wasm=Ee("ts_parser_parse_wasm"),n._ts_language_type_is_named_wasm=Ee("ts_language_type_is_named_wasm"),n._ts_language_type_is_visible_wasm=Ee("ts_language_type_is_visible_wasm"),n._ts_tree_root_node_wasm=Ee("ts_tree_root_node_wasm"),n._ts_tree_edit_wasm=Ee("ts_tree_edit_wasm"),n._ts_tree_get_changed_ranges_wasm=Ee("ts_tree_get_changed_ranges_wasm"),n._ts_tree_cursor_new_wasm=Ee("ts_tree_cursor_new_wasm"),n._ts_tree_cursor_delete_wasm=Ee("ts_tree_cursor_delete_wasm"),n._ts_tree_cursor_reset_wasm=Ee("ts_tree_cursor_reset_wasm"),n._ts_tree_cursor_goto_first_child_wasm=Ee("ts_tree_cursor_goto_first_child_wasm"),n._ts_tree_cursor_goto_next_sibling_wasm=Ee("ts_tree_cursor_goto_next_sibling_wasm"),n._ts_tree_cursor_goto_parent_wasm=Ee("ts_tree_cursor_goto_parent_wasm"),n._ts_tree_cursor_current_node_type_id_wasm=Ee("ts_tree_cursor_current_node_type_id_wasm"),n._ts_tree_cursor_current_node_is_named_wasm=Ee("ts_tree_cursor_current_node_is_named_wasm"),n._ts_tree_cursor_current_node_is_missing_wasm=Ee("ts_tree_cursor_current_node_is_missing_wasm"),n._ts_tree_cursor_current_node_id_wasm=Ee("ts_tree_cursor_current_node_id_wasm"),n._ts_tree_cursor_start_position_wasm=Ee("ts_tree_cursor_start_position_wasm"),n._ts_tree_cursor_end_position_wasm=Ee("ts_tree_cursor_end_position_wasm"),n._ts_tree_cursor_start_index_wasm=Ee("ts_tree_cursor_start_index_wasm"),n._ts_tree_cursor_end_index_wasm=Ee("ts_tree_cursor_end_index_wasm"),n._ts_tree_cursor_current_field_id_wasm=Ee("ts_tree_cursor_current_field_id_wasm"),n._ts_tree_cursor_current_node_wasm=Ee("ts_tree_cursor_current_node_wasm"),n._ts_node_symbol_wasm=Ee("ts_node_symbol_wasm"),n._ts_node_child_count_wasm=Ee("ts_node_child_count_wasm"),n._ts_node_named_child_count_wasm=Ee("ts_node_named_child_count_wasm"),n._ts_node_child_wasm=Ee("ts_node_child_wasm"),n._ts_node_named_child_wasm=Ee("ts_node_named_child_wasm"),n._ts_node_child_by_field_id_wasm=Ee("ts_node_child_by_field_id_wasm"),n._ts_node_next_sibling_wasm=Ee("ts_node_next_sibling_wasm"),n._ts_node_prev_sibling_wasm=Ee("ts_node_prev_sibling_wasm"),n._ts_node_next_named_sibling_wasm=Ee("ts_node_next_named_sibling_wasm"),n._ts_node_prev_named_sibling_wasm=Ee("ts_node_prev_named_sibling_wasm"),n._ts_node_parent_wasm=Ee("ts_node_parent_wasm"),n._ts_node_descendant_for_index_wasm=Ee("ts_node_descendant_for_index_wasm"),n._ts_node_named_descendant_for_index_wasm=Ee("ts_node_named_descendant_for_index_wasm"),n._ts_node_descendant_for_position_wasm=Ee("ts_node_descendant_for_position_wasm"),n._ts_node_named_descendant_for_position_wasm=Ee("ts_node_named_descendant_for_position_wasm"),n._ts_node_start_point_wasm=Ee("ts_node_start_point_wasm"),n._ts_node_end_point_wasm=Ee("ts_node_end_point_wasm"),n._ts_node_start_index_wasm=Ee("ts_node_start_index_wasm"),n._ts_node_end_index_wasm=Ee("ts_node_end_index_wasm"),n._ts_node_to_string_wasm=Ee("ts_node_to_string_wasm"),n._ts_node_children_wasm=Ee("ts_node_children_wasm"),n._ts_node_named_children_wasm=Ee("ts_node_named_children_wasm"),n._ts_node_descendants_of_type_wasm=Ee("ts_node_descendants_of_type_wasm"),n._ts_node_is_named_wasm=Ee("ts_node_is_named_wasm"),n._ts_node_has_changes_wasm=Ee("ts_node_has_changes_wasm"),n._ts_node_has_error_wasm=Ee("ts_node_has_error_wasm"),n._ts_node_is_missing_wasm=Ee("ts_node_is_missing_wasm"),n._ts_query_matches_wasm=Ee("ts_query_matches_wasm"),n._ts_query_captures_wasm=Ee("ts_query_captures_wasm"),n.___cxa_atexit=Ee("__cxa_atexit"),n.___errno_location=Ee("__errno_location"),n._fflush=Ee("fflush")),Ct=(n._strlen=Ee("strlen"),n._iswdigit=Ee("iswdigit"),n._iswalpha=Ee("iswalpha"),n._iswlower=Ee("iswlower"),n._memchr=Ee("memchr"),n._towupper=Ee("towupper"),n._sbrk=Ee("sbrk")),Et=(n._emscripten_get_sbrk_ptr=Ee("emscripten_get_sbrk_ptr"),n._setThrew=Ee("setThrew")),Tt=n._emscripten_stack_set_limits=function(){return(Tt=n._emscripten_stack_set_limits=n.asm.emscripten_stack_set_limits).apply(null,arguments)},St=(n._emscripten_stack_get_free=function(){return(n._emscripten_stack_get_free=n.asm.emscripten_stack_get_free).apply(null,arguments)},n._emscripten_stack_get_base=function(){return(St=n._emscripten_stack_get_base=n.asm.emscripten_stack_get_base).apply(null,arguments)}),xt=n._emscripten_stack_get_end=function(){return(xt=n._emscripten_stack_get_end=n.asm.emscripten_stack_get_end).apply(null,arguments)},kt=n.stackSave=Ee("stackSave"),It=n.stackRestore=Ee("stackRestore"),At=n.stackAlloc=Ee("stackAlloc");n.__Znwm=Ee("_Znwm"),n.__ZdlPv=Ee("_ZdlPv"),n.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev=Ee("_ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev"),n.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm=Ee("_ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm"),n.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm=Ee("_ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm"),n.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm=Ee("_ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm"),n.__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm=Ee("_ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm"),n.__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc=Ee("_ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc"),n.__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev=Ee("_ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED2Ev"),n.__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw=Ee("_ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw"),n.dynCall_jiji=Ee("dynCall_jiji"),n._orig$ts_parser_timeout_micros=Ee("orig$ts_parser_timeout_micros"),n._orig$ts_parser_set_timeout_micros=Ee("orig$ts_parser_set_timeout_micros"),n.AsciiToString=yt,n.stringToUTF16=mt,["run","UTF8ArrayToString","UTF8ToString","stringToUTF8Array","stringToUTF8","lengthBytesUTF8","addOnPreRun","addOnInit","addOnPreMain","addOnExit","addOnPostRun","addRunDependency","removeRunDependency","FS_createFolder","FS_createPath","FS_createDataFile","FS_createPreloadedFile","FS_createLazyFile","FS_createLink","FS_createDevice","FS_unlink","getLEB","getFunctionTables","alignFunctionTables","registerFunctions","prettyPrint","getCompilerSetting","out","err","callMain","abort","keepRuntimeAlive","wasmMemory","stackAlloc","stackSave","stackRestore","getTempRet0","setTempRet0","writeStackCookie","checkStackCookie","ptrToString","zeroMemory","stringToNewUTF8","exitJS","getHeapMax","emscripten_realloc_buffer","ENV","ERRNO_CODES","ERRNO_MESSAGES","setErrNo","inetPton4","inetNtop4","inetPton6","inetNtop6","readSockaddr","writeSockaddr","DNS","getHostByName","Protocols","Sockets","getRandomDevice","warnOnce","traverseStack","UNWIND_CACHE","convertPCtoSourceLocation","readAsmConstArgsArray","readAsmConstArgs","mainThreadEM_ASM","jstoi_q","jstoi_s","getExecutableName","listenOnce","autoResumeAudioContext","dynCallLegacy","getDynCaller","dynCall","handleException","runtimeKeepalivePush","runtimeKeepalivePop","callUserCallback","maybeExit","safeSetTimeout","asmjsMangle","asyncLoad","alignMemory","mmapAlloc","writeI53ToI64","writeI53ToI64Clamped","writeI53ToI64Signaling","writeI53ToU64Clamped","writeI53ToU64Signaling","readI53FromI64","readI53FromU64","convertI32PairToI53","convertI32PairToI53Checked","convertU32PairToI53","getCFunc","ccall","cwrap","uleb128Encode","sigToWasmTypes","generateFuncType","convertJsFunctionToWasm","freeTableIndexes","functionsInTableMap","getEmptyTableSlot","updateTableMap","addFunction","removeFunction","reallyNegative","unSign","strLen","reSign","formatString","setValue","getValue","PATH","PATH_FS","intArrayFromString","intArrayToString","stringToAscii","UTF16Decoder","UTF16ToString","lengthBytesUTF16","UTF32ToString","stringToUTF32","lengthBytesUTF32","allocateUTF8","allocateUTF8OnStack","writeStringToMemory","writeArrayToMemory","writeAsciiToMemory","SYSCALLS","getSocketFromFD","getSocketAddress","JSEvents","registerKeyEventCallback","specialHTMLTargets","maybeCStringToJsString","findEventTarget","findCanvasEventTarget","getBoundingClientRect","fillMouseEventData","registerMouseEventCallback","registerWheelEventCallback","registerUiEventCallback","registerFocusEventCallback","fillDeviceOrientationEventData","registerDeviceOrientationEventCallback","fillDeviceMotionEventData","registerDeviceMotionEventCallback","screenOrientation","fillOrientationChangeEventData","registerOrientationChangeEventCallback","fillFullscreenChangeEventData","registerFullscreenChangeEventCallback","JSEvents_requestFullscreen","JSEvents_resizeCanvasForFullscreen","registerRestoreOldStyle","hideEverythingExceptGivenElement","restoreHiddenElements","setLetterbox","currentFullscreenStrategy","restoreOldWindowedStyle","softFullscreenResizeWebGLRenderTarget","doRequestFullscreen","fillPointerlockChangeEventData","registerPointerlockChangeEventCallback","registerPointerlockErrorEventCallback","requestPointerLock","fillVisibilityChangeEventData","registerVisibilityChangeEventCallback","registerTouchEventCallback","fillGamepadEventData","registerGamepadEventCallback","registerBeforeUnloadEventCallback","fillBatteryEventData","battery","registerBatteryEventCallback","setCanvasElementSize","getCanvasElementSize","demangle","demangleAll","jsStackTrace","stackTrace","ExitStatus","getEnvStrings","checkWasiClock","doReadv","doWritev","GOT","CurrentModuleWeakSymbols","LDSO","getMemory","mergeLibSymbols","loadWebAssemblyModule","loadDynamicLibrary","dlopenInternal","createDyncallWrapper","setImmediateWrapped","clearImmediateWrapped","polyfillSetImmediate","Browser","setMainLoop","wget","tempFixedLengthArray","miniTempWebGLFloatBuffers","heapObjectForWebGLType","heapAccessShiftForWebGLHeap","GL","emscriptenWebGLGet","computeUnpackAlignedImageSize","emscriptenWebGLGetTexPixelData","emscriptenWebGLGetUniform","webglGetUniformLocation","webglPrepareUniformLocationsBeforeFirstUse","webglGetLeftBracePos","emscriptenWebGLGetVertexAttrib","writeGLArray","AL","SDL_unicode","SDL_ttfContext","SDL_audio","SDL","SDL_gfx","GLUT","EGL","GLFW_Window","GLFW","GLEW","IDBStore","runAndAbortIfError","ALLOC_NORMAL","ALLOC_STACK","allocate"].forEach((function(e){Object.getOwnPropertyDescriptor(n,e)||Object.defineProperty(n,e,{configurable:!0,get:function(){var t="'"+e+"' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)";S(e)&&(t+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),ge(t)}})})),["ptrToString","stringToNewUTF8","setErrNo","inetPton4","inetNtop4","inetPton6","inetNtop6","readSockaddr","writeSockaddr","getHostByName","getRandomDevice","traverseStack","convertPCtoSourceLocation","readAsmConstArgs","mainThreadEM_ASM","jstoi_q","jstoi_s","getExecutableName","listenOnce","autoResumeAudioContext","getDynCaller","runtimeKeepalivePush","runtimeKeepalivePop","callUserCallback","maybeExit","safeSetTimeout","asyncLoad","mmapAlloc","writeI53ToI64","writeI53ToI64Clamped","writeI53ToI64Signaling","writeI53ToU64Clamped","writeI53ToU64Signaling","readI53FromI64","readI53FromU64","convertI32PairToI53","convertU32PairToI53","getCFunc","ccall","cwrap","removeFunction","reallyNegative","strLen","reSign","formatString","intArrayFromString","intArrayToString","stringToAscii","UTF16ToString","lengthBytesUTF16","UTF32ToString","stringToUTF32","lengthBytesUTF32","allocateUTF8","writeStringToMemory","writeArrayToMemory","writeAsciiToMemory","getSocketFromFD","getSocketAddress","registerKeyEventCallback","maybeCStringToJsString","findEventTarget","findCanvasEventTarget","getBoundingClientRect","fillMouseEventData","registerMouseEventCallback","registerWheelEventCallback","registerUiEventCallback","registerFocusEventCallback","fillDeviceOrientationEventData","registerDeviceOrientationEventCallback","fillDeviceMotionEventData","registerDeviceMotionEventCallback","screenOrientation","fillOrientationChangeEventData","registerOrientationChangeEventCallback","fillFullscreenChangeEventData","registerFullscreenChangeEventCallback","JSEvents_requestFullscreen","JSEvents_resizeCanvasForFullscreen","registerRestoreOldStyle","hideEverythingExceptGivenElement","restoreHiddenElements","setLetterbox","softFullscreenResizeWebGLRenderTarget","doRequestFullscreen","fillPointerlockChangeEventData","registerPointerlockChangeEventCallback","registerPointerlockErrorEventCallback","requestPointerLock","fillVisibilityChangeEventData","registerVisibilityChangeEventCallback","registerTouchEventCallback","fillGamepadEventData","registerGamepadEventCallback","registerBeforeUnloadEventCallback","fillBatteryEventData","battery","registerBatteryEventCallback","setCanvasElementSize","getCanvasElementSize","demangle","demangleAll","jsStackTrace","stackTrace","getEnvStrings","checkWasiClock","doReadv","dlopenInternal","createDyncallWrapper","setImmediateWrapped","clearImmediateWrapped","polyfillSetImmediate","setMainLoop","heapObjectForWebGLType","heapAccessShiftForWebGLHeap","emscriptenWebGLGet","computeUnpackAlignedImageSize","emscriptenWebGLGetTexPixelData","emscriptenWebGLGetUniform","webglGetUniformLocation","webglPrepareUniformLocationsBeforeFirstUse","webglGetLeftBracePos","emscriptenWebGLGetVertexAttrib","writeGLArray","SDL_unicode","SDL_ttfContext","SDL_audio","GLFW_Window","runAndAbortIfError","ALLOC_NORMAL","ALLOC_STACK","allocate"].forEach((function(e){"undefined"==typeof globalThis||Object.getOwnPropertyDescriptor(globalThis,e)||Object.defineProperty(globalThis,e,{configurable:!0,get:function(){var t="`"+e+"` is a library symbol and not included by default; add it to your library.js __deps or to DEFAULT_LIBRARY_FUNCS_TO_INCLUDE on the command line",r=e;r.startsWith("_")||(r="$"+e),t+=" (e.g. -sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE="+r+")",S(e)&&(t+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),Xe(t)}})})),de=function e(){vt||Rt(),vt||(de=e)};var Pt=!1;function Rt(e){function t(){vt||(vt=!0,n.calledRun=!0,M||(B(!ae),ae=!0,te(),Ae(se),Ae(ne),te(),Ae(ie),n.onRuntimeInitialized&&n.onRuntimeInitialized(),Nt&&function(e){B(0==le,'cannot call main when async dependencies remain! (listen on Module["onRuntimeInitialized"])'),B(0==re.length,"cannot call main when preRun functions remain to be called");var t=n._main;if(t){(e=e||[]).unshift(c);var r=e.length,i=At(4*(r+1)),o=i>>2;e.forEach((e=>{R(4*o++,function(e){var t=J(e)+1,r=At(t);return G(e,j,r,t),r}(e),4)})),R(4*o,0,4);try{var s=t(r,i);dt(s,!0)}catch(e){return function(e){if(e instanceof Se||"unwind"==e)return D;l(1,e)}(e)}}}(e),function(){if(te(),n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)e=n.postRun.shift(),oe.unshift(e);var e;Ae(oe)}()))}var r;e=e||a,le>0||(Tt(5255488,12608),B(0==(3&(r=xt()))),R(4*(r>>2),34821223,4),R(4*(r+4>>2),2310721022,4),!Pt&&(k.length?(he("preloadDylibs"),k.reduce((function(e,t){return e.then((function(){return Qe(t,{loadAsync:!0,global:!0,nodelete:!0,allowUndefined:!0})}))}),Promise.resolve()).then((function(){Je(),fe("preloadDylibs")}))):Je(),Pt=!0,le>0)||(function(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)e=n.preRun.shift(),re.unshift(e);var e;Ae(re)}(),le>0||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),t()}),1)):t(),te())))}if(n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();var Nt=!0;n.noInitialRun&&(Nt=!1),Rt();const Ot=n,Lt={},Dt=20,Mt={row:0,column:0},Bt=/[\w-.]*/g,Ft=/^_?tree_sitter_\w+/;var jt,Ut,$t,qt,Ht;class Vt{static init(){$t=Ot._ts_init(),jt=Re($t,"i32"),Ut=Re($t+4,"i32")}initialize(){Ot._ts_parser_new_wasm(),this[0]=Re($t,"i32"),this[1]=Re($t+4,"i32")}delete(){Ot._ts_parser_delete(this[0]),Ot._free(this[1]),this[0]=0,this[1]=0}setLanguage(e){let t;if(e){if(e.constructor!==Gt)throw new Error("Argument must be a Language");{t=e[0];const r=Ot._ts_language_version(t);if(re.slice(t,n);else{if("function"!=typeof e)throw new Error("Argument must be a string or a function");qt=e}this.logCallback?(Ht=this.logCallback,Ot._ts_parser_enable_logger_wasm(this[0],1)):(Ht=null,Ot._ts_parser_enable_logger_wasm(this[0],0));let n=0,i=0;if(r&&r.includedRanges){n=r.includedRanges.length,i=Ot._calloc(n,24);let e=i;for(let t=0;t0){let e=r;for(let r=0;r0){let r=t;for(let t=0;t0){let r=t;for(let t=0;t0){let e=a;for(let t=0;t0){if("string"!==i[0].type)throw new Error("Predicates must begin with a literal value");const t=i[0].value;let r=!0;switch(t){case"not-eq?":r=!1;case"eq?":if(3!==i.length)throw new Error("Wrong number of arguments to `#eq?` predicate. Expected 2, got "+(i.length-1));if("capture"!==i[1].type)throw new Error(`First argument of \`#eq?\` predicate must be a capture. Got "${i[1].value}"`);if("capture"===i[2].type){const t=i[1].name,n=i[2].name;h[e].push((function(e){let i,o;for(const r of e)r.name===t&&(i=r.node),r.name===n&&(o=r.node);return void 0===i||void 0===o||i.text===o.text===r}))}else{const t=i[1].name,n=i[2].value;h[e].push((function(e){for(const i of e)if(i.name===t)return i.node.text===n===r;return!0}))}break;case"not-match?":r=!1;case"match?":if(3!==i.length)throw new Error(`Wrong number of arguments to \`#match?\` predicate. Expected 2, got ${i.length-1}.`);if("capture"!==i[1].type)throw new Error(`First argument of \`#match?\` predicate must be a capture. Got "${i[1].value}".`);if("string"!==i[2].type)throw new Error(`Second argument of \`#match?\` predicate must be a string. Got @${i[2].value}.`);const n=i[1].name,o=new RegExp(i[2].value);h[e].push((function(e){for(const t of e)if(t.name===n)return o.test(t.node.text)===r;return!0}));break;case"set!":if(i.length<2||i.length>3)throw new Error(`Wrong number of arguments to \`#set!\` predicate. Expected 1 or 2. Got ${i.length-1}.`);if(i.some((e=>"string"!==e.type)))throw new Error('Arguments to `#set!` predicate must be a strings.".');l[e]||(l[e]={}),l[e][i[1].value]=i[2]?i[2].value:null;break;case"is?":case"is-not?":if(i.length<2||i.length>3)throw new Error(`Wrong number of arguments to \`#${t}\` predicate. Expected 1 or 2. Got ${i.length-1}.`);if(i.some((e=>"string"!==e.type)))throw new Error(`Arguments to \`#${t}\` predicate must be a strings.".`);const s="is?"===t?u:d;s[e]||(s[e]={}),s[e][i[1].value]=i[2]?i[2].value:null;break;default:p[e].push({operator:t,operands:i.slice(1)})}i.length=0}}Object.freeze(l[e]),Object.freeze(u[e]),Object.freeze(d[e])}return Ot._free(r),new Qt(Lt,n,a,h,p,Object.freeze(l),Object.freeze(u),Object.freeze(d))}static load(e){let t;if(e instanceof Uint8Array)t=Promise.resolve(e);else{const n=e;if("undefined"!=typeof process&&process.versions&&process.versions.node){const e=r(57147);t=Promise.resolve(e.readFileSync(n))}else t=fetch(n).then((e=>e.arrayBuffer().then((t=>{if(e.ok)return new Uint8Array(t);{const r=new TextDecoder("utf-8").decode(t);throw new Error(`Language.load failed with status ${e.status}.\n\n${r}`)}}))))}const n="function"==typeof loadSideModule?loadSideModule:Ge;return t.then((e=>n(e,{loadAsync:!0}))).then((e=>{const t=Object.keys(e),r=t.find((e=>Ft.test(e)&&!e.includes("external_scanner_")));r||console.log(`Couldn't find language function in WASM file. Symbols:\n${JSON.stringify(t,null,2)}`);const n=e[r]();return new Gt(Lt,n)}))}}class Qt{constructor(e,t,r,n,i,o,s,a){Xt(e),this[0]=t,this.captureNames=r,this.textPredicates=n,this.predicates=i,this.setProperties=o,this.assertedProperties=s,this.refutedProperties=a,this.exceededMatchLimit=!1}delete(){Ot._ts_query_delete(this[0]),this[0]=0}matches(e,t,r,n){t||(t=Mt),r||(r=Mt),n||(n={});let i=n.matchLimit;if(void 0===i)i=0;else if("number"!=typeof i)throw new Error("Arguments must be numbers");er(e),Ot._ts_query_matches_wasm(this[0],e.tree[0],t.row,t.column,r.row,r.column,i);const o=Re($t,"i32"),s=Re($t+4,"i32"),a=Re($t+8,"i32"),c=new Array(o);this.exceededMatchLimit=!!a;let l=0,u=s;for(let t=0;te(i)))){c[l++]={pattern:r,captures:i};const e=this.setProperties[r];e&&(c[t].setProperties=e);const n=this.assertedProperties[r];n&&(c[t].assertedProperties=n);const o=this.refutedProperties[r];o&&(c[t].refutedProperties=o)}}return c.length=l,Ot._free(s),c}captures(e,t,r,n){t||(t=Mt),r||(r=Mt),n||(n={});let i=n.matchLimit;if(void 0===i)i=0;else if("number"!=typeof i)throw new Error("Arguments must be numbers");er(e),Ot._ts_query_captures_wasm(this[0],e.tree[0],t.row,t.column,r.row,r.column,i);const o=Re($t,"i32"),s=Re($t+4,"i32"),a=Re($t+8,"i32"),c=[];this.exceededMatchLimit=!!a;const l=[];let u=s;for(let t=0;te(l)))){const e=l[n],r=this.setProperties[t];r&&(e.setProperties=r);const i=this.assertedProperties[t];i&&(e.assertedProperties=i);const o=this.refutedProperties[t];o&&(e.refutedProperties=o),c.push(e)}}return Ot._free(s),c}predicatesForPattern(e){return this.predicates[e]}didExceedMatchLimit(){return this.exceededMatchLimit}}function Jt(e,t,r){const n=r-t;let i=e.textCallback(t,null,r);for(t+=i.length;t0))break;t+=n.length,i+=n}return t>r&&(i=i.slice(0,n)),i}function Yt(e,t,r,n){for(let i=0,o=n.length;i{Vt.init(),t()}})))}}return o}();e.exports=i},28028:e=>{"use strict";e.exports=require("@opentelemetry/tracing")},89166:e=>{"use strict";e.exports=require("applicationinsights-native-metrics")},39491:e=>{"use strict";e.exports=require("assert")},50852:e=>{"use strict";e.exports=require("async_hooks")},14300:e=>{"use strict";e.exports=require("buffer")},32081:e=>{"use strict";e.exports=require("child_process")},96206:e=>{"use strict";e.exports=require("console")},22057:e=>{"use strict";e.exports=require("constants")},6113:e=>{"use strict";e.exports=require("crypto")},9523:e=>{"use strict";e.exports=require("dns")},82361:e=>{"use strict";e.exports=require("events")},57147:e=>{"use strict";e.exports=require("fs")},13685:e=>{"use strict";e.exports=require("http")},85158:e=>{"use strict";e.exports=require("http2")},95687:e=>{"use strict";e.exports=require("https")},98188:e=>{"use strict";e.exports=require("module")},41808:e=>{"use strict";e.exports=require("net")},22037:e=>{"use strict";e.exports=require("os")},71017:e=>{"use strict";e.exports=require("path")},77282:e=>{"use strict";e.exports=require("process")},12781:e=>{"use strict";e.exports=require("stream")},71576:e=>{"use strict";e.exports=require("string_decoder")},39512:e=>{"use strict";e.exports=require("timers")},24404:e=>{"use strict";e.exports=require("tls")},76224:e=>{"use strict";e.exports=require("tty")},57310:e=>{"use strict";e.exports=require("url")},73837:e=>{"use strict";e.exports=require("util")},71267:e=>{"use strict";e.exports=require("worker_threads")},59796:e=>{"use strict";e.exports=require("zlib")},93180:e=>{"use strict";e.exports=JSON.parse('{"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.0","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"}}}')},84821:e=>{"use strict";e.exports=JSON.parse('{"name":"@roamhq/mac-ca","version":"1.0.7","description":"Get Mac OS Root certificates","main":"index.js","repository":{"type":"git","url":"https://github.com/WonderInventions/mac-ca.git"},"scripts":{"test":"echo \\"Error: no test specified\\" && exit 1","lint":"eslint ."},"license":"BSD-3-Clause","dependencies":{"node-forge":"^1.3.1"},"devDependencies":{"eslint":"^8.22.0"}}')},71143:e=>{"use strict";e.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},31512:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')},43186:e=>{"use strict";e.exports={i8:"1.7.6"}},99674:e=>{"use strict";e.exports={i8:"0.2.0"}},70735:e=>{"use strict";e.exports={i8:"1.3.7"}},99876:e=>{"use strict";e.exports=JSON.parse('{"name":"copilot","displayName":"GitHub Copilot","description":"Your AI pair programmer","version":"1.73.0","build":"dev","buildType":"dev","publisher":"GitHub","preview":false,"homepage":"https://github.com/features/copilot","bugs":{"url":"https://github.com/community/community/discussions/categories/copilot"},"qna":"https://github.com/github-community/community/discussions/categories/copilot","icon":"assets/Copilot-App-Icon.png","pricing":"Trial","engines":{"vscode":"^1.68.0","npm":">=7.0.0"},"categories":["Programming Languages","Machine Learning","Education","Snippets"],"keywords":["ai","openai","codex","pilot","snippets","documentation","autocomplete","intellisense","refactor","javascript","python","typescript","php","go","golang","ruby","c++","c#","java","kotlin"],"badges":[{"url":"https://img.shields.io/badge/GitHub%20Copilot-Subscription%20Required-orange","href":"https://github.com/github-copilot/signup","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"}],"activationEvents":["onStartupFinished"],"main":"./dist/extension","enabledApiProposals":["inlineCompletionsAdditions"],"contributes":{"commands":[{"command":"github.copilot.generate","title":"Open GitHub Copilot"},{"command":"github.copilot.toggleCopilot","title":"GitHub Copilot: Configure Enabled/Disabled"},{"command":"github.copilot.sendFeedback","title":"GitHub Copilot: Send Feedback"},{"command":"github.copilot.collectDiagnostics","title":"GitHub Copilot: Collect Diagnostics"}],"keybindings":[{"command":"github.copilot.generate","key":"ctrl+enter","mac":"ctrl+enter","when":"editorTextFocus && github.copilot.activated"},{"command":"editor.action.inlineSuggest.trigger","key":"alt+\\\\","when":"editorTextFocus && !editorHasSelection && config.github.copilot.inlineSuggest.enable && !inlineSuggestionsVisible"}],"menus":{"editor/inlineCompletions/actions":[{"command":"github.copilot.generate","when":"github.copilot.activated"}],"commandPalette":[{"command":"github.copilot.generate","when":"github.copilot.activated"},{"command":"github.copilot.toggleCopilot","when":"github.copilot.activated"},{"command":"github.copilot.sendFeedback","when":"github.copilot.activated"},{"command":"github.copilot.collectDiagnostics"}]},"configuration":[{"title":"Copilot","properties":{"github.copilot.advanced":{"type":"object","title":"Advanced Settings","properties":{"secret_key":{"type":"string","default":"","description":"Secret API key"},"length":{"type":"integer","default":500,"description":"Length of code to generate in tokens"},"temperature":{"type":"string","default":"","description":"Override sampling temperature (range 0.0 - 1.0)"},"top_p":{"type":"number","default":1,"description":"Top probability mass to consider"},"stops":{"type":"object","default":{"*":["\\n\\n\\n"],"python":["\\ndef ","\\nclass ","\\nif ","\\n\\n#"]},"description":"Configure per-language stop sequences"},"indentationMode":{"type":"object","default":{"python":false,"javascript":false,"javascriptreact":false,"jsx":false,"typescript":false,"typescriptreact":false,"go":false,"ruby":false,"*":true},"markdownDescription":"Enable or disable indentation block termination for specified [languages](https://code.visualstudio.com/docs/languages/identifiers). Set to \'clientandserver\' to run both parser-based and indent-based termination."},"inlineSuggestCount":{"type":"integer","default":3,"description":"Number of inline suggestions to fetch"},"listCount":{"type":"integer","default":10,"description":"Number of solutions to list in Open GitHub Copilot"},"debug.showScores":{"type":"boolean","default":false,"description":"Show scores in sorted solutions"},"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.overrideLogLevels":{"type":"object","default":{},"description":"Override what the minimum logged level is per logger (or \'*\' for all loggers). Levels are \'DEBUG\', \'INFO\', \'WARN\', \'ERROR\'. Ex: `{\\"default\\": \\"DEBUG\\"}` to see all things logged to the \'default\' logger."},"debug.filterLogCategories":{"type":"array","default":[],"description":"Show only log categories listed in this setting. If an array is empty, show all loggers"},"debug.codeQuote":{"type":"boolean","default":false,"description":"Enable or disable CodeQuote feature"}}},"github.copilot.enable":{"type":"object","default":{"*":true,"yaml":false,"plaintext":false,"markdown":false},"markdownDescription":"Enable or disable Copilot for specified [languages](https://code.visualstudio.com/docs/languages/identifiers)"},"github.copilot.inlineSuggest.enable":{"type":"boolean","default":true,"description":"Show inline suggestions"}}}],"icons":{"copilot-logo":{"description":"GitHub Copilot icon","default":{"fontPath":"assets/copilot.woff","fontCharacter":"\\\\0041"}},"copilot-warning":{"description":"GitHub Copilot icon","default":{"fontPath":"assets/copilot.woff","fontCharacter":"\\\\0042"}},"copilot-notconnected":{"description":"GitHub Copilot icon","default":{"fontPath":"assets/copilot.woff","fontCharacter":"\\\\0043"}}},"iconFonts":[{"id":"copilot-font","src":[{"path":"assets/copilot.woff","format":"woff"}]}]},"scripts":{"postinstall":"npx vscode-dts dev && mv vscode.proposed.*.ts extension/src","vscode:prepublish":"npm-run-all build:extension","build":"npm-run-all build:*","build:agent":"cd agent && npm run build","build:agent-no-pkg":"cd agent && npm run build-no-pkg","build:extension":"webpack --mode production","build:lib":"cd lib && npm run build","compile":"npm-run-all compile:*","compile:agent":"cd agent && npm run compile","compile:extension":"webpack --mode development","compile:lib":"cd lib && npm run compile","watch":"npm-run-all -p watch:*","watch:agent":"cd agent && npm run watch","watch:extension":"webpack --mode development --watch","watch:lib":"cd lib && npm run watch","lint":"eslint lib extension agent --ext ts","check_deps":"depcruise -c .dependency-cruiser.js .","test":"npm-run-all test:*","test:agent":"cd agent && npm run test","test:extension":"cd extension && ts-node ./test/runTest.ts","test:prompt":"cd prompt && npm install && npm run test","test:lib":"cd lib && npm run test","test:lsp-client":"cd lsp-client && npm run test","build_test":"tsc extension/test/run.ts","get_token":"ts-node script/getToken.ts"},"devDependencies":{"@github/prettier-config":"0.0.4","@types/crypto-js":"^4.0.1","@types/git-url-parse":"^9.0.1","@types/mocha":"^10.0.0","@types/node":"^13.11.0","@types/node-forge":"^1.3.0","@types/sinon":"^10.0.13","@types/tunnel":"^0.0.3","@types/uuid":"^8.3.1","@types/vscode":"^1.68.0","@typescript-eslint/eslint-plugin":"^4.27.0","@typescript-eslint/parser":"^4.27.0","@vscode/test-electron":"^2.2.0","@vscode/vsce":"2.15.0","dependency-cruiser":"^12.5.0","eslint":"^7.29.0","eslint-plugin-no-only-tests":"^2.6.0","fantasticon":"^1.2.3","get-port":"^5.1.1","ignore-loader":"^0.1.2","mocha":"^10.2.0","npm-run-all":"^4.1.5","prettier":"2.5.1","prettier-plugin-organize-imports":"^2.3.4","proxy":"^1.0.2","sinon":"^15.0.0","ts-dedent":"^2.2.0","ts-loader":"^9.4.2","ts-node":"^10.9.1","typed-emitter":"^2.1.0","typescript":"^4.9.4","vscode-dts":"^0.3.2","webpack":"^5.54.0","webpack-cli":"^4.2.0","zlib":"^1.0.5"},"dependencies":{"@adobe/helix-fetch":"github:bmuskalla/helix-fetch#4e33e47bf6e64b637d5d713558fde504bf71c947","@github/copilot-promptlib":"file:prompt","@roamhq/mac-ca":"^1.0.7","@sinclair/typebox":"^0.25.21","ajv":"8.11.0","ajv-errors":"^3.0.0","crypto-js":"^4.0.0","git-url-parse":"^13.1.0","node-forge":"^1.3.1","open":"^8.4.0","source-map-support":"^0.5.19","tunnel":"^0.0.6","uuid":"^8.3.2","vscode-extension-telemetry":"^0.1.6","vscode-uri":"^3.0.2","win-ca":"^3.5.0"}}')}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n=r(81843);module.exports=n})(); //# sourceMappingURL=agent.js.map \ No newline at end of file diff --git a/syntax/copilot.vim b/syntax/copilot.vim new file mode 100644 index 00000000..3f6c944c --- /dev/null +++ b/syntax/copilot.vim @@ -0,0 +1,19 @@ +scriptencoding utf-8 + +if exists("b:current_syntax") + finish +endif + +let s:subtype = matchstr(&l:filetype, '\