UNPKG

@finos/perspective-viewer

Version:

The `<perspective-viewer>` Custom Element, frontend for Perspective.js

5 lines (4 loc) 3.04 MB
(()=>{var _J=Object.create;var uw=Object.defineProperty;var bJ=Object.getOwnPropertyDescriptor;var vJ=Object.getOwnPropertyNames;var CJ=Object.getPrototypeOf,wJ=Object.prototype.hasOwnProperty;var i3=s=>uw(s,"__esModule",{value:!0});var mb=(s=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(s,{get:(e,t)=>(typeof require!="undefined"?require:e)[t]}):s)(function(s){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+s+'" is not supported')});var S=(s,e)=>()=>(s&&(e=s(s=0)),e);var SJ=(s,e)=>()=>(e||s((e={exports:{}}).exports,e),e.exports),yJ=(s,e)=>{i3(s);for(var t in e)uw(s,t,{get:e[t],enumerable:!0})},xJ=(s,e,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of vJ(e))!wJ.call(s,i)&&i!=="default"&&uw(s,i,{get:()=>e[i],enumerable:!(t=bJ(e,i))||t.enumerable});return s},LJ=s=>xJ(i3(uw(s!=null?_J(CJ(s)):{},"default",s&&s.__esModule&&"default"in s?{get:()=>s.default,enumerable:!0}:{value:s,enumerable:!0})),s);var n3=(()=>{for(var s=new Uint8Array(128),e=0;e<64;e++)s[e<26?e+65:e<52?e+71:e<62?e-4:e*4-205]=e;return t=>{for(var i=t.length,n=new Uint8Array((i-(t[i-1]=="=")-(t[i-2]=="="))*3/4|0),o=0,r=0;o<i;){var a=s[t.charCodeAt(o++)],l=s[t.charCodeAt(o++)],c=s[t.charCodeAt(o++)],d=s[t.charCodeAt(o++)];n[r++]=a<<2|l>>4,n[r++]=l<<4|c>>2,n[r++]=c<<6|d}return n}})();function EJ(s,e){let t;return e.length===0?t=s:t=s.replace(/\{(\d+)\}/g,function(i,n){let o=n[0];return typeof e[o]!="undefined"?e[o]:i}),t}function f(s,e,...t){return EJ(e,t)}var ue=S(()=>{});function fe(s){wo(s)||d3.onUnexpectedError(s)}function Zt(s){wo(s)||d3.onUnexpectedExternalError(s)}function kk(s){if(s instanceof Error){let{name:e,message:t}=s,i=s.stacktrace||s.stack;return{$isError:!0,name:e,message:t,stack:i}}return s}function wo(s){return s instanceof Error&&s.name===Ik&&s.message===Ik}function pl(){let s=new Error(Ik);return s.name=s.message,s}function Bn(s){return s?new Error(`Illegal argument: ${s}`):new Error("Illegal argument")}function h3(s){return s?new Error(`Illegal state: ${s}`):new Error("Illegal state")}var c3,d3,Ik,Ue=S(()=>{c3=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?new Error(e.message+` `+e.stack):e},0)}}emit(e){this.listeners.forEach(t=>{t(e)})}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}},d3=new c3;Ik="Canceled"});var Je,yr=S(()=>{(function(s){function e(_){return _&&typeof _=="object"&&typeof _[Symbol.iterator]=="function"}s.is=e;let t=Object.freeze([]);function i(){return t}s.empty=i;function*n(_){yield _}s.single=n;function o(_){return _||t}s.from=o;function r(_){return!_||_[Symbol.iterator]().next().done===!0}s.isEmpty=r;function a(_){return _[Symbol.iterator]().next().value}s.first=a;function l(_,C){for(let y of _)if(C(y))return!0;return!1}s.some=l;function c(_,C){for(let y of _)if(C(y))return y}s.find=c;function*d(_,C){for(let y of _)C(y)&&(yield y)}s.filter=d;function*h(_,C){for(let y of _)yield C(y)}s.map=h;function*u(..._){for(let C of _)for(let y of C)yield y}s.concat=u;function*m(_){for(let C of _)for(let y of C)yield y}s.concatNested=m;function g(_,C,y){let x=y;for(let D of _)x=C(x,D);return x}s.reduce=g;function*p(_,C,y=_.length){for(C<0&&(C+=_.length),y<0?y+=_.length:y>_.length&&(y=_.length);C<y;C++)yield _[C]}s.slice=p;function b(_,C=Number.POSITIVE_INFINITY){let y=[];if(C===0)return[y,_];let x=_[Symbol.iterator]();for(let D=0;D<C;D++){let L=x.next();if(L.done)return[y,s.empty()];y.push(L.value)}return[y,{[Symbol.iterator](){return x}}]}s.consume=b;function v(_,C,y=(x,D)=>x===D){let x=_[Symbol.iterator](),D=C[Symbol.iterator]();for(;;){let L=x.next(),E=D.next();if(L.done!==E.done)return!1;if(L.done)return!0;if(!y(L.value,E.value))return!1}}s.equals=v})(Je||(Je={}))});function Sc(s){!gb||gb.markTracked(s)}function Nk(s){return gb&&gb.trackDisposable(s),s}function Ff(s){return typeof s.dispose=="function"&&s.dispose.length===0}function Fe(s){if(Je.is(s)){let e=[];for(let t of s)if(t){Sc(t);try{t.dispose()}catch(i){e.push(i)}}if(e.length===1)throw e[0];if(e.length>1)throw new u3(e);return Array.isArray(s)?[]:s}else if(s)return Sc(s),s.dispose(),s}function Cs(...s){return s.forEach(Sc),Re(()=>Fe(s))}function Re(s){let e=Nk({dispose:()=>{Sc(e),s()}});return e}var kJ,gb,u3,z,O,Wn,Tk,G=S(()=>{yr();kJ=!1,gb=null;if(kJ){let s="__is_disposable_tracked__";gb=new class{trackDisposable(e){let t=new Error("Potentially leaked disposable").stack;setTimeout(()=>{e[s]||console.log(t)},3e3)}markTracked(e){if(e&&e!==O.None)try{e[s]=!0}catch{}}}}u3=class extends Error{constructor(e){super(`Encountered errors while disposing of store. Errors: [${e.join(", ")}]`);this.errors=e}};z=class{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(Sc(this),this._isDisposed=!0,this.clear())}clear(){try{Fe(this._toDispose.values())}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return Sc(e),this._isDisposed?z.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}};z.DISABLE_DISPOSED_WARNING=!1;O=class{constructor(){this._store=new z,Nk(this)}dispose(){Sc(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};O.None=Object.freeze({dispose(){}});Wn=class{constructor(){this._isDisposed=!1,Nk(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){var t;this._isDisposed||e===this._value||((t=this._value)===null||t===void 0||t.dispose(),e&&Sc(e),this._value=e)}clear(){this.value=void 0}dispose(){var e;this._isDisposed=!0,Sc(this),(e=this._value)===null||e===void 0||e.dispose(),this._value=void 0}},Tk=class{constructor(e){this.object=e}dispose(){}}});var qi,hn,yc=S(()=>{qi=class{constructor(e){this.element=e,this.next=qi.Undefined,this.prev=qi.Undefined}};qi.Undefined=new qi(void 0);hn=class{constructor(){this._first=qi.Undefined,this._last=qi.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===qi.Undefined}clear(){this._first=qi.Undefined,this._last=qi.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){let i=new qi(e);if(this._first===qi.Undefined)this._first=i,this._last=i;else if(t){let o=this._last;this._last=i,i.prev=o,o.next=i}else{let o=this._first;this._first=i,i.next=o,o.prev=i}this._size+=1;let n=!1;return()=>{n||(n=!0,this._remove(i))}}shift(){if(this._first!==qi.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==qi.Undefined){let e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==qi.Undefined&&e.next!==qi.Undefined){let t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===qi.Undefined&&e.next===qi.Undefined?(this._first=qi.Undefined,this._last=qi.Undefined):e.next===qi.Undefined?(this._last=this._last.prev,this._last.next=qi.Undefined):e.prev===qi.Undefined&&(this._first=this._first.next,this._first.prev=qi.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==qi.Undefined;)yield e.element,e=e.next}}});function pw(){if(!v3){v3=!0;let s=new Uint8Array(2);s[0]=1,s[1]=2,b3=new Uint16Array(s.buffer)[0]===(2<<8)+1}return b3}var Rk,fw,pb,_b,bb,IJ,m3,f3,Mk,gw,Ak,NJ,Ud,Ti,rn,g3,TJ,RJ,p3,Ok,ei,Le,ki,ts,La,$d,_3,yu,Po,b3,v3,ot=S(()=>{fw="en",pb=!1,_b=!1,bb=!1,IJ=!1,m3=!1,f3=!1,Mk=!1,Ak=fw,Ti=typeof self=="object"?self:typeof global=="object"?global:{};typeof Ti.vscode!="undefined"&&typeof Ti.vscode.process!="undefined"?rn=Ti.vscode.process:typeof process!="undefined"&&(rn=process);g3=typeof((Rk=rn==null?void 0:rn.versions)===null||Rk===void 0?void 0:Rk.electron)=="string"&&rn.type==="renderer",TJ=g3&&(rn==null?void 0:rn.sandboxed),RJ=(()=>{if(TJ)return"bypassHeatCheck";let s=rn==null?void 0:rn.env.VSCODE_BROWSER_CODE_LOADING;if(typeof s=="string")return s==="none"||s==="code"||s==="bypassHeatCheck"||s==="bypassHeatCheckAndEagerCompile"?s:"bypassHeatCheck"})(),p3=typeof RJ=="string";if(typeof navigator=="object"&&!g3)Ud=navigator.userAgent,pb=Ud.indexOf("Windows")>=0,_b=Ud.indexOf("Macintosh")>=0,Mk=(Ud.indexOf("Macintosh")>=0||Ud.indexOf("iPad")>=0||Ud.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,bb=Ud.indexOf("Linux")>=0,f3=!0,gw=navigator.language,Ak=gw;else if(typeof rn=="object"){pb=rn.platform==="win32",_b=rn.platform==="darwin",bb=rn.platform==="linux",IJ=bb&&!!rn.env.SNAP&&!!rn.env.SNAP_REVISION,gw=fw,Ak=fw;let s=rn.env.VSCODE_NLS_CONFIG;if(s)try{let e=JSON.parse(s),t=e.availableLanguages["*"];gw=e.locale,Ak=t||fw,NJ=e._translationsConfigFile}catch{}m3=!0}else console.error("Unable to resolve platform.");Ok=0;_b?Ok=1:pb?Ok=3:bb&&(Ok=2);ei=pb,Le=_b,ki=bb,ts=m3,La=f3,$d=Mk,_3=Ud,yu=function(){if(Ti.setImmediate)return Ti.setImmediate.bind(Ti);if(typeof Ti.postMessage=="function"&&!Ti.importScripts){let t=[];Ti.addEventListener("message",n=>{if(n.data&&n.data.vscodeSetImmediateId)for(let o=0,r=t.length;o<r;o++){let a=t[o];if(a.id===n.data.vscodeSetImmediateId){t.splice(o,1),a.callback();return}}});let i=0;return n=>{let o=++i;t.push({id:o,callback:n}),Ti.postMessage({vscodeSetImmediateId:o},"*")}}if(typeof(rn==null?void 0:rn.nextTick)=="function")return rn.nextTick.bind(rn);let e=Promise.resolve();return t=>e.then(t)}(),Po=_b||Mk?2:pb?1:3,b3=!0,v3=!1});var MJ,oo,Kd=S(()=>{ot();MJ=Ti.performance&&typeof Ti.performance.now=="function",oo=class{constructor(e){this._highResolution=MJ&&e,this._startTime=this._now(),this._stopTime=-1}static create(e=!0){return new oo(e)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?Ti.performance.now():Date.now()}}});var de,vb,C3,w3,N,jf,xu,_w,ge=S(()=>{Ue();G();yc();Kd();(function(s){s.None=()=>O.None;function e(C){return(y,x=null,D)=>{let L=!1,E;return E=C(R=>{if(!L)return E?E.dispose():L=!0,y.call(x,R)},null,D),L&&E.dispose(),E}}s.once=e;function t(C,y){return l((x,D=null,L)=>C(E=>x.call(D,y(E)),null,L))}s.map=t;function i(C,y){return l((x,D=null,L)=>C(E=>{y(E),x.call(D,E)},null,L))}s.forEach=i;function n(C,y){return l((x,D=null,L)=>C(E=>y(E)&&x.call(D,E),null,L))}s.filter=n;function o(C){return C}s.signal=o;function r(...C){return(y,x=null,D)=>Cs(...C.map(L=>L(E=>y.call(x,E),null,D)))}s.any=r;function a(C,y,x){let D=x;return t(C,L=>(D=y(D,L),D))}s.reduce=a;function l(C){let y,x=new N({onFirstListenerAdd(){y=C(x.fire,x)},onLastListenerRemove(){y.dispose()}});return x.event}s.snapshot=l;function c(C,y,x=100,D=!1,L){let E,R,F,B=0,Y=new N({leakWarningThreshold:L,onFirstListenerAdd(){E=C(Z=>{B++,R=y(R,Z),D&&!F&&(Y.fire(R),R=void 0),clearTimeout(F),F=setTimeout(()=>{let Ce=R;R=void 0,F=void 0,(!D||B>1)&&Y.fire(Ce),B=0},x)})},onLastListenerRemove(){E.dispose()}});return Y.event}s.debounce=c;function d(C){let y=new Date().getTime();return t(e(C),x=>new Date().getTime()-y)}s.stopwatch=d;function h(C){let y=!0,x;return n(C,D=>{let L=y||D!==x;return y=!1,x=D,L})}s.latch=h;function u(C,y=!1,x=[]){let D=x.slice(),L=C(F=>{D?D.push(F):R.fire(F)}),E=()=>{D&&D.forEach(F=>R.fire(F)),D=null},R=new N({onFirstListenerAdd(){L||(L=C(F=>R.fire(F)))},onFirstListenerDidAdd(){D&&(y?setTimeout(E):E())},onLastListenerRemove(){L&&L.dispose(),L=null}});return R.event}s.buffer=u;class m{constructor(y){this.event=y}map(y){return new m(t(this.event,y))}forEach(y){return new m(i(this.event,y))}filter(y){return new m(n(this.event,y))}reduce(y,x){return new m(a(this.event,y,x))}latch(){return new m(h(this.event))}debounce(y,x=100,D=!1,L){return new m(c(this.event,y,x,D,L))}on(y,x,D){return this.event(y,x,D)}once(y,x,D){return e(this.event)(y,x,D)}}function g(C){return new m(C)}s.chain=g;function p(C,y,x=D=>D){let D=(...F)=>R.fire(x(...F)),L=()=>C.on(y,D),E=()=>C.removeListener(y,D),R=new N({onFirstListenerAdd:L,onLastListenerRemove:E});return R.event}s.fromNodeEventEmitter=p;function b(C,y,x=D=>D){let D=(...F)=>R.fire(x(...F)),L=()=>C.addEventListener(y,D),E=()=>C.removeEventListener(y,D),R=new N({onFirstListenerAdd:L,onLastListenerRemove:E});return R.event}s.fromDOMEventEmitter=b;function v(C){let y=new N,x=!1;return C.then(void 0,()=>null).then(()=>{x?y.fire(void 0):setTimeout(()=>y.fire(void 0),0)}),x=!0,y.event}s.fromPromise=v;function _(C){return new Promise(y=>e(C)(y))}s.toPromise=_})(de||(de={}));vb=class{constructor(e){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${e}_${vb._idPool++}`}start(e){this._stopWatch=new oo(!0),this._listenerCount=e}stop(){if(this._stopWatch){let e=this._stopWatch.elapsed();this._elapsedOverall+=e,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${e.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}};vb._idPool=0;C3=-1,w3=class{constructor(e,t=Math.random().toString(18).slice(2,5)){this.customThreshold=e,this.name=t,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(e){let t=C3;if(typeof this.customThreshold=="number"&&(t=this.customThreshold),t<=0||e<t)return;this._stacks||(this._stacks=new Map);let i=new Error().stack.split(` `).slice(3).join(` `),n=this._stacks.get(i)||0;if(this._stacks.set(i,n+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=t*.5;let o,r=0;for(let[a,l]of this._stacks)(!o||r<l)&&(o=a,r=l);console.warn(`[${this.name}] potential listener LEAK detected, having ${e} listeners already. MOST frequent listener (${r}):`),console.warn(o)}return()=>{let o=this._stacks.get(i)||0;this._stacks.set(i,o-1)}}},N=class{constructor(e){var t;this._disposed=!1,this._options=e,this._leakageMon=C3>0?new w3(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((t=this._options)===null||t===void 0?void 0:t._profName)?new vb(this._options._profName):void 0}get event(){return this._event||(this._event=(e,t,i)=>{var n;this._listeners||(this._listeners=new hn);let o=this._listeners.isEmpty();o&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);let r=this._listeners.push(t?[e,t]:e);o&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,e,t);let a=(n=this._leakageMon)===null||n===void 0?void 0:n.check(this._listeners.size),l;return l={dispose:()=>{a&&a(),l.dispose=N._noop,this._disposed||(r(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))}},i instanceof z?i.add(l):Array.isArray(i)&&i.push(l),l}),this._event}fire(e){var t,i;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new hn);for(let n of this._listeners)this._deliveryQueue.push([n,e]);for((t=this._perfMon)===null||t===void 0||t.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){let[n,o]=this._deliveryQueue.shift();try{typeof n=="function"?n.call(void 0,o):n[0].call(n[1],o)}catch(r){fe(r)}}(i=this._perfMon)===null||i===void 0||i.stop()}}dispose(){var e,t,i;(e=this._listeners)===null||e===void 0||e.clear(),(t=this._deliveryQueue)===null||t===void 0||t.clear(),(i=this._leakageMon)===null||i===void 0||i.dispose(),this._disposed=!0}};N._noop=function(){};jf=class extends N{constructor(e){super(e);this._isPaused=0,this._eventQueue=new hn,this._mergeFn=e==null?void 0:e.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused==0)if(this._mergeFn){let e=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(e))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(e){this._listeners&&(this._isPaused!==0?this._eventQueue.push(e):super.fire(e))}},xu=class{constructor(){this.buffers=[]}wrapEvent(e){return(t,i,n)=>e(o=>{let r=this.buffers[this.buffers.length-1];r?r.push(()=>t.call(i,o)):t.call(i,o)},void 0,n)}bufferEvents(e){let t=[];this.buffers.push(t);let i=e();return this.buffers.pop(),t.forEach(n=>n()),i}},_w=class{constructor(){this.listening=!1,this.inputEvent=de.None,this.inputEventListener=O.None,this.emitter=new N({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=e(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}});function bw(){return qd.INSTANCE.getZoomLevel()}function S3(){return qd.INSTANCE.getTimeSinceLastZoomLevelChanged()}function vw(s){return qd.INSTANCE.onDidChangeZoomLevel(s)}function y3(){return qd.INSTANCE.getZoomFactor()}function Bf(){return qd.INSTANCE.getPixelRatio()}var qd,Wf,Ri,Da,Cb,xr,x3,L3,Lu,Vf,so=S(()=>{ge();qd=class{constructor(){this._zoomLevel=0,this._lastZoomLevelChangeTime=0,this._onDidChangeZoomLevel=new N,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this._zoomFactor=1}getZoomLevel(){return this._zoomLevel}getTimeSinceLastZoomLevelChanged(){return Date.now()-this._lastZoomLevelChangeTime}getZoomFactor(){return this._zoomFactor}getPixelRatio(){let e=document.createElement("canvas").getContext("2d"),t=window.devicePixelRatio||1,i=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return t/i}};qd.INSTANCE=new qd;Wf=navigator.userAgent,Ri=Wf.indexOf("Firefox")>=0,Da=Wf.indexOf("AppleWebKit")>=0,Cb=Wf.indexOf("Chrome")>=0,xr=!Cb&&Wf.indexOf("Safari")>=0,x3=!Cb&&!xr&&Da,L3=Wf.indexOf("iPad")>=0||xr&&navigator.maxTouchPoints>0,Lu=Wf.indexOf("Android")>=0,Vf=window.matchMedia&&window.matchMedia("(display-mode: standalone)").matches});function Cw(s){return Array.isArray(s)}function ro(s){return typeof s=="string"}function an(s){return typeof s=="object"&&s!==null&&!Array.isArray(s)&&!(s instanceof RegExp)&&!(s instanceof Date)}function ws(s){return typeof s=="number"&&!isNaN(s)}function ww(s){return s===!0||s===!1}function xn(s){return typeof s=="undefined"}function So(s){return xn(s)||s===null}function gt(s,e){if(!s)throw new Error(e?`Unexpected type, expected '${e}'`:"Unexpected type")}function wb(s){if(So(s))throw new Error("Assertion Failed: argument is undefined or null");return s}function Du(s){return typeof s=="function"}function D3(s,e){let t=Math.min(s.length,e.length);for(let i=0;i<t;i++)AJ(s[i],e[i])}function AJ(s,e){if(ro(e)){if(typeof s!==e)throw new Error(`argument does not match constraint: typeof ${e}`)}else if(Du(e)){try{if(s instanceof e)return}catch{}if(!So(s)&&s.constructor===e||e.length===1&&e.call(void 0,s)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function OJ(s){let e=[],t=Object.getPrototypeOf(s);for(;Object.prototype!==t;)e=e.concat(Object.getOwnPropertyNames(t)),t=Object.getPrototypeOf(t);return e}function zf(s){let e=[];for(let t of OJ(s))typeof s[t]=="function"&&e.push(t);return e}function Sw(s,e){let t=n=>function(){let o=Array.prototype.slice.call(arguments,0);return e(n,o)},i={};for(let n of s)i[n]=t(n);return i}function un(s){return s===null?void 0:s}var Et=S(()=>{});function yw(s){return s.preventDefault(),s.stopPropagation(),s}function Pk(s){return de.map(s,yw)}var De,Lr=S(()=>{ge();De=(s,e,t)=>{let i=o=>n.fire(o),n=new N({onFirstListenerAdd:()=>{s.addEventListener(e,i,t)},onLastListenerRemove:()=>{s.removeEventListener(e,i,t)}});return n.event}});function pi(s,e){let t=(e&65535)<<16>>>0;return(s|t)>>>0}function Sb(s,e){if(s===0)return null;let t=(s&65535)>>>0,i=(s&4294901760)>>>16;return i!==0?new Lw([Wk(t,e),Wk(i,e)]):new Lw([Wk(t,e)])}function Wk(s,e){let t=!!(s&2048),i=!!(s&256),n=e===2?i:t,o=!!(s&1024),r=!!(s&512),a=e===2?t:i,l=s&255;return new xc(n,o,r,a,l)}var xw,Fk,jk,Bk,Gd,xc,Lw,Vk,zk,Fo=S(()=>{Ue();xw=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}},Fk=new xw,jk=new xw,Bk=new xw;(function(){function s(e,t,i=t,n=i){Fk.define(e,t),jk.define(e,i),Bk.define(e,n)}s(0,"unknown"),s(1,"Backspace"),s(2,"Tab"),s(3,"Enter"),s(4,"Shift"),s(5,"Ctrl"),s(6,"Alt"),s(7,"PauseBreak"),s(8,"CapsLock"),s(9,"Escape"),s(10,"Space"),s(11,"PageUp"),s(12,"PageDown"),s(13,"End"),s(14,"Home"),s(15,"LeftArrow","Left"),s(16,"UpArrow","Up"),s(17,"RightArrow","Right"),s(18,"DownArrow","Down"),s(19,"Insert"),s(20,"Delete"),s(21,"0"),s(22,"1"),s(23,"2"),s(24,"3"),s(25,"4"),s(26,"5"),s(27,"6"),s(28,"7"),s(29,"8"),s(30,"9"),s(31,"A"),s(32,"B"),s(33,"C"),s(34,"D"),s(35,"E"),s(36,"F"),s(37,"G"),s(38,"H"),s(39,"I"),s(40,"J"),s(41,"K"),s(42,"L"),s(43,"M"),s(44,"N"),s(45,"O"),s(46,"P"),s(47,"Q"),s(48,"R"),s(49,"S"),s(50,"T"),s(51,"U"),s(52,"V"),s(53,"W"),s(54,"X"),s(55,"Y"),s(56,"Z"),s(57,"Meta"),s(58,"ContextMenu"),s(59,"F1"),s(60,"F2"),s(61,"F3"),s(62,"F4"),s(63,"F5"),s(64,"F6"),s(65,"F7"),s(66,"F8"),s(67,"F9"),s(68,"F10"),s(69,"F11"),s(70,"F12"),s(71,"F13"),s(72,"F14"),s(73,"F15"),s(74,"F16"),s(75,"F17"),s(76,"F18"),s(77,"F19"),s(78,"NumLock"),s(79,"ScrollLock"),s(80,";",";","OEM_1"),s(81,"=","=","OEM_PLUS"),s(82,",",",","OEM_COMMA"),s(83,"-","-","OEM_MINUS"),s(84,".",".","OEM_PERIOD"),s(85,"/","/","OEM_2"),s(86,"`","`","OEM_3"),s(110,"ABNT_C1"),s(111,"ABNT_C2"),s(87,"[","[","OEM_4"),s(88,"\\","\\","OEM_5"),s(89,"]","]","OEM_6"),s(90,"'","'","OEM_7"),s(91,"OEM_8"),s(92,"OEM_102"),s(93,"NumPad0"),s(94,"NumPad1"),s(95,"NumPad2"),s(96,"NumPad3"),s(97,"NumPad4"),s(98,"NumPad5"),s(99,"NumPad6"),s(100,"NumPad7"),s(101,"NumPad8"),s(102,"NumPad9"),s(103,"NumPad_Multiply"),s(104,"NumPad_Add"),s(105,"NumPad_Separator"),s(106,"NumPad_Subtract"),s(107,"NumPad_Decimal"),s(108,"NumPad_Divide")})();(function(s){function e(r){return Fk.keyCodeToStr(r)}s.toString=e;function t(r){return Fk.strToKeyCode(r)}s.fromString=t;function i(r){return jk.keyCodeToStr(r)}s.toUserSettingsUS=i;function n(r){return Bk.keyCodeToStr(r)}s.toUserSettingsGeneral=n;function o(r){return jk.strToKeyCode(r)||Bk.strToKeyCode(r)}s.fromUserSettings=o})(Gd||(Gd={}));xc=class{constructor(e,t,i,n,o){this.ctrlKey=e,this.shiftKey=t,this.altKey=i,this.metaKey=n,this.keyCode=o}equals(e){return this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.metaKey===e.metaKey&&this.keyCode===e.keyCode}isModifierKey(){return this.keyCode===0||this.keyCode===5||this.keyCode===57||this.keyCode===6||this.keyCode===4}toChord(){return new Lw([this])}isDuplicateModifierCase(){return this.ctrlKey&&this.keyCode===5||this.shiftKey&&this.keyCode===4||this.altKey&&this.keyCode===6||this.metaKey&&this.keyCode===57}},Lw=class{constructor(e){if(e.length===0)throw Bn("parts");this.parts=e}},Vk=class{constructor(e,t,i,n,o,r){this.ctrlKey=e,this.shiftKey=t,this.altKey=i,this.metaKey=n,this.keyLabel=o,this.keyAriaLabel=r}},zk=class{}});function PJ(s){if(s.charCode){let e=String.fromCharCode(s.charCode).toUpperCase();return Gd.fromString(e)}return E3[s.keyCode]||0}var E3,Hk,FJ,jJ,BJ,WJ,Bt,Dr=S(()=>{so();Fo();ot();E3=new Array(230),Hk=new Array(112);(function(){for(let e=0;e<Hk.length;e++)Hk[e]=-1;function s(e,t){E3[e]=t,Hk[t]=e}s(3,7),s(8,1),s(9,2),s(13,3),s(16,4),s(17,5),s(18,6),s(19,7),s(20,8),s(27,9),s(32,10),s(33,11),s(34,12),s(35,13),s(36,14),s(37,15),s(38,16),s(39,17),s(40,18),s(45,19),s(46,20),s(48,21),s(49,22),s(50,23),s(51,24),s(52,25),s(53,26),s(54,27),s(55,28),s(56,29),s(57,30),s(65,31),s(66,32),s(67,33),s(68,34),s(69,35),s(70,36),s(71,37),s(72,38),s(73,39),s(74,40),s(75,41),s(76,42),s(77,43),s(78,44),s(79,45),s(80,46),s(81,47),s(82,48),s(83,49),s(84,50),s(85,51),s(86,52),s(87,53),s(88,54),s(89,55),s(90,56),s(93,58),s(96,93),s(97,94),s(98,95),s(99,96),s(100,97),s(101,98),s(102,99),s(103,100),s(104,101),s(105,102),s(106,103),s(107,104),s(108,105),s(109,106),s(110,107),s(111,108),s(112,59),s(113,60),s(114,61),s(115,62),s(116,63),s(117,64),s(118,65),s(119,66),s(120,67),s(121,68),s(122,69),s(123,70),s(124,71),s(125,72),s(126,73),s(127,74),s(128,75),s(129,76),s(130,77),s(144,78),s(145,79),s(186,80),s(187,81),s(188,82),s(189,83),s(190,84),s(191,85),s(192,86),s(193,110),s(194,111),s(219,87),s(220,88),s(221,89),s(222,90),s(223,91),s(226,92),s(229,109),Ri?(s(59,80),s(107,81),s(109,83),Le&&s(224,57)):Da&&(s(91,57),s(Le?93:92,57))})();FJ=Le?256:2048,jJ=512,BJ=1024,WJ=Le?2048:256,Bt=class{constructor(e){this._standardKeyboardEventBrand=!0;let t=e;this.browserEvent=t,this.target=t.target,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.keyCode=PJ(t),this.code=t.code,this.ctrlKey=this.ctrlKey||this.keyCode===5,this.altKey=this.altKey||this.keyCode===6,this.shiftKey=this.shiftKey||this.keyCode===4,this.metaKey=this.metaKey||this.keyCode===57,this._asKeybinding=this._computeKeybinding(),this._asRuntimeKeybinding=this._computeRuntimeKeybinding()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeybinding(){return this._asRuntimeKeybinding}equals(e){return this._asKeybinding===e}_computeKeybinding(){let e=0;this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode);let t=0;return this.ctrlKey&&(t|=FJ),this.altKey&&(t|=jJ),this.shiftKey&&(t|=BJ),this.metaKey&&(t|=WJ),t|=e,t}_computeRuntimeKeybinding(){let e=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode),new xc(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}}});function VJ(s){if(!s.parent||s.parent===s)return null;try{let e=s.location,t=s.parent.location;if(e.origin!=="null"&&t.origin!=="null"&&(e.protocol!==t.protocol||e.hostname!==t.hostname||e.port!==t.port))return Uk=!0,null}catch{return Uk=!0,null}return s.parent}var Uk,Hf,Uf,$k=S(()=>{Uk=!1,Hf=null;Uf=class{static getSameOriginWindowChain(){if(!Hf){Hf=[];let e=window,t;do t=VJ(e),t?Hf.push({window:e,iframeElement:e.frameElement||null}):Hf.push({window:e,iframeElement:null}),e=t;while(e)}return Hf.slice(0)}static hasDifferentOriginAncestor(){return Hf||this.getSameOriginWindowChain(),Uk}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let i=0,n=0,o=this.getSameOriginWindowChain();for(let r of o){if(i+=r.window.scrollY,n+=r.window.scrollX,r.window===t||!r.iframeElement)break;let a=r.iframeElement.getBoundingClientRect();i+=a.top,n+=a.left}return{top:i,left:n}}}});var Qi,Ea,Us=S(()=>{so();$k();ot();Qi=class{constructor(e){this.timestamp=Date.now(),this.browserEvent=e,this.leftButton=e.button===0,this.middleButton=e.button===1,this.rightButton=e.button===2,this.buttons=e.buttons,this.target=e.target,this.detail=e.detail||1,e.type==="dblclick"&&(this.detail=2),this.ctrlKey=e.ctrlKey,this.shiftKey=e.shiftKey,this.altKey=e.altKey,this.metaKey=e.metaKey,typeof e.pageX=="number"?(this.posx=e.pageX,this.posy=e.pageY):(this.posx=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,this.posy=e.clientY+document.body.scrollTop+document.documentElement.scrollTop);let t=Uf.getPositionOfChildWindowRelativeToAncestorWindow(self,e.view);this.posx-=t.left,this.posy-=t.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}},Ea=class{constructor(e,t=0,i=0){if(this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=i,this.deltaX=t,e){let n=e,o=e;if(typeof n.wheelDeltaY!="undefined")this.deltaY=n.wheelDeltaY/120;else if(typeof o.VERTICAL_AXIS!="undefined"&&o.axis===o.VERTICAL_AXIS)this.deltaY=-o.detail/3;else if(e.type==="wheel"){let r=e;r.deltaMode===r.DOM_DELTA_LINE?Ri&&!Le?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if(typeof n.wheelDeltaX!="undefined")xr&&ei?this.deltaX=-(n.wheelDeltaX/120):this.deltaX=n.wheelDeltaX/120;else if(typeof o.HORIZONTAL_AXIS!="undefined"&&o.axis===o.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if(e.type==="wheel"){let r=e;r.deltaMode===r.DOM_DELTA_LINE?Ri&&!Le?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}this.deltaY===0&&this.deltaX===0&&e.wheelDelta&&(this.deltaY=e.wheelDelta/120)}}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation()}}});var k3,Me,yb,_i,$t=S(()=>{ge();k3=Object.freeze(function(s,e){let t=setTimeout(s.bind(e),0);return{dispose(){clearTimeout(t)}}});(function(s){function e(t){return t===s.None||t===s.Cancelled||t instanceof yb?!0:!t||typeof t!="object"?!1:typeof t.isCancellationRequested=="boolean"&&typeof t.onCancellationRequested=="function"}s.isCancellationToken=e,s.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:de.None}),s.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:k3})})(Me||(Me={}));yb=class{constructor(){this._isCancelled=!1,this._emitter=null}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?k3:(this._emitter||(this._emitter=new N),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}},_i=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 yb),this._token}cancel(){this._token?this._token instanceof yb&&this._token.cancel():this._token=Me.Cancelled}dispose(e=!1){e&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof yb&&this._token.dispose():this._token=Me.None}}});function I3(s){return!!s&&typeof s.then=="function"}function Gt(s){let e=new _i,t=s(e.token),i=new Promise((n,o)=>{e.token.onCancellationRequested(()=>{o(pl())}),Promise.resolve(t).then(r=>{e.dispose(),n(r)},r=>{e.dispose(),o(r)})});return new class{cancel(){e.cancel()}then(n,o){return i.then(n,o)}catch(n){return this.then(void 0,n)}finally(n){return i.finally(n)}}}function Ew(s,e,t){return Promise.race([s,new Promise(i=>e.onCancellationRequested(()=>i(t)))])}function $s(s,e){return e?new Promise((t,i)=>{let n=setTimeout(t,s);e.onCancellationRequested(()=>{clearTimeout(n),i(pl())})}):Gt(t=>$s(s,t))}function Xr(s,e=0){let t=setTimeout(s,e);return Re(()=>clearTimeout(t))}function kw(s,e=i=>!!i,t=null){let i=0,n=s.length,o=()=>{if(i>=n)return Promise.resolve(t);let r=s[i++];return Promise.resolve(r()).then(l=>e(l)?Promise.resolve(l):o())};return o()}var Dw,N3,jo,Kk,ui,_l,ut,xb,ka,Iw,Qe=S(()=>{$t();Ue();G();Dw=function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(d){try{c(i.next(d))}catch(h){r(h)}}function l(d){try{c(i.throw(d))}catch(h){r(h)}}function c(d){d.done?o(d.value):n(d.value).then(a,l)}c((i=i.apply(s,e||[])).next())})};N3=class{constructor(){this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(e){if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){let t=()=>{this.queuedPromise=null;let i=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,i};this.queuedPromise=new Promise(i=>{this.activePromise.then(t,t).then(i)})}return new Promise((t,i)=>{this.queuedPromise.then(t,i)})}return this.activePromise=e(),new Promise((t,i)=>{this.activePromise.then(n=>{this.activePromise=null,t(n)},n=>{this.activePromise=null,i(n)})})}},jo=class{constructor(e){this.defaultDelay=e,this.timeout=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(e,t=this.defaultDelay){return this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((i,n)=>{this.doResolve=i,this.doReject=n}).then(()=>{if(this.completionPromise=null,this.doResolve=null,this.task){let i=this.task;return this.task=null,i()}})),this.timeout=setTimeout(()=>{this.timeout=null,this.doResolve&&this.doResolve(null)},t),this.completionPromise}isTriggered(){return this.timeout!==null}cancel(){this.cancelTimeout(),this.completionPromise&&(this.doReject&&this.doReject(pl()),this.completionPromise=null)}cancelTimeout(){this.timeout!==null&&(clearTimeout(this.timeout),this.timeout=null)}dispose(){this.cancelTimeout()}},Kk=class{constructor(e){this.delayer=new jo(e),this.throttler=new N3}trigger(e,t){return this.delayer.trigger(()=>this.throttler.queue(e),t)}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose()}};ui=class{constructor(e,t){this._token=-1,typeof e=="function"&&typeof t=="number"&&this.setIfNotSet(e,t)}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setTimeout(()=>{this._token=-1,e()},t)}setIfNotSet(e,t){this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,e()},t))}},_l=class{constructor(){this._token=-1}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearInterval(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setInterval(()=>{e()},t)}},ut=class{constructor(e,t){this.timeoutToken=-1,this.runner=e,this.timeout=t,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(e=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)}get delay(){return this.timeout}set delay(e){this.timeout=e}isScheduled(){return this.timeoutToken!==-1}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){this.runner&&this.runner()}};(function(){if(typeof requestIdleCallback!="function"||typeof cancelIdleCallback!="function"){let s=Object.freeze({didTimeout:!0,timeRemaining(){return 15}});xb=e=>{let t=setTimeout(()=>e(s)),i=!1;return{dispose(){i||(i=!0,clearTimeout(t))}}}}else xb=(s,e)=>{let t=requestIdleCallback(s,typeof e=="number"?{timeout:e}:void 0),i=!1;return{dispose(){i||(i=!0,cancelIdleCallback(t))}}}})();ka=class{constructor(e){this._didRun=!1,this._executor=()=>{try{this._value=e()}catch(t){this._error=t}finally{this._didRun=!0}},this._handle=xb(()=>this._executor())}dispose(){this._handle.dispose()}get value(){if(this._didRun||(this._handle.dispose(),this._executor()),this._error)throw this._error;return this._value}};(function(s){function e(o){return Dw(this,void 0,void 0,function*(){return typeof Promise.allSettled=="function"?t(o):i(o)})}s.allSettled=e;function t(o){return Dw(this,void 0,void 0,function*(){return Promise.allSettled(o)})}function i(o){return Dw(this,void 0,void 0,function*(){return Promise.all(o.map(r=>r.then(a=>({status:"fulfilled",value:a}),a=>({status:"rejected",reason:a}))))})}function n(o){return Dw(this,void 0,void 0,function*(){let r,a=yield Promise.all(o.map(l=>l.then(c=>c,c=>{r||(r=c)})));if(typeof r!="undefined")throw r;return a})}s.settled=n})(Iw||(Iw={}))});var $f,Nw,T3,Yd,R3=S(()=>{ot();if(typeof Ti.vscode!="undefined"&&typeof Ti.vscode.process!="undefined"){let s=Ti.vscode.process;$f={get platform(){return s.platform},get env(){return s.env},cwd(){return s.cwd()},nextTick(e){return yu(e)}}}else typeof process!="undefined"?$f={get platform(){return process.platform},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()},nextTick(s){return process.nextTick(s)}}:$f={get platform(){return ei?"win32":Le?"darwin":"linux"},nextTick(s){return yu(s)},get env(){return Object.create(null)},cwd(){return"/"}};Nw=$f.cwd,T3=$f.env,Yd=$f.platform});function Ln(s,e){if(typeof s!="string")throw new qk(e,"string",s)}function Mt(s){return s===yo||s===Ks}function Gk(s){return s===yo}function Qd(s){return s>=zJ&&s<=UJ||s>=HJ&&s<=$J}function Tw(s,e,t,i){let n="",o=0,r=-1,a=0,l=0;for(let c=0;c<=s.length;++c){if(c<s.length)l=s.charCodeAt(c);else{if(i(l))break;l=yo}if(i(l)){if(!(r===c-1||a===1))if(a===2){if(n.length<2||o!==2||n.charCodeAt(n.length-1)!==Zd||n.charCodeAt(n.length-2)!==Zd){if(n.length>2){let d=n.lastIndexOf(t);d===-1?(n="",o=0):(n=n.slice(0,d),o=n.length-1-n.lastIndexOf(t)),r=c,a=0;continue}else if(n.length!==0){n="",o=0,r=c,a=0;continue}}e&&(n+=n.length>0?`${t}..`:"..",o=2)}else n.length>0?n+=`${t}${s.slice(r+1,c)}`:n=s.slice(r+1,c),o=c-r-1;r=c,a=0}else l===Zd&&a!==-1?++a:a=-1}return n}function M3(s,e){if(e===null||typeof e!="object")throw new qk("pathObject","Object",e);let t=e.dir||e.root,i=e.base||`${e.name||""}${e.ext||""}`;return t?t===e.root?`${t}${i}`:`${t}${s}${i}`:i}var zJ,HJ,UJ,$J,Zd,yo,Ks,Xd,KJ,qk,is,Mi,Kf,A3,O3,Rw,bl,P3,vl,Lc=S(()=>{R3();zJ=65,HJ=97,UJ=90,$J=122,Zd=46,yo=47,Ks=92,Xd=58,KJ=63,qk=class extends Error{constructor(e,t,i){let n;typeof t=="string"&&t.indexOf("not ")===0?(n="must not be",t=t.replace(/^not /,"")):n="must be";let o=e.indexOf(".")!==-1?"property":"argument",r=`The "${e}" ${o} ${n} of type ${t}`;r+=`. Received type ${typeof i}`;super(r);this.code="ERR_INVALID_ARG_TYPE"}};is={resolve(...s){let e="",t="",i=!1;for(let n=s.length-1;n>=-1;n--){let o;if(n>=0){if(o=s[n],Ln(o,"path"),o.length===0)continue}else e.length===0?o=Nw():(o=T3[`=${e}`]||Nw(),(o===void 0||o.slice(0,2).toLowerCase()!==e.toLowerCase()&&o.charCodeAt(2)===Ks)&&(o=`${e}\\`));let r=o.length,a=0,l="",c=!1,d=o.charCodeAt(0);if(r===1)Mt(d)&&(a=1,c=!0);else if(Mt(d))if(c=!0,Mt(o.charCodeAt(1))){let h=2,u=h;for(;h<r&&!Mt(o.charCodeAt(h));)h++;if(h<r&&h!==u){let m=o.slice(u,h);for(u=h;h<r&&Mt(o.charCodeAt(h));)h++;if(h<r&&h!==u){for(u=h;h<r&&!Mt(o.charCodeAt(h));)h++;(h===r||h!==u)&&(l=`\\\\${m}\\${o.slice(u,h)}`,a=h)}}}else a=1;else Qd(d)&&o.charCodeAt(1)===Xd&&(l=o.slice(0,2),a=2,r>2&&Mt(o.charCodeAt(2))&&(c=!0,a=3));if(l.length>0)if(e.length>0){if(l.toLowerCase()!==e.toLowerCase())continue}else e=l;if(i){if(e.length>0)break}else if(t=`${o.slice(a)}\\${t}`,i=c,c&&e.length>0)break}return t=Tw(t,!i,"\\",Mt),i?`${e}\\${t}`:`${e}${t}`||"."},normalize(s){Ln(s,"path");let e=s.length;if(e===0)return".";let t=0,i,n=!1,o=s.charCodeAt(0);if(e===1)return Gk(o)?"\\":s;if(Mt(o))if(n=!0,Mt(s.charCodeAt(1))){let a=2,l=a;for(;a<e&&!Mt(s.charCodeAt(a));)a++;if(a<e&&a!==l){let c=s.slice(l,a);for(l=a;a<e&&Mt(s.charCodeAt(a));)a++;if(a<e&&a!==l){for(l=a;a<e&&!Mt(s.charCodeAt(a));)a++;if(a===e)return`\\\\${c}\\${s.slice(l)}\\`;a!==l&&(i=`\\\\${c}\\${s.slice(l,a)}`,t=a)}}}else t=1;else Qd(o)&&s.charCodeAt(1)===Xd&&(i=s.slice(0,2),t=2,e>2&&Mt(s.charCodeAt(2))&&(n=!0,t=3));let r=t<e?Tw(s.slice(t),!n,"\\",Mt):"";return r.length===0&&!n&&(r="."),r.length>0&&Mt(s.charCodeAt(e-1))&&(r+="\\"),i===void 0?n?`\\${r}`:r:n?`${i}\\${r}`:`${i}${r}`},isAbsolute(s){Ln(s,"path");let e=s.length;if(e===0)return!1;let t=s.charCodeAt(0);return Mt(t)||e>2&&Qd(t)&&s.charCodeAt(1)===Xd&&Mt(s.charCodeAt(2))},join(...s){if(s.length===0)return".";let e,t;for(let o=0;o<s.length;++o){let r=s[o];Ln(r,"path"),r.length>0&&(e===void 0?e=t=r:e+=`\\${r}`)}if(e===void 0)return".";let i=!0,n=0;if(typeof t=="string"&&Mt(t.charCodeAt(0))){++n;let o=t.length;o>1&&Mt(t.charCodeAt(1))&&(++n,o>2&&(Mt(t.charCodeAt(2))?++n:i=!1))}if(i){for(;n<e.length&&Mt(e.charCodeAt(n));)n++;n>=2&&(e=`\\${e.slice(n)}`)}return is.normalize(e)},relative(s,e){if(Ln(s,"from"),Ln(e,"to"),s===e)return"";let t=is.resolve(s),i=is.resolve(e);if(t===i||(s=t.toLowerCase(),e=i.toLowerCase(),s===e))return"";let n=0;for(;n<s.length&&s.charCodeAt(n)===Ks;)n++;let o=s.length;for(;o-1>n&&s.charCodeAt(o-1)===Ks;)o--;let r=o-n,a=0;for(;a<e.length&&e.charCodeAt(a)===Ks;)a++;let l=e.length;for(;l-1>a&&e.charCodeAt(l-1)===Ks;)l--;let c=l-a,d=r<c?r:c,h=-1,u=0;for(;u<d;u++){let g=s.charCodeAt(n+u);if(g!==e.charCodeAt(a+u))break;g===Ks&&(h=u)}if(u!==d){if(h===-1)return i}else{if(c>d){if(e.charCodeAt(a+u)===Ks)return i.slice(a+u+1);if(u===2)return i.slice(a+u)}r>d&&(s.charCodeAt(n+u)===Ks?h=u:u===2&&(h=3)),h===-1&&(h=0)}let m="";for(u=n+h+1;u<=o;++u)(u===o||s.charCodeAt(u)===Ks)&&(m+=m.length===0?"..":"\\..");return a+=h,m.length>0?`${m}${i.slice(a,l)}`:(i.charCodeAt(a)===Ks&&++a,i.slice(a,l))},toNamespacedPath(s){if(typeof s!="string")return s;if(s.length===0)return"";let e=is.resolve(s);if(e.length<=2)return s;if(e.charCodeAt(0)===Ks){if(e.charCodeAt(1)===Ks){let t=e.charCodeAt(2);if(t!==KJ&&t!==Zd)return`\\\\?\\UNC\\${e.slice(2)}`}}else if(Qd(e.charCodeAt(0))&&e.charCodeAt(1)===Xd&&e.charCodeAt(2)===Ks)return`\\\\?\\${e}`;return s},dirname(s){Ln(s,"path");let e=s.length;if(e===0)return".";let t=-1,i=0,n=s.charCodeAt(0);if(e===1)return Mt(n)?s:".";if(Mt(n)){if(t=i=1,Mt(s.charCodeAt(1))){let a=2,l=a;for(;a<e&&!Mt(s.charCodeAt(a));)a++;if(a<e&&a!==l){for(l=a;a<e&&Mt(s.charCodeAt(a));)a++;if(a<e&&a!==l){for(l=a;a<e&&!Mt(s.charCodeAt(a));)a++;if(a===e)return s;a!==l&&(t=i=a+1)}}}}else Qd(n)&&s.charCodeAt(1)===Xd&&(t=e>2&&Mt(s.charCodeAt(2))?3:2,i=t);let o=-1,r=!0;for(let a=e-1;a>=i;--a)if(Mt(s.charCodeAt(a))){if(!r){o=a;break}}else r=!1;if(o===-1){if(t===-1)return".";o=t}return s.slice(0,o)},basename(s,e){e!==void 0&&Ln(e,"ext"),Ln(s,"path");let t=0,i=-1,n=!0,o;if(s.length>=2&&Qd(s.charCodeAt(0))&&s.charCodeAt(1)===Xd&&(t=2),e!==void 0&&e.length>0&&e.length<=s.length){if(e===s)return"";let r=e.length-1,a=-1;for(o=s.length-1;o>=t;--o){let l=s.charCodeAt(o);if(Mt(l)){if(!n){t=o+1;break}}else a===-1&&(n=!1,a=o+1),r>=0&&(l===e.charCodeAt(r)?--r==-1&&(i=o):(r=-1,i=a))}return t===i?i=a:i===-1&&(i=s.length),s.slice(t,i)}for(o=s.length-1;o>=t;--o)if(Mt(s.charCodeAt(o))){if(!n){t=o+1;break}}else i===-1&&(n=!1,i=o+1);return i===-1?"":s.slice(t,i)},extname(s){Ln(s,"path");let e=0,t=-1,i=0,n=-1,o=!0,r=0;s.length>=2&&s.charCodeAt(1)===Xd&&Qd(s.charCodeAt(0))&&(e=i=2);for(let a=s.length-1;a>=e;--a){let l=s.charCodeAt(a);if(Mt(l)){if(!o){i=a+1;break}continue}n===-1&&(o=!1,n=a+1),l===Zd?t===-1?t=a:r!==1&&(r=1):t!==-1&&(r=-1)}return t===-1||n===-1||r===0||r===1&&t===n-1&&t===i+1?"":s.slice(t,n)},format:M3.bind(null,"\\"),parse(s){Ln(s,"path");let e={root:"",dir:"",base:"",ext:"",name:""};if(s.length===0)return e;let t=s.length,i=0,n=s.charCodeAt(0);if(t===1)return Mt(n)?(e.root=e.dir=s,e):(e.base=e.name=s,e);if(Mt(n)){if(i=1,Mt(s.charCodeAt(1))){let h=2,u=h;for(;h<t&&!Mt(s.charCodeAt(h));)h++;if(h<t&&h!==u){for(u=h;h<t&&Mt(s.charCodeAt(h));)h++;if(h<t&&h!==u){for(u=h;h<t&&!Mt(s.charCodeAt(h));)h++;h===t?i=h:h!==u&&(i=h+1)}}}}else if(Qd(n)&&s.charCodeAt(1)===Xd){if(t<=2)return e.root=e.dir=s,e;if(i=2,Mt(s.charCodeAt(2))){if(t===3)return e.root=e.dir=s,e;i=3}}i>0&&(e.root=s.slice(0,i));let o=-1,r=i,a=-1,l=!0,c=s.length-1,d=0;for(;c>=i;--c){if(n=s.charCodeAt(c),Mt(n)){if(!l){r=c+1;break}continue}a===-1&&(l=!1,a=c+1),n===Zd?o===-1?o=c:d!==1&&(d=1):o!==-1&&(d=-1)}return a!==-1&&(o===-1||d===0||d===1&&o===a-1&&o===r+1?e.base=e.name=s.slice(r,a):(e.name=s.slice(r,o),e.base=s.slice(r,a),e.ext=s.slice(o,a))),r>0&&r!==i?e.dir=s.slice(0,r-1):e.dir=e.root,e},sep:"\\",delimiter:";",win32:null,posix:null},Mi={resolve(...s){let e="",t=!1;for(let i=s.length-1;i>=-1&&!t;i--){let n=i>=0?s[i]:Nw();Ln(n,"path"),n.length!==0&&(e=`${n}/${e}`,t=n.charCodeAt(0)===yo)}return e=Tw(e,!t,"/",Gk),t?`/${e}`:e.length>0?e:"."},normalize(s){if(Ln(s,"path"),s.length===0)return".";let e=s.charCodeAt(0)===yo,t=s.charCodeAt(s.length-1)===yo;return s=Tw(s,!e,"/",Gk),s.length===0?e?"/":t?"./":".":(t&&(s+="/"),e?`/${s}`:s)},isAbsolute(s){return Ln(s,"path"),s.length>0&&s.charCodeAt(0)===yo},join(...s){if(s.length===0)return".";let e;for(let t=0;t<s.length;++t){let i=s[t];Ln(i,"path"),i.length>0&&(e===void 0?e=i:e+=`/${i}`)}return e===void 0?".":Mi.normalize(e)},relative(s,e){if(Ln(s,"from"),Ln(e,"to"),s===e||(s=Mi.resolve(s),e=Mi.resolve(e),s===e))return"";let t=1,i=s.length,n=i-t,o=1,r=e.length-o,a=n<r?n:r,l=-1,c=0;for(;c<a;c++){let h=s.charCodeAt(t+c);if(h!==e.charCodeAt(o+c))break;h===yo&&(l=c)}if(c===a)if(r>a){if(e.charCodeAt(o+c)===yo)return e.slice(o+c+1);if(c===0)return e.slice(o+c)}else n>a&&(s.charCodeAt(t+c)===yo?l=c:c===0&&(l=0));let d="";for(c=t+l+1;c<=i;++c)(c===i||s.charCodeAt(c)===yo)&&(d+=d.length===0?"..":"/..");return`${d}${e.slice(o+l)}`},toNamespacedPath(s){return s},dirname(s){if(Ln(s,"path"),s.length===0)return".";let e=s.charCodeAt(0)===yo,t=-1,i=!0;for(let n=s.length-1;n>=1;--n)if(s.charCodeAt(n)===yo){if(!i){t=n;break}}else i=!1;return t===-1?e?"/":".":e&&t===1?"//":s.slice(0,t)},basename(s,e){e!==void 0&&Ln(e,"ext"),Ln(s,"path");let t=0,i=-1,n=!0,o;if(e!==void 0&&e.length>0&&e.length<=s.length){if(e===s)return"";let r=e.length-1,a=-1;for(o=s.length-1;o>=0;--o){let l=s.charCodeAt(o);if(l===yo){if(!n){t=o+1;break}}else a===-1&&(n=!1,a=o+1),r>=0&&(l===e.charCodeAt(r)?--r==-1&&(i=o):(r=-1,i=a))}return t===i?i=a:i===-1&&(i=s.length),s.slice(t,i)}for(o=s.length-1;o>=0;--o)if(s.charCodeAt(o)===yo){if(!n){t=o+1;break}}else i===-1&&(n=!1,i=o+1);return i===-1?"":s.slice(t,i)},extname(s){Ln(s,"path");let e=-1,t=0,i=-1,n=!0,o=0;for(let r=s.length-1;r>=0;--r){let a=s.charCodeAt(r);if(a===yo){if(!n){t=r+1;break}continue}i===-1&&(n=!1,i=r+1),a===Zd?e===-1?e=r:o!==1&&(o=1):e!==-1&&(o=-1)}return e===-1||i===-1||o===0||o===1&&e===i-1&&e===t+1?"":s.slice(e,i)},format:M3.bind(null,"/"),parse(s){Ln(s,"path");let e={root:"",dir:"",base:"",ext:"",name:""};if(s.length===0)return e;let t=s.charCodeAt(0)===yo,i;t?(e.root="/",i=1):i=0;let n=-1,o=0,r=-1,a=!0,l=s.length-1,c=0;for(;l>=i;--l){let d=s.charCodeAt(l);if(d===yo){if(!a){o=l+1;break}continue}r===-1&&(a=!1,r=l+1),d===Zd?n===-1?n=l:c!==1&&(c=1):n!==-1&&(c=-1)}if(r!==-1){let d=o===0&&t?1:o;n===-1||c===0||c===1&&n===r-1&&n===o+1?e.base=e.name=s.slice(d,r):(e.name=s.slice(d,n),e.base=s.slice(d,r),e.ext=s.slice(n,r))}return o>0?e.dir=s.slice(0,o-1):t&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};Mi.win32=is.win32=is;Mi.posix=is.posix=Mi;Kf=Yd==="win32"?is.normalize:Mi.normalize,A3=Yd==="win32"?is.resolve:Mi.resolve,O3=Yd==="win32"?is.relative:Mi.relative,Rw=Yd==="win32"?is.dirname:Mi.dirname,bl=Yd==="win32"?is.basename:Mi.basename,P3=Yd==="win32"?is.extname:Mi.extname,vl=Yd==="win32"?is.sep:Mi.sep});function ZJ(s,e){if(!s.scheme&&e)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${s.authority}", path: "${s.path}", query: "${s.query}", fragment: "${s.fragment}"}`);if(s.scheme&&!qJ.test(s.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(s.path){if(s.authority){if(!GJ.test(s.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(YJ.test(s.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function XJ(s,e){return!s&&!e?"file":s}function QJ(s,e){switch(s){case"https":case"http":case"file":e?e[0]!==Ia&&(e=Ia+e):e=Ia;break}return e}function B3(s,e){let t,i=-1;for(let n=0;n<s.length;n++){let o=s.charCodeAt(n);if(o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||o===45||o===46||o===95||o===126||e&&o===47)i!==-1&&(t+=encodeURIComponent(s.substring(i,n)),i=-1),t!==void 0&&(t+=s.charAt(n));else{t===void 0&&(t=s.substr(0,n));let r=j3[o];r!==void 0?(i!==-1&&(t+=encodeURIComponent(s.substring(i,n)),i=-1),t+=r):i===-1&&(i=n)}}return i!==-1&&(t+=encodeURIComponent(s.substring(i))),t!==void 0?t:s}function eee(s){let e;for(let t=0;t<s.length;t++){let i=s.charCodeAt(t);i===35||i===63?(e===void 0&&(e=s.substr(0,t)),e+=j3[i]):e!==void 0&&(e+=s[t])}return e!==void 0?e:s}function Lb(s,e){let t;return s.authority&&s.path.length>1&&s.scheme==="file"?t=`//${s.authority}${s.path}`:s.path.charCodeAt(0)===47&&(s.path.charCodeAt(1)>=65&&s.path.charCodeAt(1)<=90||s.path.charCodeAt(1)>=97&&s.path.charCodeAt(1)<=122)&&s.path.charCodeAt(2)===58?e?t=s.path.substr(1):t=s.path[1].toLowerCase()+s.path.substr(2):t=s.path,ei&&(t=t.replace(/\//g,"\\")),t}function Yk(s,e){let t=e?eee:B3,i="",{scheme:n,authority:o,path:r,query:a,fragment:l}=s;if(n&&(i+=n,i+=":"),(o||n==="file")&&(i+=Ia,i+=Ia),o){let c=o.indexOf("@");if(c!==-1){let d=o.substr(0,c);o=o.substr(c+1),c=d.indexOf(":"),c===-1?i+=t(d,!1):(i+=t(d.substr(0,c),!1),i+=":",i+=t(d.substr(c+1),!1)),i+="@"}o=o.toLowerCase(),c=o.indexOf(":"),c===-1?i+=t(o,!1):(i+=t(o.substr(0,c),!1),i+=o.substr(c))}if(r){if(r.length>=3&&r.charCodeAt(0)===47&&r.charCodeAt(2)===58){let c=r.charCodeAt(1);c>=65&&c<=90&&(r=`/${String.fromCharCode(c+32)}:${r.substr(3)}`)}else if(r.length>=2&&r.charCodeAt(1)===58){let c=r.charCodeAt(0);c>=65&&c<=90&&(r=`${String.fromCharCode(c+32)}:${r.substr(2)}`)}i+=t(r,!0)}return a&&(i+="?",i+=t(a,!1)),l&&(i+="#",i+=e?l:B3(l,!1)),i}function W3(s){try{return decodeURIComponent(s)}catch{return s.length>3?s.substr(0,3)+W3(s.substr(3)):s}}function Mw(s){return s.match(V3)?s.replace(V3,e=>W3(e)):s}var qJ,GJ,YJ,ji,Ia,JJ,ae,F3,Eu,j3,V3,Kt=S(()=>{ot();Lc();qJ=/^\w[\w\d+.-]*$/,GJ=/^\//,YJ=/^\/\//;ji="",Ia="/",JJ=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,ae=class{constructor(e,t,i,n,o,r=!1){typeof e=="object"?(this.scheme=e.scheme||ji,this.authority=e.authority||ji,this.path=e.path||ji,this.query=e.query||ji,this.fragment=e.fragment||ji):(this.scheme=XJ(e,r),this.authority=t||ji,this.path=QJ(this.scheme,i||ji),this.query=n||ji,this.fragment=o||ji,ZJ(this,r))}static isUri(e){return e instanceof ae?!0:e?typeof e.authority=="string"&&typeof e.fragment=="string"&&typeof e.path=="string"&&typeof e.query=="string"&&typeof e.scheme=="string"&&typeof