altair-static 8.5.6-alpha.cddec71.0 → 8.5.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,18 +1,18 @@
1
1
 
2
- > altair-static@8.5.5 bootstrap /home/runner/work/altair/altair/packages/altair-static
2
+ > altair-static@8.5.6 bootstrap /home/runner/work/altair/altair/packages/altair-static
3
3
  > pnpm prepare-dist && pnpm compile && pnpm types
4
4
 
5
5
 
6
- > altair-static@8.5.5 prepare-dist /home/runner/work/altair/altair/packages/altair-static
6
+ > altair-static@8.5.6 prepare-dist /home/runner/work/altair/altair/packages/altair-static
7
7
  > node scripts/prepare_dist.js
8
8
 
9
9
  Done copying dist folder!
10
10
 
11
- > altair-static@8.5.5 compile /home/runner/work/altair/altair/packages/altair-static
11
+ > altair-static@8.5.6 compile /home/runner/work/altair/altair/packages/altair-static
12
12
  > node scripts/build.js
13
13
 
14
14
 
15
- > altair-static@8.5.5 types /home/runner/work/altair/altair/packages/altair-static
15
+ > altair-static@8.5.6 types /home/runner/work/altair/altair/packages/altair-static
16
16
  > dts-bundle-generator src/index.ts -o build/index.d.ts --external-inlines altair-graphql-core --external-inlines altair-static --verbose
17
17
 
18
18
  Verbose log enabled
@@ -228,4 +228,4 @@ Writing src/index.ts -> build/index.d.ts
228
228
  Checking generated files...
229
229
  Using config: /home/runner/work/altair/altair/packages/altair-static/tsconfig.json
230
230
  Compiler option "skipLibCheck" is disabled to properly check generated output
231
- Done in 5.98s
231
+ Done in 5.77s
@@ -0,0 +1,6 @@
1
+ (function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))u(s);new MutationObserver(s=>{for(const a of s)if(a.type==="childList")for(const m of a.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&u(m)}).observe(document,{childList:!0,subtree:!0});function n(s){const a={};return s.integrity&&(a.integrity=s.integrity),s.referrerPolicy&&(a.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?a.credentials="include":s.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function u(s){if(s.ep)return;s.ep=!0;const a=n(s);fetch(s.href,a)}})();const y=[];for(let t=0;t<256;++t)y.push((t+256).toString(16).slice(1));function A(t,r=0){return(y[t[r+0]]+y[t[r+1]]+y[t[r+2]]+y[t[r+3]]+"-"+y[t[r+4]]+y[t[r+5]]+"-"+y[t[r+6]]+y[t[r+7]]+"-"+y[t[r+8]]+y[t[r+9]]+"-"+y[t[r+10]]+y[t[r+11]]+y[t[r+12]]+y[t[r+13]]+y[t[r+14]]+y[t[r+15]]).toLowerCase()}const L=new Uint8Array(16);function U(){return crypto.getRandomValues(L)}function k(t,r,n){return crypto.randomUUID?crypto.randomUUID():N(t)}function N(t,r,n){t=t||{};const u=t.random??t.rng?.()??U();if(u.length<16)throw new Error("Random bytes length must be >= 16");return u[6]=u[6]&15|64,u[8]=u[8]&63|128,A(u)}const T="init_execute",q="modulepreload",R=function(t){return"/"+t},C={},x=function(r,n,u){let s=Promise.resolve();if(n&&n.length>0){let w=function(d){return Promise.all(d.map(l=>Promise.resolve(l).then(c=>({status:"fulfilled",value:c}),c=>({status:"rejected",reason:c}))))};var m=w;document.getElementsByTagName("link");const h=document.querySelector("meta[property=csp-nonce]"),g=h?.nonce||h?.getAttribute("nonce");s=w(n.map(d=>{if(d=R(d),d in C)return;C[d]=!0;const l=d.endsWith(".css"),c=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${d}"]${c}`))return;const v=document.createElement("link");if(v.rel=l?"stylesheet":q,l||(v.as="script"),v.crossOrigin="",v.href=d,g&&v.setAttribute("nonce",g),document.head.appendChild(v),l)return new Promise((P,E)=>{v.addEventListener("load",P),v.addEventListener("error",()=>E(new Error(`Unable to preload CSS for ${d}`)))})}))}function a(h){const g=new Event("vite:preloadError",{cancelable:!0});if(g.payload=h,window.dispatchEvent(g),!g.defaultPrevented)throw h}return s.then(h=>{for(const g of h||[])g.status==="rejected"&&a(g.reason);return r().catch(a)})};var I;(function(t){t.INTROSPECTION="introspection",t.QUERY="query",t.SUBSCRIPTION="subscription"})(I||(I={}));class M{}var S={exports:{}},D=S.exports,b;function $(){return b||(b=1,(function(t){(function(r,n){t.exports=n()})(D,function(){var r=Object.prototype.toString;function n(l,c){return l==null?!1:Object.prototype.hasOwnProperty.call(l,c)}function u(l){if(!l||m(l)&&l.length===0)return!0;if(typeof l!="string"){for(var c in l)if(n(l,c))return!1;return!0}return!1}function s(l){return r.call(l)}function a(l){return typeof l=="object"&&s(l)==="[object Object]"}var m=Array.isArray||function(l){return r.call(l)==="[object Array]"};function h(l){return typeof l=="boolean"||s(l)==="[object Boolean]"}function g(l){var c=parseInt(l);return c.toString()===l?c:l}function w(l){l=l||{};var c=function(i){return Object.keys(c).reduce(function(e,o){return o==="create"||typeof c[o]=="function"&&(e[o]=c[o].bind(c,i)),e},{})},v;l.includeInheritedProps?v=function(){return!0}:v=function(i,e){return typeof e=="number"&&Array.isArray(i)||n(i,e)};function P(i,e){if(v(i,e))return i[e]}function E(i,e,o,f){if(typeof e=="number"&&(e=[e]),!e||e.length===0)return i;if(typeof e=="string")return E(i,e.split(".").map(g),o,f);var p=e[0],_=P(i,p);if(l.includeInheritedProps&&(p==="__proto__"||p==="constructor"&&typeof _=="function"))throw new Error("For security reasons, object's magic properties cannot be set");return e.length===1?((_===void 0||!f)&&(i[p]=o),_):(_===void 0&&(typeof e[1]=="number"?i[p]=[]:i[p]={}),E(i[p],e.slice(1),o,f))}return c.has=function(i,e){if(typeof e=="number"?e=[e]:typeof e=="string"&&(e=e.split(".")),!e||e.length===0)return!!i;for(var o=0;o<e.length;o++){var f=g(e[o]);if(typeof f=="number"&&m(i)&&f<i.length||(l.includeInheritedProps?f in Object(i):n(i,f)))i=i[f];else return!1}return!0},c.ensureExists=function(i,e,o){return E(i,e,o,!0)},c.set=function(i,e,o,f){return E(i,e,o,f)},c.insert=function(i,e,o,f){var p=c.get(i,e);f=~~f,m(p)||(p=[],c.set(i,e,p)),p.splice(f,0,o)},c.empty=function(i,e){if(!u(e)&&i!=null){var o,f;if(o=c.get(i,e)){if(typeof o=="string")return c.set(i,e,"");if(h(o))return c.set(i,e,!1);if(typeof o=="number")return c.set(i,e,0);if(m(o))o.length=0;else if(a(o))for(f in o)v(o,f)&&delete o[f];else return c.set(i,e,null)}}},c.push=function(i,e){var o=c.get(i,e);m(o)||(o=[],c.set(i,e,o)),o.push.apply(o,Array.prototype.slice.call(arguments,2))},c.coalesce=function(i,e,o){for(var f,p=0,_=e.length;p<_;p++)if((f=c.get(i,e[p]))!==void 0)return f;return o},c.get=function(i,e,o){if(typeof e=="number"&&(e=[e]),!e||e.length===0)return i;if(i==null)return o;if(typeof e=="string")return c.get(i,e.split("."),o);var f=g(e[0]),p=P(i,f);return p===void 0?o:e.length===1?p:c.get(i[f],e.slice(1),o)},c.del=function(e,o){if(typeof o=="number"&&(o=[o]),e==null||u(o))return e;if(typeof o=="string")return c.del(e,o.split("."));var f=g(o[0]);if(!v(e,f))return e;if(o.length===1)m(e)?e.splice(f,1):delete e[f];else return c.del(e[f],o.slice(1));return e},c}var d=w();return d.create=w,d.withInheritedProps=w({includeInheritedProps:!0}),d})})(S)),S.exports}var O=$();const B={atob:{async exec(){return(await x(async()=>{const{atob:t}=await import("./index-D_C6pEAs.js").then(r=>r.i);return{atob:t}},[])).atob}},btoa:{async exec(){return(await x(async()=>{const{btoa:t}=await import("./index-D_C6pEAs.js").then(r=>r.i);return{btoa:t}},[])).btoa}},"crypto-js":{async exec(){return(await x(async()=>{const{default:t}=await import("./index-CT51TZmB.js").then(r=>r.i);return{default:t}},[])).default}}},W=t=>{if(t.response)return{body:t.response.body,requestType:t.requestType??I.QUERY,responseTime:t.response.responseTime,statusCode:t.response.status,headers:t.response.headers}},J=async t=>{const r=B[t];if(!r)throw new Error(`No request script module found matching "${t}"`);return r.exec()},F=(t,r)=>({data:t,helpers:{getEnvironment:n=>O.get(t.environment,n),setEnvironment:(n,u,s=!1)=>{O.set(t.environment,n,u),s&&(t.__toSetActiveEnvironment=t.__toSetActiveEnvironment??{},O.set(t.__toSetActiveEnvironment,n,u))},getCookie:n=>t.__cookieJar?.[n]??"",setCookie:(n,u,s)=>{r.setCookie(n,u,s)},request:async(n,u,s)=>r.request(n,u,s)},storage:{get:n=>r.getStorageItem(n),set:(n,u)=>r.setStorageItem(n,u)},importModule:n=>J(n),response:W(t),log:n=>{t.requestScriptLogs=t.requestScriptLogs??[],t.requestScriptLogs.push({id:crypto.randomUUID(),time:Date.now(),text:JSON.stringify(n,null,2),source:"Request script"})}}),H=["setCookie","request","getStorageItem","setStorageItem"];class K{constructor(r){this.worker=r}start(){this.worker.onMessage(async r=>{switch(r.type){case T:try{await this.initExecute(r.payload)}catch(n){await this.makeCall("scriptError",n)}break}})}async initExecute(r){const[n,u]=r,s=await new Promise((a,m)=>{this.worker.onError(d=>{m(d)});const h=JSON.parse(JSON.stringify(u)),g=H.reduce((d,l)=>(d[l]=((...c)=>this.makeCall(l,...c)),d),{}),w={altair:F(h,g),alert:d=>this.makeCall("alert",d)};return this.evalWithContext(n,w).then(d=>a(d)).catch(d=>{m(d)})});s.__toSetActiveEnvironment&&this.makeCall("updateActiveEnvironment",s.__toSetActiveEnvironment),this.makeCall("executeComplete",s)}makeCall(r,...n){return new Promise((u,s)=>{const a=k();this.worker.onMessage(m=>{switch(m.type){case`${r}_response`:return m.payload.id!==a?void 0:u(m.payload.response);case`${r}_error`:return m.payload.id!==a?void 0:s(m.payload.error)}}),this.worker.send(r,{id:a,args:n})})}async evalWithContext(r,n){const u=Object.entries(n);return(0,eval)(`
2
+ async (${u.map(a=>a[0]).join(",")}) => {
3
+ ${r};
4
+ return altair.data;
5
+ }
6
+ `)(...u.map(a=>a[1]))}}class Q extends M{origin;constructor(){super();const n=new URLSearchParams(window.location.search).get("sc");if(!n)throw new Error("Invalid source provided!");this.origin=n}onMessage(r){window.addEventListener("message",n=>{n.origin===this.origin&&r(n.data)})}send(r,n){window.parent.postMessage({type:r,payload:n},this.origin)}onError(r){window.addEventListener("error",r),window.addEventListener("unhandledrejection",n=>{n.preventDefault(),r(n.reason)})}}const V=t=>new Promise((r,n)=>{const u=document.getElementsByTagName("head")[0];if(!u)return n(new Error("No head found!"));const s=document.createElement("script");s.type="text/javascript",s.src=t,s.onload=()=>r(null),s.onerror=a=>n(a),u.appendChild(s)}),Y=t=>new Promise((r,n)=>{const u=document.getElementsByTagName("head")[0];if(!u)return n(new Error("No head found!"));const s=document.createElement("link");s.type="text/css",s.rel="stylesheet",s.href=t,s.onload=()=>r(null),s.onerror=a=>n(a),u.appendChild(s)}),G=async()=>{const r=new URLSearchParams(window.location.search).get("plugin_sandbox_opts"),n=r?JSON.parse(r):void 0;if(!n)throw new Error("Invalid plugin options provided!");if(n.type!=="scripts")throw new Error("Invalid plugin option type provided!");if(document.querySelectorAll('style,link[rel="stylesheet"]').forEach(u=>u.remove()),n.styleUrls)for(const u of n.styleUrls)await Y(u);if(n.scriptUrls)for(const u of n.scriptUrls)await V(u)},X=new URLSearchParams(window.location.search),z=X.get("sandbox_type");z==="plugin"?G():new K(new Q).start();
@@ -6,7 +6,7 @@
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <base href="./" />
8
8
  <title>Altair Sandbox</title>
9
- <script type="module" crossorigin src="./assets/index-DL_PXIxX.js"></script>
9
+ <script type="module" crossorigin src="./assets/index-DN1P4DX8.js"></script>
10
10
  <link rel="stylesheet" crossorigin href="./assets/index-BVhbkyeN.css">
11
11
  </head>
12
12
  <body>
@@ -1,5 +1,5 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c052d081-fca0-5b01-9e73-b94a6b4501e4")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="289af014-1cd4-5e61-80a0-19635891d1e5")}catch(e){}}();
3
3
  import{a as _oe,b as Coe,c as woe,d as boe,e as Soe,f as xoe,g as koe,h as Toe,j as Ooe,k as Doe}from"./chunk-HMR5CY6K.js";import{a as Fr,c as Uu,d as kNe,e as TNe,f as ONe}from"./chunk-GC5A67L5.js";import{a as Moe}from"./chunk-ANLTCLUB.js";import{a as Tre}from"./chunk-KL6P4JEZ.js";import{a as Ore}from"./chunk-TP45OAWA.js";import{a as Ere}from"./chunk-MLNN63DH.js";import{a as Mre}from"./chunk-Q5PBMANM.js";import{a as Je,b as fs,c as Vr,d as Sre,e as I4,f as j9,g as ir,h as Sm,i as xre,j as $d,k as Qu,l as zs,m as kre}from"./chunk-74A26AAT.js";import{a as yN,b as Eoe}from"./chunk-RFFTRMGK.js";import{$ as Wre,A as Hre,Aa as poe,B as W9,Ba as FNe,C as jre,Ca as foe,D as Ov,Da as moe,E as $re,Ea as goe,F as Y9,Fa as yoe,G as fp,Ga as gN,H as G9,I as mp,Ia as voe,J as gp,Ja as As,K as Z9,L as km,M as z4,O as ANe,P as qre,S as A4,T as Ure,U as Qre,V as PNe,X as yp,Y as Ev,Z as Mv,_ as Dv,a as Dre,aa as RNe,b as xr,ba as Yre,c as MNe,ca as Gre,d as qd,da as NNe,e as Ire,ea as X9,f as DNe,fa as LNe,g as mN,ga as K9,h as INe,ha as Zre,i as $9,j as zNe,ja as Xre,ka as Kre,l as Are,la as Jre,m as Pre,ma as eoe,n as Rre,na as toe,o as xv,oa as noe,p as Nre,pa as ioe,q as q9,qa as roe,r as U9,ra as ooe,s as Lre,sa as soe,t as kv,ta as aoe,u as Fre,ua as loe,v as Tv,va as coe,w as Q9,wa as uoe,x as Vre,xa as doe,y as Wu,ya as hoe,z as Bre,za as J9}from"./chunk-PJ3NZ7HS.js";import{a as Ln,c as fN,d as ENe,q as zre,r as tf,v as xm}from"./chunk-ZYOLZTH5.js";import{$ as cN,A as bm,B as Ga,C as Hu,D as en,E as F9,F as wre,G as _n,H as xt,I as D4,J as ya,K as Bn,L as rN,M as sc,N as oN,O as Hd,P as V9,Q as Ct,R as sN,S as ju,T as ac,U as aN,V as Hn,W as lN,X as va,Y as jc,Z as B9,_ as H9,a as Ti,aa as uN,b as Cv,ba as ef,c as Zn,ca as dN,d as N9,da as Oo,e as wv,ea as pp,f as fe,fa as jd,g as an,ga as $u,h as Qi,ha as qu,i as Cm,ia as bre,j as L9,ja as qn,k as wm,ka as Ae,l as ut,la as se,ma as hN,na as In,oa as pN,p as bv,pa as An,q as kn,r as rt,s as hp,t as ga,u as Cre,v as ps,w as Sv,x as ze,y as Wi,z as Oi}from"./chunk-472WPQLO.js";import{a as k,b as q,c as _v,d as $o,f as we,h as Ci,i as iN,j as G}from"./chunk-B7YGBANW.js";var Gde=we((nH,iH)=>{"use strict";(function(n,t){typeof define=="function"&&define.amd?define([],t):typeof nH<"u"?t():(t(),n.FileSaver={})})(nH,function(){"use strict";function n(s,a){return typeof a>"u"?a={autoBom:!1}:typeof a!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),a={autoBom:!a}),a.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(s.type)?new Blob(["\uFEFF",s],{type:s.type}):s}function t(s,a,l){var c=new XMLHttpRequest;c.open("GET",s),c.responseType="blob",c.onload=function(){o(c.response,a,l)},c.onerror=function(){console.error("could not download file")},c.send()}function e(s){var a=new XMLHttpRequest;a.open("HEAD",s,!1);try{a.send()}catch{}return 200<=a.status&&299>=a.status}function i(s){try{s.dispatchEvent(new MouseEvent("click"))}catch{var a=document.createEvent("MouseEvents");a.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),s.dispatchEvent(a)}}var r=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:void 0,o=r.saveAs||(typeof window!="object"||window!==r?function(){}:"download"in HTMLAnchorElement.prototype?function(s,a,l){var c=r.URL||r.webkitURL,u=document.createElement("a");a=a||s.name||"download",u.download=a,u.rel="noopener",typeof s=="string"?(u.href=s,u.origin===location.origin?i(u):e(u.href)?t(s,a,l):i(u,u.target="_blank")):(u.href=c.createObjectURL(s),setTimeout(function(){c.revokeObjectURL(u.href)},4e4),setTimeout(function(){i(u)},0))}:"msSaveOrOpenBlob"in navigator?function(s,a,l){if(a=a||s.name||"download",typeof s!="string")navigator.msSaveOrOpenBlob(n(s,l),a);else if(e(s))t(s,a,l);else{var c=document.createElement("a");c.href=s,c.target="_blank",setTimeout(function(){i(c)})}}:function(s,a,l,c){if(c=c||open("","_blank"),c&&(c.document.title=c.document.body.innerText="downloading..."),typeof s=="string")return t(s,a,l);var u=s.type==="application/octet-stream",h=/constructor/i.test(r.HTMLElement)||r.safari,p=/CriOS\/[\d]+/.test(navigator.userAgent);if((p||u&&h)&&typeof FileReader=="object"){var f=new FileReader;f.onloadend=function(){var x=f.result;x=p?x:x.replace(/^data:[^;]*;/,"data:attachment/file;"),c?c.location.href=x:location=x,c=null},f.readAsDataURL(s)}else{var _=r.URL||r.webkitURL,w=_.createObjectURL(s);c?c.location=w:location.href=w,c=null,setTimeout(function(){_.revokeObjectURL(w)},4e4)}});r.saveAs=o.saveAs=o,typeof iH<"u"&&(iH.exports=o)})});var rH=we((Zde,xk)=>{"use strict";(function(n){"use strict";var t,e=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,i=Math.ceil,r=Math.floor,o="[BigNumber Error] ",s=o+"Number primitive has more than 15 significant digits: ",a=1e14,l=14,c=9007199254740991,u=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],h=1e7,p=1e9;function f(U){var B,K,$,J=nt.prototype={constructor:nt,toString:null,valueOf:null},Le=new nt(1),Q=20,ce=4,Pe=-7,ge=21,je=-1e7,de=1e7,Qe=!1,_t=1,Ot=0,Ft={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xA0",suffix:""},Sn="0123456789abcdefghijklmnopqrstuvwxyz",fi=!0;function nt(X,ne){var he,Ge,Me,We,et,ke,Fe,Xe,$e=this;if(!($e instanceof nt))return new nt(X,ne);if(ne==null){if(X&&X._isBigNumber===!0){$e.s=X.s,!X.c||X.e>de?$e.c=$e.e=null:X.e<je?$e.c=[$e.e=0]:($e.e=X.e,$e.c=X.c.slice());return}if((ke=typeof X=="number")&&X*0==0){if($e.s=1/X<0?(X=-X,-1):1,X===~~X){for(We=0,et=X;et>=10;et/=10,We++);We>de?$e.c=$e.e=null:($e.e=We,$e.c=[X]);return}Xe=String(X)}else{if(!e.test(Xe=String(X)))return $($e,Xe,ke);$e.s=Xe.charCodeAt(0)==45?(Xe=Xe.slice(1),-1):1}(We=Xe.indexOf("."))>-1&&(Xe=Xe.replace(".","")),(et=Xe.search(/e/i))>0?(We<0&&(We=et),We+=+Xe.slice(et+1),Xe=Xe.substring(0,et)):We<0&&(We=Xe.length)}else{if(T(ne,2,Sn.length,"Base"),ne==10&&fi)return $e=new nt(X),oi($e,Q+$e.e+1,ce);if(Xe=String(X),ke=typeof X=="number"){if(X*0!=0)return $($e,Xe,ke,ne);if($e.s=1/X<0?(Xe=Xe.slice(1),-1):1,nt.DEBUG&&Xe.replace(/^0\.0*|\./,"").length>15)throw Error(s+X)}else $e.s=Xe.charCodeAt(0)===45?(Xe=Xe.slice(1),-1):1;for(he=Sn.slice(0,ne),We=et=0,Fe=Xe.length;et<Fe;et++)if(he.indexOf(Ge=Xe.charAt(et))<0){if(Ge=="."){if(et>We){We=Fe;continue}}else if(!Me&&(Xe==Xe.toUpperCase()&&(Xe=Xe.toLowerCase())||Xe==Xe.toLowerCase()&&(Xe=Xe.toUpperCase()))){Me=!0,et=-1,We=0;continue}return $($e,String(X),ke,ne)}ke=!1,Xe=K(Xe,ne,10,$e.s),(We=Xe.indexOf("."))>-1?Xe=Xe.replace(".",""):We=Xe.length}for(et=0;Xe.charCodeAt(et)===48;et++);for(Fe=Xe.length;Xe.charCodeAt(--Fe)===48;);if(Xe=Xe.slice(et,++Fe)){if(Fe-=et,ke&&nt.DEBUG&&Fe>15&&(X>c||X!==r(X)))throw Error(s+$e.s*X);if((We=We-et-1)>de)$e.c=$e.e=null;else if(We<je)$e.c=[$e.e=0];else{if($e.e=We,$e.c=[],et=(We+1)%l,We<0&&(et+=l),et<Fe){for(et&&$e.c.push(+Xe.slice(0,et)),Fe-=l;et<Fe;)$e.c.push(+Xe.slice(et,et+=l));et=l-(Xe=Xe.slice(et)).length}else et-=Fe;for(;et--;Xe+="0");$e.c.push(+Xe)}}else $e.c=[$e.e=0]}nt.clone=f,nt.ROUND_UP=0,nt.ROUND_DOWN=1,nt.ROUND_CEIL=2,nt.ROUND_FLOOR=3,nt.ROUND_HALF_UP=4,nt.ROUND_HALF_DOWN=5,nt.ROUND_HALF_EVEN=6,nt.ROUND_HALF_CEIL=7,nt.ROUND_HALF_FLOOR=8,nt.EUCLID=9,nt.config=nt.set=function(X){var ne,he;if(X!=null)if(typeof X=="object"){if(X.hasOwnProperty(ne="DECIMAL_PLACES")&&(he=X[ne],T(he,0,p,ne),Q=he),X.hasOwnProperty(ne="ROUNDING_MODE")&&(he=X[ne],T(he,0,8,ne),ce=he),X.hasOwnProperty(ne="EXPONENTIAL_AT")&&(he=X[ne],he&&he.pop?(T(he[0],-p,0,ne),T(he[1],0,p,ne),Pe=he[0],ge=he[1]):(T(he,-p,p,ne),Pe=-(ge=he<0?-he:he))),X.hasOwnProperty(ne="RANGE"))if(he=X[ne],he&&he.pop)T(he[0],-p,-1,ne),T(he[1],1,p,ne),je=he[0],de=he[1];else if(T(he,-p,p,ne),he)je=-(de=he<0?-he:he);else throw Error(o+ne+" cannot be zero: "+he);if(X.hasOwnProperty(ne="CRYPTO"))if(he=X[ne],he===!!he)if(he)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))Qe=he;else throw Qe=!he,Error(o+"crypto unavailable");else Qe=he;else throw Error(o+ne+" not true or false: "+he);if(X.hasOwnProperty(ne="MODULO_MODE")&&(he=X[ne],T(he,0,9,ne),_t=he),X.hasOwnProperty(ne="POW_PRECISION")&&(he=X[ne],T(he,0,p,ne),Ot=he),X.hasOwnProperty(ne="FORMAT"))if(he=X[ne],typeof he=="object")Ft=he;else throw Error(o+ne+" not an object: "+he);if(X.hasOwnProperty(ne="ALPHABET"))if(he=X[ne],typeof he=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(he))fi=he.slice(0,10)=="0123456789",Sn=he;else throw Error(o+ne+" invalid: "+he)}else throw Error(o+"Object expected: "+X);return{DECIMAL_PLACES:Q,ROUNDING_MODE:ce,EXPONENTIAL_AT:[Pe,ge],RANGE:[je,de],CRYPTO:Qe,MODULO_MODE:_t,POW_PRECISION:Ot,FORMAT:Ft,ALPHABET:Sn}},nt.isBigNumber=function(X){if(!X||X._isBigNumber!==!0)return!1;if(!nt.DEBUG)return!0;var ne,he,Ge=X.c,Me=X.e,We=X.s;e:if({}.toString.call(Ge)=="[object Array]"){if((We===1||We===-1)&&Me>=-p&&Me<=p&&Me===r(Me)){if(Ge[0]===0){if(Me===0&&Ge.length===1)return!0;break e}if(ne=(Me+1)%l,ne<1&&(ne+=l),String(Ge[0]).length==ne){for(ne=0;ne<Ge.length;ne++)if(he=Ge[ne],he<0||he>=a||he!==r(he))break e;if(he!==0)return!0}}}else if(Ge===null&&Me===null&&(We===null||We===1||We===-1))return!0;throw Error(o+"Invalid BigNumber: "+X)},nt.maximum=nt.max=function(){return br(arguments,J.lt)},nt.minimum=nt.min=function(){return br(arguments,J.gt)},nt.random=(function(){var X=9007199254740992,ne=Math.random()*X&2097151?function(){return r(Math.random()*X)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(he){var Ge,Me,We,et,ke,Fe=0,Xe=[],$e=new nt(Le);if(he==null?he=Q:T(he,0,p),et=i(he/l),Qe)if(crypto.getRandomValues){for(Ge=crypto.getRandomValues(new Uint32Array(et*=2));Fe<et;)ke=Ge[Fe]*131072+(Ge[Fe+1]>>>11),ke>=9e15?(Me=crypto.getRandomValues(new Uint32Array(2)),Ge[Fe]=Me[0],Ge[Fe+1]=Me[1]):(Xe.push(ke%1e14),Fe+=2);Fe=et/2}else if(crypto.randomBytes){for(Ge=crypto.randomBytes(et*=7);Fe<et;)ke=(Ge[Fe]&31)*281474976710656+Ge[Fe+1]*1099511627776+Ge[Fe+2]*4294967296+Ge[Fe+3]*16777216+(Ge[Fe+4]<<16)+(Ge[Fe+5]<<8)+Ge[Fe+6],ke>=9e15?crypto.randomBytes(7).copy(Ge,Fe):(Xe.push(ke%1e14),Fe+=7);Fe=et/7}else throw Qe=!1,Error(o+"crypto unavailable");if(!Qe)for(;Fe<et;)ke=ne(),ke<9e15&&(Xe[Fe++]=ke%1e14);for(et=Xe[--Fe],he%=l,et&&he&&(ke=u[l-he],Xe[Fe]=r(et/ke)*ke);Xe[Fe]===0;Xe.pop(),Fe--);if(Fe<0)Xe=[We=0];else{for(We=-1;Xe[0]===0;Xe.splice(0,1),We-=l);for(Fe=1,ke=Xe[0];ke>=10;ke/=10,Fe++);Fe<l&&(We-=l-Fe)}return $e.e=We,$e.c=Xe,$e}})(),nt.sum=function(){for(var X=1,ne=arguments,he=new nt(ne[0]);X<ne.length;)he=he.plus(ne[X++]);return he},K=(function(){var X="0123456789";function ne(he,Ge,Me,We){for(var et,ke=[0],Fe,Xe=0,$e=he.length;Xe<$e;){for(Fe=ke.length;Fe--;ke[Fe]*=Ge);for(ke[0]+=We.indexOf(he.charAt(Xe++)),et=0;et<ke.length;et++)ke[et]>Me-1&&(ke[et+1]==null&&(ke[et+1]=0),ke[et+1]+=ke[et]/Me|0,ke[et]%=Me)}return ke.reverse()}return function(he,Ge,Me,We,et){var ke,Fe,Xe,$e,yt,fn,En,ki,Ri=he.indexOf("."),Sr=Q,Di=ce;for(Ri>=0&&($e=Ot,Ot=0,he=he.replace(".",""),ki=new nt(Ge),fn=ki.pow(he.length-Ri),Ot=$e,ki.c=ne(V(w(fn.c),fn.e,"0"),10,Me,X),ki.e=ki.c.length),En=ne(he,Ge,Me,et?(ke=Sn,X):(ke=X,Sn)),Xe=$e=En.length;En[--$e]==0;En.pop());if(!En[0])return ke.charAt(0);if(Ri<0?--Xe:(fn.c=En,fn.e=Xe,fn.s=We,fn=B(fn,ki,Sr,Di,Me),En=fn.c,yt=fn.r,Xe=fn.e),Fe=Xe+Sr+1,Ri=En[Fe],$e=Me/2,yt=yt||Fe<0||En[Fe+1]!=null,yt=Di<4?(Ri!=null||yt)&&(Di==0||Di==(fn.s<0?3:2)):Ri>$e||Ri==$e&&(Di==4||yt||Di==6&&En[Fe-1]&1||Di==(fn.s<0?8:7)),Fe<1||!En[0])he=yt?V(ke.charAt(1),-Sr,ke.charAt(0)):ke.charAt(0);else{if(En.length=Fe,yt)for(--Me;++En[--Fe]>Me;)En[Fe]=0,Fe||(++Xe,En=[1].concat(En));for($e=En.length;!En[--$e];);for(Ri=0,he="";Ri<=$e;he+=ke.charAt(En[Ri++]));he=V(he,Xe,ke.charAt(0))}return he}})(),B=(function(){function X(Ge,Me,We){var et,ke,Fe,Xe,$e=0,yt=Ge.length,fn=Me%h,En=Me/h|0;for(Ge=Ge.slice();yt--;)Fe=Ge[yt]%h,Xe=Ge[yt]/h|0,et=En*Fe+Xe*fn,ke=fn*Fe+et%h*h+$e,$e=(ke/We|0)+(et/h|0)+En*Xe,Ge[yt]=ke%We;return $e&&(Ge=[$e].concat(Ge)),Ge}function ne(Ge,Me,We,et){var ke,Fe;if(We!=et)Fe=We>et?1:-1;else for(ke=Fe=0;ke<We;ke++)if(Ge[ke]!=Me[ke]){Fe=Ge[ke]>Me[ke]?1:-1;break}return Fe}function he(Ge,Me,We,et){for(var ke=0;We--;)Ge[We]-=ke,ke=Ge[We]<Me[We]?1:0,Ge[We]=ke*et+Ge[We]-Me[We];for(;!Ge[0]&&Ge.length>1;Ge.splice(0,1));}return function(Ge,Me,We,et,ke){var Fe,Xe,$e,yt,fn,En,ki,Ri,Sr,Di,$i,es,cp,Vu,W1,Tl,Wa,Wt=Ge.s==Me.s?1:-1,Bo=Ge.c,lr=Me.c;if(!Bo||!Bo[0]||!lr||!lr[0])return new nt(!Ge.s||!Me.s||(Bo?lr&&Bo[0]==lr[0]:!lr)?NaN:Bo&&Bo[0]==0||!lr?Wt*0:Wt/0);for(Ri=new nt(Wt),Sr=Ri.c=[],Xe=Ge.e-Me.e,Wt=We+Xe+1,ke||(ke=a,Xe=_(Ge.e/l)-_(Me.e/l),Wt=Wt/l|0),$e=0;lr[$e]==(Bo[$e]||0);$e++);if(lr[$e]>(Bo[$e]||0)&&Xe--,Wt<0)Sr.push(1),yt=!0;else{for(Vu=Bo.length,Tl=lr.length,$e=0,Wt+=2,fn=r(ke/(lr[0]+1)),fn>1&&(lr=X(lr,fn,ke),Bo=X(Bo,fn,ke),Tl=lr.length,Vu=Bo.length),cp=Tl,Di=Bo.slice(0,Tl),$i=Di.length;$i<Tl;Di[$i++]=0);Wa=lr.slice(),Wa=[0].concat(Wa),W1=lr[0],lr[1]>=ke/2&&W1++;do{if(fn=0,Fe=ne(lr,Di,Tl,$i),Fe<0){if(es=Di[0],Tl!=$i&&(es=es*ke+(Di[1]||0)),fn=r(es/W1),fn>1)for(fn>=ke&&(fn=ke-1),En=X(lr,fn,ke),ki=En.length,$i=Di.length;ne(En,Di,ki,$i)==1;)fn--,he(En,Tl<ki?Wa:lr,ki,ke),ki=En.length,Fe=1;else fn==0&&(Fe=fn=1),En=lr.slice(),ki=En.length;if(ki<$i&&(En=[0].concat(En)),he(Di,En,$i,ke),$i=Di.length,Fe==-1)for(;ne(lr,Di,Tl,$i)<1;)fn++,he(Di,Tl<$i?Wa:lr,$i,ke),$i=Di.length}else Fe===0&&(fn++,Di=[0]);Sr[$e++]=fn,Di[0]?Di[$i++]=Bo[cp]||0:(Di=[Bo[cp]],$i=1)}while((cp++<Vu||Di[0]!=null)&&Wt--);yt=Di[0]!=null,Sr[0]||Sr.splice(0,1)}if(ke==a){for($e=1,Wt=Sr[0];Wt>=10;Wt/=10,$e++);oi(Ri,We+(Ri.e=$e+Xe*l-1)+1,et,yt)}else Ri.e=Xe,Ri.r=+yt;return Ri}})();function Yt(X,ne,he,Ge){var Me,We,et,ke,Fe;if(he==null?he=ce:T(he,0,8),!X.c)return X.toString();if(Me=X.c[0],et=X.e,ne==null)Fe=w(X.c),Fe=Ge==1||Ge==2&&(et<=Pe||et>=ge)?A(Fe,et):V(Fe,et,"0");else if(X=oi(new nt(X),ne,he),We=X.e,Fe=w(X.c),ke=Fe.length,Ge==1||Ge==2&&(ne<=We||We<=Pe)){for(;ke<ne;Fe+="0",ke++);Fe=A(Fe,We)}else if(ne-=et,Fe=V(Fe,We,"0"),We+1>ke){if(--ne>0)for(Fe+=".";ne--;Fe+="0");}else if(ne+=We-ke,ne>0)for(We+1==ke&&(Fe+=".");ne--;Fe+="0");return X.s<0&&Me?"-"+Fe:Fe}function br(X,ne){for(var he,Ge=1,Me=new nt(X[0]);Ge<X.length;Ge++)if(he=new nt(X[Ge]),he.s)ne.call(Me,he)&&(Me=he);else{Me=he;break}return Me}function ro(X,ne,he){for(var Ge=1,Me=ne.length;!ne[--Me];ne.pop());for(Me=ne[0];Me>=10;Me/=10,Ge++);return(he=Ge+he*l-1)>de?X.c=X.e=null:he<je?X.c=[X.e=0]:(X.e=he,X.c=ne),X}$=(function(){var X=/^(-?)0([xbo])(?=\w[\w.]*$)/i,ne=/^([^.]+)\.$/,he=/^\.([^.]+)$/,Ge=/^-?(Infinity|NaN)$/,Me=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(We,et,ke,Fe){var Xe,$e=ke?et:et.replace(Me,"");if(Ge.test($e))We.s=isNaN($e)?null:$e<0?-1:1;else{if(!ke&&($e=$e.replace(X,function(yt,fn,En){return Xe=(En=En.toLowerCase())=="x"?16:En=="b"?2:8,!Fe||Fe==Xe?fn:yt}),Fe&&(Xe=Fe,$e=$e.replace(ne,"$1").replace(he,"0.$1")),et!=$e))return new nt($e,Xe);if(nt.DEBUG)throw Error(o+"Not a"+(Fe?" base "+Fe:"")+" number: "+et);We.s=null}We.c=We.e=null}})();function oi(X,ne,he,Ge){var Me,We,et,ke,Fe,Xe,$e,yt=X.c,fn=u;if(yt){e:{for(Me=1,ke=yt[0];ke>=10;ke/=10,Me++);if(We=ne-Me,We<0)We+=l,et=ne,Fe=yt[Xe=0],$e=Fe/fn[Me-et-1]%10|0;else if(Xe=i((We+1)/l),Xe>=yt.length)if(Ge){for(;yt.length<=Xe;yt.push(0));Fe=$e=0,Me=1,We%=l,et=We-l+1}else break e;else{for(Fe=ke=yt[Xe],Me=1;ke>=10;ke/=10,Me++);We%=l,et=We-l+Me,$e=et<0?0:Fe/fn[Me-et-1]%10|0}if(Ge=Ge||ne<0||yt[Xe+1]!=null||(et<0?Fe:Fe%fn[Me-et-1]),Ge=he<4?($e||Ge)&&(he==0||he==(X.s<0?3:2)):$e>5||$e==5&&(he==4||Ge||he==6&&(We>0?et>0?Fe/fn[Me-et]:0:yt[Xe-1])%10&1||he==(X.s<0?8:7)),ne<1||!yt[0])return yt.length=0,Ge?(ne-=X.e+1,yt[0]=fn[(l-ne%l)%l],X.e=-ne||0):yt[0]=X.e=0,X;if(We==0?(yt.length=Xe,ke=1,Xe--):(yt.length=Xe+1,ke=fn[l-We],yt[Xe]=et>0?r(Fe/fn[Me-et]%fn[et])*ke:0),Ge)for(;;)if(Xe==0){for(We=1,et=yt[0];et>=10;et/=10,We++);for(et=yt[0]+=ke,ke=1;et>=10;et/=10,ke++);We!=ke&&(X.e++,yt[0]==a&&(yt[0]=1));break}else{if(yt[Xe]+=ke,yt[Xe]!=a)break;yt[Xe--]=0,ke=1}for(We=yt.length;yt[--We]===0;yt.pop());}X.e>de?X.c=X.e=null:X.e<je&&(X.c=[X.e=0])}return X}function Ht(X){var ne,he=X.e;return he===null?X.toString():(ne=w(X.c),ne=he<=Pe||he>=ge?A(ne,he):V(ne,he,"0"),X.s<0?"-"+ne:ne)}return J.absoluteValue=J.abs=function(){var X=new nt(this);return X.s<0&&(X.s=1),X},J.comparedTo=function(X,ne){return x(this,new nt(X,ne))},J.decimalPlaces=J.dp=function(X,ne){var he,Ge,Me,We=this;if(X!=null)return T(X,0,p),ne==null?ne=ce:T(ne,0,8),oi(new nt(We),X+We.e+1,ne);if(!(he=We.c))return null;if(Ge=((Me=he.length-1)-_(this.e/l))*l,Me=he[Me])for(;Me%10==0;Me/=10,Ge--);return Ge<0&&(Ge=0),Ge},J.dividedBy=J.div=function(X,ne){return B(this,new nt(X,ne),Q,ce)},J.dividedToIntegerBy=J.idiv=function(X,ne){return B(this,new nt(X,ne),0,1)},J.exponentiatedBy=J.pow=function(X,ne){var he,Ge,Me,We,et,ke,Fe,Xe,$e,yt=this;if(X=new nt(X),X.c&&!X.isInteger())throw Error(o+"Exponent not an integer: "+Ht(X));if(ne!=null&&(ne=new nt(ne)),ke=X.e>14,!yt.c||!yt.c[0]||yt.c[0]==1&&!yt.e&&yt.c.length==1||!X.c||!X.c[0])return $e=new nt(Math.pow(+Ht(yt),ke?2-z(X):+Ht(X))),ne?$e.mod(ne):$e;if(Fe=X.s<0,ne){if(ne.c?!ne.c[0]:!ne.s)return new nt(NaN);Ge=!Fe&&yt.isInteger()&&ne.isInteger(),Ge&&(yt=yt.mod(ne))}else{if(X.e>9&&(yt.e>0||yt.e<-1||(yt.e==0?yt.c[0]>1||ke&&yt.c[1]>=24e7:yt.c[0]<8e13||ke&&yt.c[0]<=9999975e7)))return We=yt.s<0&&z(X)?-0:0,yt.e>-1&&(We=1/We),new nt(Fe?1/We:We);Ot&&(We=i(Ot/l+2))}for(ke?(he=new nt(.5),Fe&&(X.s=1),Xe=z(X)):(Me=Math.abs(+Ht(X)),Xe=Me%2),$e=new nt(Le);;){if(Xe){if($e=$e.times(yt),!$e.c)break;We?$e.c.length>We&&($e.c.length=We):Ge&&($e=$e.mod(ne))}if(Me){if(Me=r(Me/2),Me===0)break;Xe=Me%2}else if(X=X.times(he),oi(X,X.e+1,1),X.e>14)Xe=z(X);else{if(Me=+Ht(X),Me===0)break;Xe=Me%2}yt=yt.times(yt),We?yt.c&&yt.c.length>We&&(yt.c.length=We):Ge&&(yt=yt.mod(ne))}return Ge?$e:(Fe&&($e=Le.div($e)),ne?$e.mod(ne):We?oi($e,Ot,ce,et):$e)},J.integerValue=function(X){var ne=new nt(this);return X==null?X=ce:T(X,0,8),oi(ne,ne.e+1,X)},J.isEqualTo=J.eq=function(X,ne){return x(this,new nt(X,ne))===0},J.isFinite=function(){return!!this.c},J.isGreaterThan=J.gt=function(X,ne){return x(this,new nt(X,ne))>0},J.isGreaterThanOrEqualTo=J.gte=function(X,ne){return(ne=x(this,new nt(X,ne)))===1||ne===0},J.isInteger=function(){return!!this.c&&_(this.e/l)>this.c.length-2},J.isLessThan=J.lt=function(X,ne){return x(this,new nt(X,ne))<0},J.isLessThanOrEqualTo=J.lte=function(X,ne){return(ne=x(this,new nt(X,ne)))===-1||ne===0},J.isNaN=function(){return!this.s},J.isNegative=function(){return this.s<0},J.isPositive=function(){return this.s>0},J.isZero=function(){return!!this.c&&this.c[0]==0},J.minus=function(X,ne){var he,Ge,Me,We,et=this,ke=et.s;if(X=new nt(X,ne),ne=X.s,!ke||!ne)return new nt(NaN);if(ke!=ne)return X.s=-ne,et.plus(X);var Fe=et.e/l,Xe=X.e/l,$e=et.c,yt=X.c;if(!Fe||!Xe){if(!$e||!yt)return $e?(X.s=-ne,X):new nt(yt?et:NaN);if(!$e[0]||!yt[0])return yt[0]?(X.s=-ne,X):new nt($e[0]?et:ce==3?-0:0)}if(Fe=_(Fe),Xe=_(Xe),$e=$e.slice(),ke=Fe-Xe){for((We=ke<0)?(ke=-ke,Me=$e):(Xe=Fe,Me=yt),Me.reverse(),ne=ke;ne--;Me.push(0));Me.reverse()}else for(Ge=(We=(ke=$e.length)<(ne=yt.length))?ke:ne,ke=ne=0;ne<Ge;ne++)if($e[ne]!=yt[ne]){We=$e[ne]<yt[ne];break}if(We&&(Me=$e,$e=yt,yt=Me,X.s=-X.s),ne=(Ge=yt.length)-(he=$e.length),ne>0)for(;ne--;$e[he++]=0);for(ne=a-1;Ge>ke;){if($e[--Ge]<yt[Ge]){for(he=Ge;he&&!$e[--he];$e[he]=ne);--$e[he],$e[Ge]+=a}$e[Ge]-=yt[Ge]}for(;$e[0]==0;$e.splice(0,1),--Xe);return $e[0]?ro(X,$e,Xe):(X.s=ce==3?-1:1,X.c=[X.e=0],X)},J.modulo=J.mod=function(X,ne){var he,Ge,Me=this;return X=new nt(X,ne),!Me.c||!X.s||X.c&&!X.c[0]?new nt(NaN):!X.c||Me.c&&!Me.c[0]?new nt(Me):(_t==9?(Ge=X.s,X.s=1,he=B(Me,X,0,3),X.s=Ge,he.s*=Ge):he=B(Me,X,0,_t),X=Me.minus(he.times(X)),!X.c[0]&&_t==1&&(X.s=Me.s),X)},J.multipliedBy=J.times=function(X,ne){var he,Ge,Me,We,et,ke,Fe,Xe,$e,yt,fn,En,ki,Ri,Sr,Di=this,$i=Di.c,es=(X=new nt(X,ne)).c;if(!$i||!es||!$i[0]||!es[0])return!Di.s||!X.s||$i&&!$i[0]&&!es||es&&!es[0]&&!$i?X.c=X.e=X.s=null:(X.s*=Di.s,!$i||!es?X.c=X.e=null:(X.c=[0],X.e=0)),X;for(Ge=_(Di.e/l)+_(X.e/l),X.s*=Di.s,Fe=$i.length,yt=es.length,Fe<yt&&(ki=$i,$i=es,es=ki,Me=Fe,Fe=yt,yt=Me),Me=Fe+yt,ki=[];Me--;ki.push(0));for(Ri=a,Sr=h,Me=yt;--Me>=0;){for(he=0,fn=es[Me]%Sr,En=es[Me]/Sr|0,et=Fe,We=Me+et;We>Me;)Xe=$i[--et]%Sr,$e=$i[et]/Sr|0,ke=En*Xe+$e*fn,Xe=fn*Xe+ke%Sr*Sr+ki[We]+he,he=(Xe/Ri|0)+(ke/Sr|0)+En*$e,ki[We--]=Xe%Ri;ki[We]=he}return he?++Ge:ki.splice(0,1),ro(X,ki,Ge)},J.negated=function(){var X=new nt(this);return X.s=-X.s||null,X},J.plus=function(X,ne){var he,Ge=this,Me=Ge.s;if(X=new nt(X,ne),ne=X.s,!Me||!ne)return new nt(NaN);if(Me!=ne)return X.s=-ne,Ge.minus(X);var We=Ge.e/l,et=X.e/l,ke=Ge.c,Fe=X.c;if(!We||!et){if(!ke||!Fe)return new nt(Me/0);if(!ke[0]||!Fe[0])return Fe[0]?X:new nt(ke[0]?Ge:Me*0)}if(We=_(We),et=_(et),ke=ke.slice(),Me=We-et){for(Me>0?(et=We,he=Fe):(Me=-Me,he=ke),he.reverse();Me--;he.push(0));he.reverse()}for(Me=ke.length,ne=Fe.length,Me-ne<0&&(he=Fe,Fe=ke,ke=he,ne=Me),Me=0;ne;)Me=(ke[--ne]=ke[ne]+Fe[ne]+Me)/a|0,ke[ne]=a===ke[ne]?0:ke[ne]%a;return Me&&(ke=[Me].concat(ke),++et),ro(X,ke,et)},J.precision=J.sd=function(X,ne){var he,Ge,Me,We=this;if(X!=null&&X!==!!X)return T(X,1,p),ne==null?ne=ce:T(ne,0,8),oi(new nt(We),X,ne);if(!(he=We.c))return null;if(Me=he.length-1,Ge=Me*l+1,Me=he[Me]){for(;Me%10==0;Me/=10,Ge--);for(Me=he[0];Me>=10;Me/=10,Ge++);}return X&&We.e+1>Ge&&(Ge=We.e+1),Ge},J.shiftedBy=function(X){return T(X,-c,c),this.times("1e"+X)},J.squareRoot=J.sqrt=function(){var X,ne,he,Ge,Me,We=this,et=We.c,ke=We.s,Fe=We.e,Xe=Q+4,$e=new nt("0.5");if(ke!==1||!et||!et[0])return new nt(!ke||ke<0&&(!et||et[0])?NaN:et?We:1/0);if(ke=Math.sqrt(+Ht(We)),ke==0||ke==1/0?(ne=w(et),(ne.length+Fe)%2==0&&(ne+="0"),ke=Math.sqrt(+ne),Fe=_((Fe+1)/2)-(Fe<0||Fe%2),ke==1/0?ne="5e"+Fe:(ne=ke.toExponential(),ne=ne.slice(0,ne.indexOf("e")+1)+Fe),he=new nt(ne)):he=new nt(ke+""),he.c[0]){for(Fe=he.e,ke=Fe+Xe,ke<3&&(ke=0);;)if(Me=he,he=$e.times(Me.plus(B(We,Me,Xe,1))),w(Me.c).slice(0,ke)===(ne=w(he.c)).slice(0,ke))if(he.e<Fe&&--ke,ne=ne.slice(ke-3,ke+1),ne=="9999"||!Ge&&ne=="4999"){if(!Ge&&(oi(Me,Me.e+Q+2,0),Me.times(Me).eq(We))){he=Me;break}Xe+=4,ke+=4,Ge=1}else{(!+ne||!+ne.slice(1)&&ne.charAt(0)=="5")&&(oi(he,he.e+Q+2,1),X=!he.times(he).eq(We));break}}return oi(he,he.e+Q+1,ce,X)},J.toExponential=function(X,ne){return X!=null&&(T(X,0,p),X++),Yt(this,X,ne,1)},J.toFixed=function(X,ne){return X!=null&&(T(X,0,p),X=X+this.e+1),Yt(this,X,ne)},J.toFormat=function(X,ne,he){var Ge,Me=this;if(he==null)X!=null&&ne&&typeof ne=="object"?(he=ne,ne=null):X&&typeof X=="object"?(he=X,X=ne=null):he=Ft;else if(typeof he!="object")throw Error(o+"Argument not an object: "+he);if(Ge=Me.toFixed(X,ne),Me.c){var We,et=Ge.split("."),ke=+he.groupSize,Fe=+he.secondaryGroupSize,Xe=he.groupSeparator||"",$e=et[0],yt=et[1],fn=Me.s<0,En=fn?$e.slice(1):$e,ki=En.length;if(Fe&&(We=ke,ke=Fe,Fe=We,ki-=We),ke>0&&ki>0){for(We=ki%ke||ke,$e=En.substr(0,We);We<ki;We+=ke)$e+=Xe+En.substr(We,ke);Fe>0&&($e+=Xe+En.slice(We)),fn&&($e="-"+$e)}Ge=yt?$e+(he.decimalSeparator||"")+((Fe=+he.fractionGroupSize)?yt.replace(new RegExp("\\d{"+Fe+"}\\B","g"),"$&"+(he.fractionGroupSeparator||"")):yt):$e}return(he.prefix||"")+Ge+(he.suffix||"")},J.toFraction=function(X){var ne,he,Ge,Me,We,et,ke,Fe,Xe,$e,yt,fn,En=this,ki=En.c;if(X!=null&&(ke=new nt(X),!ke.isInteger()&&(ke.c||ke.s!==1)||ke.lt(Le)))throw Error(o+"Argument "+(ke.isInteger()?"out of range: ":"not an integer: ")+Ht(ke));if(!ki)return new nt(En);for(ne=new nt(Le),Xe=he=new nt(Le),Ge=Fe=new nt(Le),fn=w(ki),We=ne.e=fn.length-En.e-1,ne.c[0]=u[(et=We%l)<0?l+et:et],X=!X||ke.comparedTo(ne)>0?We>0?ne:Xe:ke,et=de,de=1/0,ke=new nt(fn),Fe.c[0]=0;$e=B(ke,ne,0,1),Me=he.plus($e.times(Ge)),Me.comparedTo(X)!=1;)he=Ge,Ge=Me,Xe=Fe.plus($e.times(Me=Xe)),Fe=Me,ne=ke.minus($e.times(Me=ne)),ke=Me;return Me=B(X.minus(he),Ge,0,1),Fe=Fe.plus(Me.times(Xe)),he=he.plus(Me.times(Ge)),Fe.s=Xe.s=En.s,We=We*2,yt=B(Xe,Ge,We,ce).minus(En).abs().comparedTo(B(Fe,he,We,ce).minus(En).abs())<1?[Xe,Ge]:[Fe,he],de=et,yt},J.toNumber=function(){return+Ht(this)},J.toPrecision=function(X,ne){return X!=null&&T(X,1,p),Yt(this,X,ne,2)},J.toString=function(X){var ne,he=this,Ge=he.s,Me=he.e;return Me===null?Ge?(ne="Infinity",Ge<0&&(ne="-"+ne)):ne="NaN":(X==null?ne=Me<=Pe||Me>=ge?A(w(he.c),Me):V(w(he.c),Me,"0"):X===10&&fi?(he=oi(new nt(he),Q+Me+1,ce),ne=V(w(he.c),he.e,"0")):(T(X,2,Sn.length,"Base"),ne=K(V(w(he.c),Me,"0"),10,X,Ge,!0)),Ge<0&&he.c[0]&&(ne="-"+ne)),ne},J.valueOf=J.toJSON=function(){return Ht(this)},J._isBigNumber=!0,U!=null&&nt.set(U),nt}function _(U){var B=U|0;return U>0||U===B?B:B-1}function w(U){for(var B,K,$=1,J=U.length,Le=U[0]+"";$<J;){for(B=U[$++]+"",K=l-B.length;K--;B="0"+B);Le+=B}for(J=Le.length;Le.charCodeAt(--J)===48;);return Le.slice(0,J+1||1)}function x(U,B){var K,$,J=U.c,Le=B.c,Q=U.s,ce=B.s,Pe=U.e,ge=B.e;if(!Q||!ce)return null;if(K=J&&!J[0],$=Le&&!Le[0],K||$)return K?$?0:-ce:Q;if(Q!=ce)return Q;if(K=Q<0,$=Pe==ge,!J||!Le)return $?0:!J^K?1:-1;if(!$)return Pe>ge^K?1:-1;for(ce=(Pe=J.length)<(ge=Le.length)?Pe:ge,Q=0;Q<ce;Q++)if(J[Q]!=Le[Q])return J[Q]>Le[Q]^K?1:-1;return Pe==ge?0:Pe>ge^K?1:-1}function T(U,B,K,$){if(U<B||U>K||U!==r(U))throw Error(o+($||"Argument")+(typeof U=="number"?U<B||U>K?" out of range: ":" not an integer: ":" not a primitive number: ")+String(U))}function z(U){var B=U.c.length-1;return _(U.e/l)==B&&U.c[B]%2!=0}function A(U,B){return(U.length>1?U.charAt(0)+"."+U.slice(1):U)+(B<0?"e":"e+")+B}function V(U,B,K){var $,J;if(B<0){for(J=K+".";++B;J+=K);U=J+U}else if($=U.length,++B>$){for(J=K,B-=$;--B;J+=K);U+=J}else B<$&&(U=U.slice(0,B)+"."+U.slice(B));return U}t=f(),t.default=t.BigNumber=t,typeof define=="function"&&define.amd?define(function(){return t}):typeof xk<"u"&&xk.exports?xk.exports=t:(n||(n=typeof self<"u"&&self?self:window),n.BigNumber=t)})(Zde)});var ehe=we((sUt,Jde)=>{"use strict";var Xde=rH(),Kde=Jde.exports;(function(){"use strict";function n(c){return c<10?"0"+c:c}var t=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,i,r,o={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},s;function a(c){return e.lastIndex=0,e.test(c)?'"'+c.replace(e,function(u){var h=o[u];return typeof h=="string"?h:"\\u"+("0000"+u.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+c+'"'}function l(c,u){var h,p,f,_,w=i,x,T=u[c],z=T!=null&&(T instanceof Xde||Xde.isBigNumber(T));switch(T&&typeof T=="object"&&typeof T.toJSON=="function"&&(T=T.toJSON(c)),typeof s=="function"&&(T=s.call(u,c,T)),typeof T){case"string":return z?T:a(T);case"number":return isFinite(T)?String(T):"null";case"boolean":case"null":case"bigint":return String(T);case"object":if(!T)return"null";if(i+=r,x=[],Object.prototype.toString.apply(T)==="[object Array]"){for(_=T.length,h=0;h<_;h+=1)x[h]=l(h,T)||"null";return f=x.length===0?"[]":i?`[
4
4
  `+i+x.join(`,
5
5
  `+i)+`
@@ -87,7 +87,7 @@ Consider to rely on 'then' or 'done' mode instead.`);_&&(delete e[o],i[o]=f,t.em
87
87
  `).forEach(e=>{let i=e.indexOf(":");if(i>0){let r=e.slice(0,i),o=e.slice(i+1).trim();this.addHeaderEntry(r,o)}})}:typeof Headers<"u"&&t instanceof Headers?(this.headers=new Map,t.forEach((e,i)=>{this.addHeaderEntry(i,e)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(t).forEach(([e,i])=>{this.setHeaderEntries(e,i)})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();let e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,e){return this.clone({name:t,value:e,op:"a"})}set(t,e){return this.clone({name:t,value:e,op:"s"})}delete(t,e){return this.clone({name:t,value:e,op:"d"})}maybeSetNormalizedName(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)}init(){this.lazyInit&&(this.lazyInit instanceof n?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init(),Array.from(t.headers.keys()).forEach(e=>{this.headers.set(e,t.headers.get(e)),this.normalizedNames.set(e,t.normalizedNames.get(e))})}clone(t){let e=new n;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof n?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([t]),e}applyUpdate(t){let e=t.name.toLowerCase();switch(t.op){case"a":case"s":let i=t.value;if(typeof i=="string"&&(i=[i]),i.length===0)return;this.maybeSetNormalizedName(t.name,e);let r=(t.op==="a"?this.headers.get(e):void 0)||[];r.push(...i),this.headers.set(e,r);break;case"d":let o=t.value;if(!o)this.headers.delete(e),this.normalizedNames.delete(e);else{let s=this.headers.get(e);if(!s)return;s=s.filter(a=>o.indexOf(a)===-1),s.length===0?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,s)}break}}addHeaderEntry(t,e){let i=t.toLowerCase();this.maybeSetNormalizedName(t,i),this.headers.has(i)?this.headers.get(i).push(e):this.headers.set(i,[e])}setHeaderEntries(t,e){let i=(Array.isArray(e)?e:[e]).map(o=>o.toString()),r=t.toLowerCase();this.headers.set(r,i),this.maybeSetNormalizedName(t,r)}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>t(this.normalizedNames.get(e),this.headers.get(e)))}};var Ux=class{encodeKey(t){return Vue(t)}encodeValue(t){return Vue(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}};function f$e(n,t){let e=new Map;return n.length>0&&n.replace(/^\?/,"").split("&").forEach(r=>{let o=r.indexOf("="),[s,a]=o==-1?[t.decodeKey(r),""]:[t.decodeKey(r.slice(0,o)),t.decodeValue(r.slice(o+1))],l=e.get(s)||[];l.push(a),e.set(s,l)}),e}var m$e=/%(\d[a-f0-9])/gi,g$e={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function Vue(n){return encodeURIComponent(n).replace(m$e,(t,e)=>g$e[e]??t)}function qx(n){return`${n}`}var Rp=class n{map;encoder;updates=null;cloneFrom=null;constructor(t={}){if(this.encoder=t.encoder||new Ux,t.fromString){if(t.fromObject)throw new lt(2805,!1);this.map=f$e(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(e=>{let i=t.fromObject[e],r=Array.isArray(i)?i.map(qx):[qx(i)];this.map.set(e,r)})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();let e=this.map.get(t);return e?e[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,e){return this.clone({param:t,value:e,op:"a"})}appendAll(t){let e=[];return Object.keys(t).forEach(i=>{let r=t[i];Array.isArray(r)?r.forEach(o=>{e.push({param:i,value:o,op:"a"})}):e.push({param:i,value:r,op:"a"})}),this.clone(e)}set(t,e){return this.clone({param:t,value:e,op:"s"})}delete(t,e){return this.clone({param:t,value:e,op:"d"})}toString(){return this.init(),this.keys().map(t=>{let e=this.encoder.encodeKey(t);return this.map.get(t).map(i=>e+"="+this.encoder.encodeValue(i)).join("&")}).filter(t=>t!=="").join("&")}clone(t){let e=new n({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(t),e}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(t=>this.map.set(t,this.cloneFrom.map.get(t))),this.updates.forEach(t=>{switch(t.op){case"a":case"s":let e=(t.op==="a"?this.map.get(t.param):void 0)||[];e.push(qx(t.value)),this.map.set(t.param,e);break;case"d":if(t.value!==void 0){let i=this.map.get(t.param)||[],r=i.indexOf(qx(t.value));r!==-1&&i.splice(r,1),i.length>0?this.map.set(t.param,i):this.map.delete(t.param)}else{this.map.delete(t.param);break}}}),this.cloneFrom=this.updates=null)}};var Qx=class{map=new Map;set(t,e){return this.map.set(t,e),this}get(t){return this.map.has(t)||this.map.set(t,t.defaultValue()),this.map.get(t)}delete(t){return this.map.delete(t),this}has(t){return this.map.has(t)}keys(){return this.map.keys()}};function y$e(n){switch(n){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function Bue(n){return typeof ArrayBuffer<"u"&&n instanceof ArrayBuffer}function Hue(n){return typeof Blob<"u"&&n instanceof Blob}function jue(n){return typeof FormData<"u"&&n instanceof FormData}function v$e(n){return typeof URLSearchParams<"u"&&n instanceof URLSearchParams}var $ue="Content-Type",que="Accept",Que="X-Request-URL",Wue="text/plain",Yue="application/json",_$e=`${Yue}, ${Wue}, */*`,y3=class n{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;credentials;keepalive=!1;cache;priority;mode;redirect;referrer;integrity;responseType="json";method;params;urlWithParams;transferCache;timeout;constructor(t,e,i,r){this.url=e,this.method=t.toUpperCase();let o;if(y$e(this.method)||r?(this.body=i!==void 0?i:null,o=r):o=i,o){if(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,this.keepalive=!!o.keepalive,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params),o.priority&&(this.priority=o.priority),o.cache&&(this.cache=o.cache),o.credentials&&(this.credentials=o.credentials),typeof o.timeout=="number"){if(o.timeout<1||!Number.isInteger(o.timeout))throw new lt(2822,"");this.timeout=o.timeout}o.mode&&(this.mode=o.mode),o.redirect&&(this.redirect=o.redirect),o.integrity&&(this.integrity=o.integrity),o.referrer&&(this.referrer=o.referrer),this.transferCache=o.transferCache}if(this.headers??=new ah,this.context??=new Qx,!this.params)this.params=new Rp,this.urlWithParams=e;else{let s=this.params.toString();if(s.length===0)this.urlWithParams=e;else{let a=e.indexOf("?"),l=a===-1?"?":a<e.length-1?"&":"";this.urlWithParams=e+l+s}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||Bue(this.body)||Hue(this.body)||jue(this.body)||v$e(this.body)?this.body:this.body instanceof Rp?this.body.toString():typeof this.body=="object"||typeof this.body=="boolean"||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return this.body===null||jue(this.body)?null:Hue(this.body)?this.body.type||null:Bue(this.body)?null:typeof this.body=="string"?Wue:this.body instanceof Rp?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?Yue:null}clone(t={}){let e=t.method||this.method,i=t.url||this.url,r=t.responseType||this.responseType,o=t.keepalive??this.keepalive,s=t.priority||this.priority,a=t.cache||this.cache,l=t.mode||this.mode,c=t.redirect||this.redirect,u=t.credentials||this.credentials,h=t.referrer||this.referrer,p=t.integrity||this.integrity,f=t.transferCache??this.transferCache,_=t.timeout??this.timeout,w=t.body!==void 0?t.body:this.body,x=t.withCredentials??this.withCredentials,T=t.reportProgress??this.reportProgress,z=t.headers||this.headers,A=t.params||this.params,V=t.context??this.context;return t.setHeaders!==void 0&&(z=Object.keys(t.setHeaders).reduce((U,B)=>U.set(B,t.setHeaders[B]),z)),t.setParams&&(A=Object.keys(t.setParams).reduce((U,B)=>U.set(B,t.setParams[B]),A)),new n(e,i,w,{params:A,headers:z,context:V,reportProgress:T,responseType:r,withCredentials:x,transferCache:f,keepalive:o,cache:a,priority:s,timeout:_,mode:l,redirect:c,credentials:u,referrer:h,integrity:p})}},Jm=(function(n){return n[n.Sent=0]="Sent",n[n.UploadProgress=1]="UploadProgress",n[n.ResponseHeader=2]="ResponseHeader",n[n.DownloadProgress=3]="DownloadProgress",n[n.Response=4]="Response",n[n.User=5]="User",n})(Jm||{}),_3=class{headers;status;statusText;url;ok;type;redirected;constructor(t,e=200,i="OK"){this.headers=t.headers||new ah,this.status=t.status!==void 0?t.status:e,this.statusText=t.statusText||i,this.url=t.url||null,this.redirected=t.redirected,this.ok=this.status>=200&&this.status<300}},Wx=class n extends _3{constructor(t={}){super(t)}type=Jm.ResponseHeader;clone(t={}){return new n({headers:t.headers||this.headers,status:t.status!==void 0?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}},H5=class n extends _3{body;constructor(t={}){super(t),this.body=t.body!==void 0?t.body:null}type=Jm.Response;clone(t={}){return new n({body:t.body!==void 0?t.body:this.body,headers:t.headers||this.headers,status:t.status!==void 0?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0,redirected:t.redirected??this.redirected})}},kf=class extends _3{name="HttpErrorResponse";message;error;ok=!1;constructor(t){super(t,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${t.url||"(unknown url)"}`:this.message=`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}},C$e=200,w$e=204;function sB(n,t){return{body:t,headers:n.headers,context:n.context,observe:n.observe,params:n.params,reportProgress:n.reportProgress,responseType:n.responseType,withCredentials:n.withCredentials,credentials:n.credentials,transferCache:n.transferCache,timeout:n.timeout,keepalive:n.keepalive,priority:n.priority,cache:n.cache,mode:n.mode,redirect:n.redirect,integrity:n.integrity,referrer:n.referrer}}var Ta=(()=>{class n{handler;constructor(e){this.handler=e}request(e,i,r={}){let o;if(e instanceof y3)o=e;else{let l;r.headers instanceof ah?l=r.headers:l=new ah(r.headers);let c;r.params&&(r.params instanceof Rp?c=r.params:c=new Rp({fromObject:r.params})),o=new y3(e,i,r.body!==void 0?r.body:null,{headers:l,context:r.context,params:c,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials,transferCache:r.transferCache,keepalive:r.keepalive,priority:r.priority,cache:r.cache,mode:r.mode,redirect:r.redirect,credentials:r.credentials,referrer:r.referrer,integrity:r.integrity,timeout:r.timeout})}let s=rt(o).pipe(sc(l=>this.handler.handle(l)));if(e instanceof y3||r.observe==="events")return s;let a=s.pipe(xt(l=>l instanceof H5));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(ze(l=>{if(l.body!==null&&!(l.body instanceof ArrayBuffer))throw new lt(2806,!1);return l.body}));case"blob":return a.pipe(ze(l=>{if(l.body!==null&&!(l.body instanceof Blob))throw new lt(2807,!1);return l.body}));case"text":return a.pipe(ze(l=>{if(l.body!==null&&typeof l.body!="string")throw new lt(2808,!1);return l.body}));case"json":default:return a.pipe(ze(l=>l.body))}case"response":return a;default:throw new lt(2809,!1)}}delete(e,i={}){return this.request("DELETE",e,i)}get(e,i={}){return this.request("GET",e,i)}head(e,i={}){return this.request("HEAD",e,i)}jsonp(e,i){return this.request("JSONP",e,{params:new Rp().append(i,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,i={}){return this.request("OPTIONS",e,i)}patch(e,i,r={}){return this.request("PATCH",e,sB(r,i))}post(e,i,r={}){return this.request("POST",e,sB(r,i))}put(e,i,r={}){return this.request("PUT",e,sB(r,i))}static \u0275fac=function(i){return new(i||n)(ue(v3))};static \u0275prov=oe({token:n,factory:n.\u0275fac})}return n})();var b$e=new Re("");function Gue(n,t){return t(n)}function S$e(n,t){return(e,i)=>t.intercept(e,{handle:r=>n(r,i)})}function x$e(n,t,e){return(i,r)=>Zs(e,()=>t(i,o=>n(o,r)))}var Gx=new Re(""),lB=new Re(""),Zue=new Re(""),cB=new Re("",{providedIn:"root",factory:()=>!0});function k$e(){let n=null;return(t,e)=>{n===null&&(n=(R(Gx,{optional:!0})??[]).reduceRight(S$e,Gue));let i=R(Hm);if(R(cB)){let o=i.add();return n(t,e).pipe(va(o))}else return n(t,e)}}var Yx=(()=>{class n extends v3{backend;injector;chain=null;pendingTasks=R(Hm);contributeToStability=R(cB);constructor(e,i){super(),this.backend=e,this.injector=i}handle(e){if(this.chain===null){let i=Array.from(new Set([...this.injector.get(lB),...this.injector.get(Zue,[])]));this.chain=i.reduceRight((r,o)=>x$e(r,o,this.injector),Gue)}if(this.contributeToStability){let i=this.pendingTasks.add();return this.chain(e,r=>this.backend.handle(r)).pipe(va(i))}else return this.chain(e,i=>this.backend.handle(i))}static \u0275fac=function(i){return new(i||n)(ue(ru),ue(vo))};static \u0275prov=oe({token:n,factory:n.\u0275fac})}return n})();var T$e=/^\)\]\}',?\n/,O$e=RegExp(`^${Que}:`,"m");function E$e(n){return"responseURL"in n&&n.responseURL?n.responseURL:O$e.test(n.getAllResponseHeaders())?n.getResponseHeader(Que):null}var aB=(()=>{class n{xhrFactory;constructor(e){this.xhrFactory=e}handle(e){if(e.method==="JSONP")throw new lt(-2800,!1);let i=this.xhrFactory;return rt(null).pipe(Ae(()=>new Zn(o=>{let s=i.build();if(s.open(e.method,e.urlWithParams),e.withCredentials&&(s.withCredentials=!0),e.headers.forEach((x,T)=>s.setRequestHeader(x,T.join(","))),e.headers.has(que)||s.setRequestHeader(que,_$e),!e.headers.has($ue)){let x=e.detectContentTypeHeader();x!==null&&s.setRequestHeader($ue,x)}if(e.timeout&&(s.timeout=e.timeout),e.responseType){let x=e.responseType.toLowerCase();s.responseType=x!=="json"?x:"text"}let a=e.serializeBody(),l=null,c=()=>{if(l!==null)return l;let x=s.statusText||"OK",T=new ah(s.getAllResponseHeaders()),z=E$e(s)||e.url;return l=new Wx({headers:T,status:s.status,statusText:x,url:z}),l},u=()=>{let{headers:x,status:T,statusText:z,url:A}=c(),V=null;T!==w$e&&(V=typeof s.response>"u"?s.responseText:s.response),T===0&&(T=V?C$e:0);let U=T>=200&&T<300;if(e.responseType==="json"&&typeof V=="string"){let B=V;V=V.replace(T$e,"");try{V=V!==""?JSON.parse(V):null}catch(K){V=B,U&&(U=!1,V={error:K,text:V})}}U?(o.next(new H5({body:V,headers:x,status:T,statusText:z,url:A||void 0})),o.complete()):o.error(new kf({error:V,headers:x,status:T,statusText:z,url:A||void 0}))},h=x=>{let{url:T}=c(),z=new kf({error:x,status:s.status||0,statusText:s.statusText||"Unknown Error",url:T||void 0});o.error(z)},p=h;e.timeout&&(p=x=>{let{url:T}=c(),z=new kf({error:new DOMException("Request timed out","TimeoutError"),status:s.status||0,statusText:s.statusText||"Request timeout",url:T||void 0});o.error(z)});let f=!1,_=x=>{f||(o.next(c()),f=!0);let T={type:Jm.DownloadProgress,loaded:x.loaded};x.lengthComputable&&(T.total=x.total),e.responseType==="text"&&s.responseText&&(T.partialText=s.responseText),o.next(T)},w=x=>{let T={type:Jm.UploadProgress,loaded:x.loaded};x.lengthComputable&&(T.total=x.total),o.next(T)};return s.addEventListener("load",u),s.addEventListener("error",h),s.addEventListener("timeout",p),s.addEventListener("abort",h),e.reportProgress&&(s.addEventListener("progress",_),a!==null&&s.upload&&s.upload.addEventListener("progress",w)),s.send(a),o.next({type:Jm.Sent}),()=>{s.removeEventListener("error",h),s.removeEventListener("abort",h),s.removeEventListener("load",u),s.removeEventListener("timeout",p),e.reportProgress&&(s.removeEventListener("progress",_),a!==null&&s.upload&&s.upload.removeEventListener("progress",w)),s.readyState!==s.DONE&&s.abort()}})))}static \u0275fac=function(i){return new(i||n)(ue(Xm))};static \u0275prov=oe({token:n,factory:n.\u0275fac})}return n})(),Xue=new Re(""),M$e="XSRF-TOKEN",D$e=new Re("",{providedIn:"root",factory:()=>M$e}),I$e="X-XSRF-TOKEN",z$e=new Re("",{providedIn:"root",factory:()=>I$e}),j5=class{},A$e=(()=>{class n{doc;cookieName;lastCookieString="";lastToken=null;parseCount=0;constructor(e,i){this.doc=e,this.cookieName=i}getToken(){let e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=R5(e,this.cookieName),this.lastCookieString=e),this.lastToken}static \u0275fac=function(i){return new(i||n)(ue(Xt),ue(D$e))};static \u0275prov=oe({token:n,factory:n.\u0275fac})}return n})(),P$e=/^(?:https?:)?\/\//i;function R$e(n,t){if(!R(Xue)||n.method==="GET"||n.method==="HEAD"||P$e.test(n.url))return t(n);let e=R(j5).getToken(),i=R(z$e);return e!=null&&!n.headers.has(i)&&(n=n.clone({headers:n.headers.set(i,e)})),t(n)}var uB=(function(n){return n[n.Interceptors=0]="Interceptors",n[n.LegacyInterceptors=1]="LegacyInterceptors",n[n.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",n[n.NoXsrfProtection=3]="NoXsrfProtection",n[n.JsonpSupport=4]="JsonpSupport",n[n.RequestsMadeViaParent=5]="RequestsMadeViaParent",n[n.Fetch=6]="Fetch",n})(uB||{});function N$e(n,t){return{\u0275kind:n,\u0275providers:t}}function dB(...n){let t=[Ta,aB,Yx,{provide:v3,useExisting:Yx},{provide:ru,useFactory:()=>R(b$e,{optional:!0})??R(aB)},{provide:lB,useValue:R$e,multi:!0},{provide:Xue,useValue:!0},{provide:j5,useClass:A$e}];for(let e of n)t.push(...e.\u0275providers);return lc(t)}var Uue=new Re("");function hB(){return N$e(uB.LegacyInterceptors,[{provide:Uue,useFactory:k$e},{provide:lB,useExisting:Uue,multi:!0}])}var Kue=(()=>{class n{_doc;constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static \u0275fac=function(i){return new(i||n)(ue(Xt))};static \u0275prov=oe({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function L$e(n,t){if(typeof COMPILED>"u"||!COMPILED){let e=Mo.ng=Mo.ng||{};e[n]=t}}var fB=class{msPerTick;numTicks;constructor(t,e){this.msPerTick=t,this.numTicks=e}},mB=class{appRef;constructor(t){this.appRef=t.injector.get(Co)}timeChangeDetection(t){let e=t&&t.record,i="Change Detection";e&&"profile"in console&&typeof console.profile=="function"&&console.profile(i);let r=performance.now(),o=0;for(;o<5||performance.now()-r<500;)this.appRef.tick(),o++;let s=performance.now();e&&"profileEnd"in console&&typeof console.profileEnd=="function"&&console.profileEnd(i);let a=(s-r)/o;return console.log(`ran ${o} change detection cycles`),console.log(`${a.toFixed(2)} ms per check`),new fB(a,o)}},F$e="profiler";function Jue(n){return L$e(F$e,new mB(n)),n}var fc=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275prov=oe({token:n,factory:function(i){let r=null;return i?r=new(i||n):r=ue(V$e),r},providedIn:"root"})}return n})(),V$e=(()=>{class n extends fc{_doc;constructor(e){super(),this._doc=e}sanitize(e,i){if(i==null)return null;switch(e){case Ps.NONE:return i;case Ps.HTML:return nh(i,"HTML")?El(i):sx(this._doc,String(i)).toString();case Ps.STYLE:return nh(i,"Style")?El(i):i;case Ps.SCRIPT:if(nh(i,"Script"))return El(i);throw new lt(5200,!1);case Ps.URL:return nh(i,"URL")?El(i):h5(String(i));case Ps.RESOURCE_URL:if(nh(i,"ResourceURL"))return El(i);throw new lt(5201,!1);default:throw new lt(5202,!1)}}bypassSecurityTrustHtml(e){return IF(e)}bypassSecurityTrustStyle(e){return zF(e)}bypassSecurityTrustScript(e){return AF(e)}bypassSecurityTrustUrl(e){return PF(e)}bypassSecurityTrustResourceUrl(e){return RF(e)}static \u0275fac=function(i){return new(i||n)(ue(Xt))};static \u0275prov=oe({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var _B={};function mde(n,t){if(_B[n]=(_B[n]||0)+1,typeof t=="function")return gB(n,(...i)=>q(k({},t(...i)),{type:n}));switch(t?t._as:"empty"){case"empty":return gB(n,()=>({type:n}));case"props":return gB(n,i=>q(k({},i),{type:n}));default:throw new Error("Unexpected config.")}}function gB(n,t){return Object.defineProperty(t,"type",{value:n,writable:!1})}var lh="@ngrx/store/init",ch=(()=>{class n extends an{constructor(){super({type:lh})}next(e){if(typeof e=="function")throw new TypeError(`
88
88
  Dispatch expected an object, instead it received a function.
89
89
  If you're using the createAction function, make sure to invoke the function
90
- before dispatching the action. For example, someAction should be someAction().`);if(typeof e>"u")throw new TypeError("Actions must be objects");if(typeof e.type>"u")throw new TypeError("Actions must have a type property");super.next(e)}complete(){}ngOnDestroy(){super.complete()}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=oe({token:n,factory:n.\u0275fac}),n})(),B$e=[ch],gde=new Re("@ngrx/store Internal Root Guard"),ede=new Re("@ngrx/store Internal Initial State"),q5=new Re("@ngrx/store Initial State"),yde=new Re("@ngrx/store Reducer Factory"),tde=new Re("@ngrx/store Internal Reducer Factory Provider"),vde=new Re("@ngrx/store Initial Reducers"),yB=new Re("@ngrx/store Internal Initial Reducers"),nde=new Re("@ngrx/store Store Features"),ide=new Re("@ngrx/store Internal Store Reducers"),vB=new Re("@ngrx/store Internal Feature Reducers"),rde=new Re("@ngrx/store Internal Feature Configs"),_de=new Re("@ngrx/store Internal Store Features"),ode=new Re("@ngrx/store Internal Feature Reducers Token"),Cde=new Re("@ngrx/store Feature Reducers"),sde=new Re("@ngrx/store User Provided Meta Reducers"),Zx=new Re("@ngrx/store Meta Reducers"),ade=new Re("@ngrx/store Internal Resolved Meta Reducers"),lde=new Re("@ngrx/store User Runtime Checks Config"),cde=new Re("@ngrx/store Internal User Runtime Checks Config"),$5=new Re("@ngrx/store Internal Runtime Checks"),SB=new Re("@ngrx/store Check if Action types are unique");function S3(n,t={}){let e=Object.keys(n),i={};for(let o=0;o<e.length;o++){let s=e[o];typeof n[s]=="function"&&(i[s]=n[s])}let r=Object.keys(i);return function(s,a){s=s===void 0?t:s;let l=!1,c={};for(let u=0;u<r.length;u++){let h=r[u],p=i[h],f=s[h],_=p(f,a);c[h]=_,l=l||_!==f}return l?c:s}}function H$e(n,t){return Object.keys(n).filter(e=>e!==t).reduce((e,i)=>Object.assign(e,{[i]:n[i]}),{})}function wde(...n){return function(t){if(n.length===0)return t;let e=n[n.length-1];return n.slice(0,-1).reduceRight((r,o)=>o(r),e(t))}}function bde(n,t){return Array.isArray(t)&&t.length>0&&(n=wde.apply(null,[...t,n])),(e,i)=>{let r=n(e);return(o,s)=>(o=o===void 0?i:o,r(o,s))}}function j$e(n){let t=Array.isArray(n)&&n.length>0?wde(...n):e=>e;return(e,i)=>(e=t(e),(r,o)=>(r=r===void 0?i:r,e(r,o)))}var e2=class extends Zn{},w3=class extends ch{},Kx="@ngrx/store/update-reducers",Xx=(()=>{class n extends an{constructor(e,i,r,o){super(o(r,i)),this.dispatcher=e,this.initialState=i,this.reducers=r,this.reducerFactory=o}get currentReducers(){return this.reducers}addFeature(e){this.addFeatures([e])}addFeatures(e){let i=e.reduce((r,{reducers:o,reducerFactory:s,metaReducers:a,initialState:l,key:c})=>{let u=typeof o=="function"?j$e(a)(o,l):bde(s,a)(o,l);return r[c]=u,r},{});this.addReducers(i)}removeFeature(e){this.removeFeatures([e])}removeFeatures(e){this.removeReducers(e.map(i=>i.key))}addReducer(e,i){this.addReducers({[e]:i})}addReducers(e){this.reducers=k(k({},this.reducers),e),this.updateReducers(Object.keys(e))}removeReducer(e){this.removeReducers([e])}removeReducers(e){e.forEach(i=>{this.reducers=H$e(this.reducers,i)}),this.updateReducers(e)}updateReducers(e){this.next(this.reducerFactory(this.reducers,this.initialState)),this.dispatcher.next({type:Kx,features:e})}ngOnDestroy(){this.complete()}}return n.\u0275fac=function(e){return new(e||n)(ue(w3),ue(q5),ue(vde),ue(yde))},n.\u0275prov=oe({token:n,factory:n.\u0275fac}),n})(),$$e=[Xx,{provide:e2,useExisting:Xx},{provide:w3,useExisting:ch}],t2=(()=>{class n extends fe{ngOnDestroy(){this.complete()}}return n.\u0275fac=(()=>{let t;return function(i){return(t||(t=so(n)))(i||n)}})(),n.\u0275prov=oe({token:n,factory:n.\u0275fac}),n})(),q$e=[t2],b3=class extends Zn{},ude=(()=>{class n extends an{constructor(e,i,r,o){super(o);let a=e.pipe(bv(L9)).pipe(An(i)),l={state:o},c=a.pipe(pp(U$e,l));this.stateSubscription=c.subscribe(({state:u,action:h})=>{this.next(u),r.next(h)})}ngOnDestroy(){this.stateSubscription.unsubscribe(),this.complete()}}return n.INIT=lh,n.\u0275fac=function(e){return new(e||n)(ue(ch),ue(e2),ue(t2),ue(q5))},n.\u0275prov=oe({token:n,factory:n.\u0275fac}),n})();function U$e(n={state:void 0},[t,e]){let{state:i}=n;return{state:e(i,t),action:t}}var Q$e=[ude,{provide:b3,useExisting:ude}],mn=(()=>{class n extends Zn{constructor(e,i,r){super(),this.actionsObserver=i,this.reducerManager=r,this.source=e}select(e,...i){return ni.call(null,e,...i)(this)}lift(e){let i=new n(this,this.actionsObserver,this.reducerManager);return i.operator=e,i}dispatch(e){this.actionsObserver.next(e)}next(e){this.actionsObserver.next(e)}error(e){this.actionsObserver.error(e)}complete(){this.actionsObserver.complete()}addReducer(e,i){this.reducerManager.addReducer(e,i)}removeReducer(e){this.reducerManager.removeReducer(e)}}return n.\u0275fac=function(e){return new(e||n)(ue(b3),ue(ch),ue(Xx))},n.\u0275prov=oe({token:n,factory:n.\u0275fac}),n})(),W$e=[mn];function ni(n,t,...e){return function(r){let o;if(typeof n=="string"){let s=[t,...e].filter(Boolean);o=r.pipe(dN(n,...s))}else if(typeof n=="function")o=r.pipe(ze(s=>n(s,t)));else throw new TypeError(`Unexpected type '${typeof n}' in select operator, expected 'string' or 'function'`);return o.pipe(Hn())}}var xB="https://ngrx.io/guide/store/configuration/runtime-checks";function dde(n){return n===void 0}function hde(n){return n===null}function Sde(n){return Array.isArray(n)}function Y$e(n){return typeof n=="string"}function G$e(n){return typeof n=="boolean"}function Z$e(n){return typeof n=="number"}function xde(n){return typeof n=="object"&&n!==null}function X$e(n){return xde(n)&&!Sde(n)}function K$e(n){if(!X$e(n))return!1;let t=Object.getPrototypeOf(n);return t===Object.prototype||t===null}function CB(n){return typeof n=="function"}function J$e(n){return CB(n)&&n.hasOwnProperty("\u0275cmp")}function eqe(n,t){return Object.prototype.hasOwnProperty.call(n,t)}function pde(n,t){return n===t}function tqe(n,t,e){for(let i=0;i<n.length;i++)if(!e(n[i],t[i]))return!0;return!1}function kde(n,t=pde,e=pde){let i=null,r=null,o;function s(){i=null,r=null}function a(u=void 0){o={result:u}}function l(){o=void 0}function c(){if(o!==void 0)return o.result;if(!i)return r=n.apply(null,arguments),i=arguments,r;if(!tqe(arguments,i,t))return r;let u=n.apply(null,arguments);return i=arguments,e(r,u)?r:(r=u,u)}return{memoized:c,reset:s,setResult:a,clearResult:l}}function pn(...n){return iqe(kde)(...n)}function nqe(n,t,e,i){if(e===void 0){let o=t.map(s=>s(n));return i.memoized.apply(null,o)}let r=t.map(o=>o(n,e));return i.memoized.apply(null,[...r,e])}function iqe(n,t={stateFn:nqe}){return function(...e){let i=e;if(Array.isArray(i[0])){let[u,...h]=i;i=[...u,...h]}else i.length===1&&rqe(i[0])&&(i=oqe(i[0]));let r=i.slice(0,i.length-1),o=i[i.length-1],s=r.filter(u=>u.release&&typeof u.release=="function"),a=n(function(...u){return o.apply(null,u)}),l=kde(function(u,h){return t.stateFn.apply(null,[u,r,h,a])});function c(){l.reset(),a.reset(),s.forEach(u=>u.release())}return Object.assign(l.memoized,{release:c,projector:a.memoized,setResult:l.setResult,clearResult:l.clearResult})}}function rqe(n){return!!n&&typeof n=="object"&&Object.values(n).every(t=>typeof t=="function")}function oqe(n){let t=Object.values(n),e=Object.keys(n),i=(...r)=>e.reduce((o,s,a)=>q(k({},o),{[s]:r[a]}),{});return[...t,i]}function sqe(n){return n instanceof Re?R(n):n}function aqe(n,t){return t.map((e,i)=>{if(n[i]instanceof Re){let r=R(n[i]);return{key:e.key,reducerFactory:r.reducerFactory?r.reducerFactory:S3,metaReducers:r.metaReducers?r.metaReducers:[],initialState:r.initialState}}return e})}function lqe(n){return n.map(t=>t instanceof Re?R(t):t)}function Tde(n){return typeof n=="function"?n():n}function cqe(n,t){return n.concat(t)}function uqe(){if(R(mn,{optional:!0,skipSelf:!0}))throw new TypeError("The root Store has been provided more than once. Feature modules should provide feature states instead.");return"guarded"}function dqe(n,t){return function(e,i){let r=t.action(i)?wB(i):i,o=n(e,r);return t.state()?wB(o):o}}function wB(n){Object.freeze(n);let t=CB(n);return Object.getOwnPropertyNames(n).forEach(e=>{if(!e.startsWith("\u0275")&&eqe(n,e)&&(!t||e!=="caller"&&e!=="callee"&&e!=="arguments")){let i=n[e];(xde(i)||CB(i))&&!Object.isFrozen(i)&&wB(i)}}),n}function hqe(n,t){return function(e,i){if(t.action(i)){let o=bB(i);fde(o,"action")}let r=n(e,i);if(t.state()){let o=bB(r);fde(o,"state")}return r}}function bB(n,t=[]){return(dde(n)||hde(n))&&t.length===0?{path:["root"],value:n}:Object.keys(n).reduce((i,r)=>{if(i)return i;let o=n[r];return J$e(o)?i:dde(o)||hde(o)||Z$e(o)||G$e(o)||Y$e(o)||Sde(o)?!1:K$e(o)?bB(o,[...t,r]):{path:[...t,r],value:o}},!1)}function fde(n,t){if(n===!1)return;let e=n.path.join("."),i=new Error(`Detected unserializable ${t} at "${e}". ${xB}#strict${t}serializability`);throw i.value=n.value,i.unserializablePath=e,i}function pqe(n,t){return function(e,i){if(t.action(i)&&!at.isInAngularZone())throw new Error(`Action '${i.type}' running outside NgZone. ${xB}#strictactionwithinngzone`);return n(e,i)}}function fqe(n){return Sa()?k({strictStateSerializability:!1,strictActionSerializability:!1,strictStateImmutability:!0,strictActionImmutability:!0,strictActionWithinNgZone:!1,strictActionTypeUniqueness:!1},n):{strictStateSerializability:!1,strictActionSerializability:!1,strictStateImmutability:!1,strictActionImmutability:!1,strictActionWithinNgZone:!1,strictActionTypeUniqueness:!1}}function mqe({strictActionSerializability:n,strictStateSerializability:t}){return e=>n||t?hqe(e,{action:i=>n&&!kB(i),state:()=>t}):e}function gqe({strictActionImmutability:n,strictStateImmutability:t}){return e=>n||t?dqe(e,{action:i=>n&&!kB(i),state:()=>t}):e}function kB(n){return n.type.startsWith("@ngrx")}function yqe({strictActionWithinNgZone:n}){return t=>n?pqe(t,{action:e=>n&&!kB(e)}):t}function vqe(n){return[{provide:cde,useValue:n},{provide:lde,useFactory:_qe,deps:[cde]},{provide:$5,deps:[lde],useFactory:fqe},{provide:Zx,multi:!0,deps:[$5],useFactory:gqe},{provide:Zx,multi:!0,deps:[$5],useFactory:mqe},{provide:Zx,multi:!0,deps:[$5],useFactory:yqe}]}function Ode(){return[{provide:SB,multi:!0,deps:[$5],useFactory:Cqe}]}function _qe(n){return n}function Cqe(n){if(!n.strictActionTypeUniqueness)return;let t=Object.entries(_B).filter(([,e])=>e>1).map(([e])=>e);if(t.length)throw new Error(`Action types are registered more than once, ${t.map(e=>`"${e}"`).join(", ")}. ${xB}#strictactiontypeuniqueness`)}function wqe(n={},t={}){return[{provide:gde,useFactory:uqe},{provide:ede,useValue:t.initialState},{provide:q5,useFactory:Tde,deps:[ede]},{provide:yB,useValue:n},{provide:ide,useExisting:n instanceof Re?n:yB},{provide:vde,deps:[yB,[new _f(ide)]],useFactory:sqe},{provide:sde,useValue:t.metaReducers?t.metaReducers:[]},{provide:ade,deps:[Zx,sde],useFactory:cqe},{provide:tde,useValue:t.reducerFactory?t.reducerFactory:S3},{provide:yde,deps:[tde,ade],useFactory:bde},B$e,$$e,q$e,Q$e,W$e,vqe(t.runtimeChecks),Ode()]}function bqe(n,t,e={}){return[{provide:rde,multi:!0,useValue:n instanceof Object?{}:e},{provide:nde,multi:!0,useValue:{key:n instanceof Object?n.name:n,reducerFactory:!(e instanceof Re)&&e.reducerFactory?e.reducerFactory:S3,metaReducers:!(e instanceof Re)&&e.metaReducers?e.metaReducers:[],initialState:!(e instanceof Re)&&e.initialState?e.initialState:void 0}},{provide:_de,deps:[rde,nde],useFactory:aqe},{provide:vB,multi:!0,useValue:n instanceof Object?n.reducer:t},{provide:ode,multi:!0,useExisting:t instanceof Re?t:vB},{provide:Cde,multi:!0,deps:[vB,[new _f(ode)]],useFactory:lqe},Ode()]}var U5=(()=>{class n{constructor(e,i,r,o,s,a){}}return n.\u0275fac=function(e){return new(e||n)(ue(ch),ue(e2),ue(t2),ue(mn),ue(gde,8),ue(SB,8))},n.\u0275mod=He({type:n}),n.\u0275inj=Be({}),n})(),Jx=(()=>{class n{constructor(e,i,r,o,s){this.features=e,this.featureReducers=i,this.reducerManager=r;let a=e.map((l,c)=>{let h=i.shift()[c];return q(k({},l),{reducers:h,initialState:Tde(l.initialState)})});r.addFeatures(a)}ngOnDestroy(){this.reducerManager.removeFeatures(this.features)}}return n.\u0275fac=function(e){return new(e||n)(ue(_de),ue(Cde),ue(Xx),ue(U5),ue(SB,8))},n.\u0275mod=He({type:n}),n.\u0275inj=Be({}),n})(),Ede=(()=>{class n{static forRoot(e,i){return{ngModule:U5,providers:[...wqe(e,i)]}}static forFeature(e,i,r={}){return{ngModule:Jx,providers:[...bqe(e,i,r)]}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=He({type:n}),n.\u0275inj=Be({}),n})();var Y5=class{},Ide=(()=>{class n{handle(e){return e.key}static \u0275fac=function(i){return new(i||n)};static \u0275prov=oe({token:n,factory:n.\u0275fac})}return n})(),x3=class{},zde=(()=>{class n extends x3{compile(e,i){return e}compileTranslations(e,i){return e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=so(n)))(r||n)}})();static \u0275prov=oe({token:n,factory:n.\u0275fac})}return n})(),Of=class{},Ade=(()=>{class n extends Of{getTranslation(e){return rt({})}static \u0275fac=(()=>{let e;return function(r){return(e||(e=so(n)))(r||n)}})();static \u0275prov=oe({token:n,factory:n.\u0275fac})}return n})();function ek(n,t){if(n===t)return!0;if(n===null||t===null)return!1;if(n!==n&&t!==t)return!0;let e=typeof n,i=typeof t,r;if(e==i&&e=="object")if(Array.isArray(n)){if(!Array.isArray(t))return!1;if((r=n.length)==t.length){for(let o=0;o<r;o++)if(!ek(n[o],t[o]))return!1;return!0}}else{if(Array.isArray(t))return!1;if(Np(n)&&Np(t)){let o=Object.create(null);for(let s in n){if(!ek(n[s],t[s]))return!1;o[s]=!0}for(let s in t)if(!(s in o)&&typeof t[s]<"u")return!1;return!0}}return!1}function Tf(n){return typeof n<"u"&&n!==null}function Dde(n){return n!==void 0}function Np(n){return W5(n)&&!n2(n)&&n!==null}function W5(n){return typeof n=="object"&&n!==null}function n2(n){return Array.isArray(n)}function tk(n){return typeof n=="string"}function Sqe(n){return typeof n=="function"}function nk(n){if(n2(n))return n.map(t=>nk(t));if(Np(n)){let t={};return Object.keys(n).forEach(e=>{t[e]=nk(n[e])}),t}else return n}function MB(n,t){if(!W5(n))return nk(t);let e=nk(n);return W5(e)&&W5(t)&&Object.keys(t).forEach(i=>{Np(t[i])?i in n?e[i]=MB(n[i],t[i]):Object.assign(e,{[i]:t[i]}):Object.assign(e,{[i]:t[i]})}),e}function Pde(n,t){let e=t.split(".");t="";do{t+=e.shift();let i=!e.length;if(Tf(n)){if(Np(n)&&Dde(n[t])&&(Np(n[t])||n2(n[t])||i)){n=n[t],t="";continue}if(n2(n)){let r=parseInt(t,10);if(Dde(n[r])&&(Np(n[r])||n2(n[r])||i)){n=n[r],t="";continue}}}if(i){n=void 0;continue}t+="."}while(e.length);return n}function xqe(n,t,e){return MB(n,kqe(t,e))}function kqe(n,t){return n.split(".").reduceRight((e,i)=>({[i]:e}),t)}var k3=class{},Rde=(()=>{class n extends k3{templateMatcher=/{{\s?([^{}\s]*)\s?}}/g;interpolate(e,i){if(tk(e))return this.interpolateString(e,i);if(Sqe(e))return this.interpolateFunction(e,i)}interpolateFunction(e,i){return e(i)}interpolateString(e,i){return i?e.replace(this.templateMatcher,(r,o)=>{let s=this.getInterpolationReplacement(i,o);return s!==void 0?s:r}):e}getInterpolationReplacement(e,i){return this.formatValue(Pde(e,i))}formatValue(e){if(tk(e))return e;if(typeof e=="number"||typeof e=="boolean")return e.toString();if(e===null)return"null";if(n2(e))return e.join(", ");if(W5(e))return typeof e.toString=="function"&&e.toString!==Object.prototype.toString?e.toString():JSON.stringify(e)}static \u0275fac=(()=>{let e;return function(r){return(e||(e=so(n)))(r||n)}})();static \u0275prov=oe({token:n,factory:n.\u0275fac})}return n})(),TB=(()=>{class n{_onTranslationChange=new fe;_onLangChange=new fe;_onFallbackLangChange=new fe;fallbackLang=null;currentLang;translations={};languages=[];getTranslations(e){return this.translations[e]}setTranslations(e,i,r){this.translations[e]=r&&this.hasTranslationFor(e)?MB(this.translations[e],i):i,this.addLanguages([e]),this._onTranslationChange.next({lang:e,translations:this.getTranslations(e)})}getLanguages(){return this.languages}getCurrentLang(){return this.currentLang}getFallbackLang(){return this.fallbackLang}setFallbackLang(e,i=!0){this.fallbackLang=e,i&&this._onFallbackLangChange.next({lang:e,translations:this.translations[e]})}setCurrentLang(e,i=!0){this.currentLang=e,i&&this._onLangChange.next({lang:e,translations:this.translations[e]})}get onTranslationChange(){return this._onTranslationChange.asObservable()}get onLangChange(){return this._onLangChange.asObservable()}get onFallbackLangChange(){return this._onFallbackLangChange.asObservable()}addLanguages(e){this.languages=Array.from(new Set([...this.languages,...e]))}hasTranslationFor(e){return typeof this.translations[e]<"u"}deleteTranslations(e){delete this.translations[e]}getTranslation(e){let i=this.getValue(this.currentLang,e);return i===void 0&&this.fallbackLang!=null&&this.fallbackLang!==this.currentLang&&(i=this.getValue(this.fallbackLang,e)),i}getValue(e,i){return Pde(this.getTranslations(e),i)}static \u0275fac=function(i){return new(i||n)};static \u0275prov=oe({token:n,factory:n.\u0275fac})}return n})(),OB=new Re("TRANSLATE_CONFIG"),Q5=n=>ga(n)?n:rt(n);var G5=(()=>{class n{loadingTranslations;pending=!1;_translationRequests={};lastUseLanguage=null;currentLoader=R(Of);compiler=R(x3);parser=R(k3);missingTranslationHandler=R(Y5);store=R(TB);extend=!1;get onTranslationChange(){return this.store.onTranslationChange}get onLangChange(){return this.store.onLangChange}get onFallbackLangChange(){return this.store.onFallbackLangChange}get onDefaultLangChange(){return this.store.onFallbackLangChange}constructor(){let e=k({extend:!1,fallbackLang:null},R(OB,{optional:!0}));e.lang&&this.use(e.lang),e.fallbackLang&&this.setFallbackLang(e.fallbackLang),e.extend&&(this.extend=!0)}setFallbackLang(e){this.getFallbackLang()||this.store.setFallbackLang(e,!1);let i=this.loadOrExtendLanguage(e);return ga(i)?(i.pipe(Ct(1)).subscribe({next:()=>{this.store.setFallbackLang(e)},error:()=>{}}),i):(this.store.setFallbackLang(e),rt(this.store.getTranslations(e)))}use(e){this.lastUseLanguage=e,this.getCurrentLang()||this.store.setCurrentLang(e,!1);let i=this.loadOrExtendLanguage(e);return ga(i)?(i.pipe(Ct(1)).subscribe({next:()=>{this.changeLang(e)},error:()=>{}}),i):(this.changeLang(e),rt(this.store.getTranslations(e)))}loadOrExtendLanguage(e){if(!this.store.hasTranslationFor(e)||this.extend)return this._translationRequests[e]=this._translationRequests[e]||this.loadAndCompileTranslations(e),this._translationRequests[e]}changeLang(e){e===this.lastUseLanguage&&this.store.setCurrentLang(e)}getCurrentLang(){return this.store.getCurrentLang()}loadAndCompileTranslations(e){this.pending=!0;let i=this.currentLoader.getTranslation(e).pipe($u(1),Ct(1));return this.loadingTranslations=i.pipe(ze(r=>this.compiler.compileTranslations(r,e)),$u(1),Ct(1)),this.loadingTranslations.subscribe({next:r=>{this.store.setTranslations(e,r,this.extend),this.pending=!1},error:r=>{this.pending=!1}}),i}setTranslation(e,i,r=!1){let o=this.compiler.compileTranslations(i,e);this.store.setTranslations(e,o,r||this.extend)}getLangs(){return this.store.getLanguages()}addLangs(e){this.store.addLanguages(e)}getParsedResultForKey(e,i){let r=this.getTextToInterpolate(e);if(Tf(r))return this.runInterpolation(r,i);let o=this.missingTranslationHandler.handle(k({key:e,translateService:this},i!==void 0&&{interpolateParams:i}));return o!==void 0?o:e}getFallbackLang(){return this.store.getFallbackLang()}getTextToInterpolate(e){return this.store.getTranslation(e)}runInterpolation(e,i){if(Tf(e))return n2(e)?this.runInterpolationOnArray(e,i):Np(e)?this.runInterpolationOnDict(e,i):this.parser.interpolate(e,i)}runInterpolationOnArray(e,i){return e.map(r=>this.runInterpolation(r,i))}runInterpolationOnDict(e,i){let r={};for(let o in e){let s=this.runInterpolation(e[o],i);s!==void 0&&(r[o]=s)}return r}getParsedResult(e,i){return e instanceof Array?this.getParsedResultForArray(e,i):this.getParsedResultForKey(e,i)}getParsedResultForArray(e,i){let r={},o=!1;for(let a of e)r[a]=this.getParsedResultForKey(a,i),o=o||ga(r[a]);if(!o)return r;let s=e.map(a=>Q5(r[a]));return Hu(s).pipe(ze(a=>{let l={};return a.forEach((c,u)=>{l[e[u]]=c}),l}))}get(e,i){if(!Tf(e)||!e.length)throw new Error('Parameter "key" is required and cannot be empty');return this.pending?this.loadingTranslations.pipe(sc(()=>Q5(this.getParsedResult(e,i)))):Q5(this.getParsedResult(e,i))}getStreamOnTranslationChange(e,i){if(!Tf(e)||!e.length)throw new Error('Parameter "key" is required and cannot be empty');return bm(Ga(()=>this.get(e,i)),this.onTranslationChange.pipe(Ae(()=>{let r=this.getParsedResult(e,i);return Q5(r)})))}stream(e,i){if(!Tf(e)||!e.length)throw new Error('Parameter "key" required');return bm(Ga(()=>this.get(e,i)),this.onLangChange.pipe(Ae(()=>{let r=this.getParsedResult(e,i);return Q5(r)})))}instant(e,i){if(!Tf(e)||e.length===0)throw new Error('Parameter "key" is required and cannot be empty');let r=this.getParsedResult(e,i);return ga(r)?Array.isArray(e)?e.reduce((o,s)=>(o[s]=s,o),{}):e:r}set(e,i,r=this.getCurrentLang()){this.store.setTranslations(r,xqe(this.store.getTranslations(r),e,tk(i)?this.compiler.compile(i,r):this.compiler.compileTranslations(i,r)),!1)}reloadLang(e){return this.resetLang(e),this.loadAndCompileTranslations(e)}resetLang(e){delete this._translationRequests[e],this.store.deleteTranslations(e)}static getBrowserLang(){if(typeof window>"u"||!window.navigator)return;let e=this.getBrowserCultureLang();return e?e.split(/[-_]/)[0]:void 0}static getBrowserCultureLang(){if(!(typeof window>"u"||typeof window.navigator>"u"))return window.navigator.languages?window.navigator.languages[0]:window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage}getBrowserLang(){return n.getBrowserLang()}getBrowserCultureLang(){return n.getBrowserCultureLang()}get defaultLang(){return this.getFallbackLang()}get currentLang(){return this.store.getCurrentLang()}get langs(){return this.store.getLanguages()}setDefaultLang(e){return this.setFallbackLang(e)}getDefaultLang(){return this.getFallbackLang()}static \u0275fac=function(i){return new(i||n)};static \u0275prov=oe({token:n,factory:n.\u0275fac})}return n})();var Qt=(()=>{class n{translate=R(G5);_ref=R(Tt);value="";lastKey=null;lastParams=[];onTranslationChange;onLangChange;onFallbackLangChange;updateValue(e,i,r){let o=s=>{this.value=s!==void 0?s:e,this.lastKey=e,this._ref.markForCheck()};if(r){let s=this.translate.getParsedResult(e,i);ga(s)?s.subscribe(o):o(s)}this.translate.get(e,i).subscribe(o)}transform(e,...i){if(!e||!e.length)return e;if(ek(e,this.lastKey)&&ek(i,this.lastParams))return this.value;let r;if(Tf(i[0])&&i.length)if(tk(i[0])&&i[0].length){let o=i[0].replace(/(')?([a-zA-Z0-9_]+)(')?(\s)?:/g,'"$2":').replace(/:(\s)?(')(.*?)(')/g,':"$3"');try{r=JSON.parse(o)}catch(s){throw new SyntaxError(`Wrong parameter in TranslatePipe. Expected a valid Object, received: ${i[0]}`)}}else Np(i[0])&&(r=i[0]);return this.lastKey=e,this.lastParams=i,this.updateValue(e,r),this._dispose(),this.onTranslationChange||(this.onTranslationChange=this.translate.onTranslationChange.subscribe(o=>{(this.lastKey&&o.lang===this.translate.getCurrentLang()||o.lang===this.translate.getFallbackLang())&&(this.lastKey=null,this.updateValue(e,r,o.translations))})),this.onLangChange||(this.onLangChange=this.translate.onLangChange.subscribe(o=>{this.lastKey&&(this.lastKey=null,this.updateValue(e,r,o.translations))})),this.onFallbackLangChange||(this.onFallbackLangChange=this.translate.onFallbackLangChange.subscribe(()=>{this.lastKey&&(this.lastKey=null,this.updateValue(e,r))})),this.value}_dispose(){typeof this.onTranslationChange<"u"&&(this.onTranslationChange.unsubscribe(),this.onTranslationChange=void 0),typeof this.onLangChange<"u"&&(this.onLangChange.unsubscribe(),this.onLangChange=void 0),typeof this.onFallbackLangChange<"u"&&(this.onFallbackLangChange.unsubscribe(),this.onFallbackLangChange=void 0)}ngOnDestroy(){this._dispose()}static \u0275fac=function(i){return new(i||n)};static \u0275pipe=ao({name:"translate",type:n,pure:!1});static \u0275prov=oe({token:n,factory:n.\u0275fac})}return n})();function Nde(n){return{provide:Of,useClass:n}}function Lde(n){return{provide:x3,useClass:n}}function Fde(n){return{provide:k3,useClass:n}}function Vde(n){return{provide:Y5,useClass:n}}function Bde(n={}){return EB(k({compiler:Lde(zde),parser:Fde(Rde),loader:Nde(Ade),missingTranslationHandler:Vde(Ide)},n),!0)}function EB(n={},t){let e=[];n.loader&&e.push(n.loader),n.compiler&&e.push(n.compiler),n.parser&&e.push(n.parser),n.missingTranslationHandler&&e.push(n.missingTranslationHandler),t&&e.push(TB),(n.useDefaultLang||n.defaultLanguage)&&(console.warn("The `useDefaultLang` and `defaultLanguage` options are deprecated. Please use `fallbackLang` instead."),n.useDefaultLang===!0&&n.defaultLanguage&&(n.fallbackLang=n.defaultLanguage));let i={fallbackLang:n.fallbackLang??null,lang:n.lang,extend:n.extend??!1};return e.push({provide:OB,useValue:i}),e.push({provide:G5,useClass:G5,deps:[TB,Of,x3,k3,Y5,OB]}),e}var DB=(()=>{class n{static forRoot(e={}){return{ngModule:n,providers:[...EB(k({compiler:Lde(zde),parser:Fde(Rde),loader:Nde(Ade),missingTranslationHandler:Vde(Ide)},e),!0)]}}static forChild(e={}){return{ngModule:n,providers:[...EB(e,e.isolate??!1)]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=He({type:n});static \u0275inj=Be({})}return n})();Uu();var Hde={name:"@altairgraphql/app",description:"Contains the altair app",version:"8.5.5",author:"Samuel Imolorhe <hello@altairgraphql.dev> (https://altairgraphql.dev/)",dependencies:{"@altairgraphql/api-utils":"workspace:*","@altairgraphql/db":"workspace:*","@altairgraphql/electron-interop":"workspace:*","@altairgraphql/tauri":"workspace:*","@angular/animations":"20.3.19","@angular/cdk":"20.2.7","@angular/cli":"20.3.4","@angular/common":"20.3.19","@angular/core":"^20.3.3","@angular/forms":"20.3.19","@angular/platform-browser":"20.3.19","@angular/platform-browser-dynamic":"20.3.19","@angular/platform-server":"20.3.19","@angular/router":"20.3.19","@apollo/client":"3.5.6","@codemirror/autocomplete":"^6.20.0","@codemirror/commands":"^6.10.0","@codemirror/lang-javascript":"^6.2.4","@codemirror/lang-json":"^6.0.2","@codemirror/language":"^6.11.3","@codemirror/lint":"^6.9.2","@codemirror/search":"^6.5.11","@codemirror/state":"^6.5.2","@codemirror/view":"^6.38.8","@emotion/css":"^11.13.5","@fontsource/jetbrains-mono":"4.2.2","@lezer/common":"1.4.0","@lezer/highlight":"1.2.3","@lezer/lr":"1.4.4","@ngneat/hot-toast":"2.0.1","@ngneat/overview":"1.0.0","@ngneat/until-destroy":"8.0.1","@ngrx/effects":"15.4.0","@ngrx/store":"15.4.0","@ngrx/store-devtools":"15.4.0","@ngui/auto-complete":"3.0.0","@ngx-translate/core":"^17.0.0","@ngx-translate/http-loader":"^17.0.0","@sentry/electron":"^7.5.0","@supabase/supabase-js":"1.29.1","@webcomponents/custom-elements":"1.4.1",abab:"2.0.6",actioncable:"5.2.8",ajv:"^8.11.2","altair-graphql-core":"workspace:*","angular-resizable-element":"^6.0.0","angular-split":"^18.0.0","apollo-cache-inmemory":"1.6.6","apollo-link":"1.2.14","apollo-link-http":"1.5.17","aws-appsync-auth-link":"^3.0.8","aws-appsync-subscription-link":"^3.1.3","cm6-graphql":"0.0.14","codemirror-graphql":"1.0.2","codemirror-json-schema":"^0.6.0",comlink:"4.3.0","compare-versions":"^6.1.1","cookie-parser":"1.4.5","core-js":"3.6.5","crypto-js":"3.3.0",curlup:"1.0.0",deepmerge:"4.2.2",dexie:"^4.4.2",dompurify:"^3.4.2",express:"^4.19.2","file-dialog":"0.0.8","file-saver":"2.0.2","fuse.js":"6.4.6",graphql:"15.5.1","graphql-language-service":"^5.2.0","graphql-language-service-parser":"1.10.4","graphql-language-service-types":"1.8.2","graphql-query-compress":"1.2.3","graphql-ws":"5.9.1","hotkeys-js":"^3.13.15","json-bigint":"^1.0.0","json-schema":"^0.4.0","lodash-es":"4.17.21",loglevel:"1.8.0","loglevel-plugin-prefix":"0.8.4","lucide-angular":"^0.298.0",marked:"^15.0.3",memoizee:"0.4.14","ng-zorro-antd":"^15.1.1","ngrx-store-localstorage":"12.0.1","ngx-cookie-service":"14.0.1","ngx-markdown":"^14.0.1","ngx-pipes":"^3.2.2","ngx-sonner":"^3.1.0","ngx-take-until-destroy":"5.4.0","ngx-toastr":"^18.0.0",nx:"17.1.3","object-path":"0.11.5",prettier:"^3.2.5",rxjs:"7.8.1","sanitize-html":"2.7.1","subscriptions-transport-ws":"0.9.19",sval:"0.4.8",tslib:"2.0.0",uuid:"^14.0.0",zod:"catalog:","zone.js":"0.15.1"},devDependencies:{"@altairgraphql/iframe-sandbox":"workspace:*","@analogjs/vite-plugin-angular":"^2.3.1","@analogjs/vitest-angular":"^2.3.1","@angular-eslint/builder":"20.3.0","@angular-eslint/eslint-plugin":"20.3.0","@angular-eslint/eslint-plugin-template":"20.3.0","@angular-eslint/schematics":"20.3.0","@angular-eslint/template-parser":"20.3.0","@angular/build":"^20.3.4","@angular/compiler":"20.3.19","@angular/compiler-cli":"20.3.19","@ngrx/schematics":"12.4.0","@playwright/test":"catalog:","@sentry/cli":"^3.0.0","@types/actioncable":"5.2.3","@types/chrome":"^0.0.209","@types/codemirror":"^5.60.15","@types/crypto-js":"^4.0.1","@types/dompurify":"^3.2.0","@types/electron":"^1.6.10","@types/file-saver":"^2.0.1","@types/firefox-webext-browser":"^109.0.0","@types/graphql":"^14.5.0","@types/json-bigint":"^1.0.1","@types/json-schema":"^7.0.6","@types/lodash-es":"^4.17.4","@types/memoizee":"^0.4.3","@types/mousetrap":"^1.6.3","@types/node":"catalog:","@types/object-path":"^0.11.0","@types/sanitize-html":"^2.6.2","@types/to-snake-case":"^1.0.0","@types/uuid":"^9.0.5","@types/zen-observable":"^0.8.1","@typescript-eslint/eslint-plugin":"^8.46.0","@typescript-eslint/parser":"^8.46.0","@vitest/coverage-v8":"catalog:","babel-plugin-transform-async-to-generator":"6.24.1","babel-preset-env":"1.7.0","babel-preset-react":"6.24.1",chai:"4.2.0","chai-as-promised":"7.1.1",electron:"catalog:",eslint:"^8.57.0","eslint-config-altair":"workspace:*","eslint-config-prettier":"^9.1.0","eslint-plugin-import":"^2.27.4","eslint-plugin-no-unsanitized":"^4.0.2","eslint-plugin-prettier":"^5.1.3","fake-indexeddb":"^4.0.1","jest-chrome":"^0.8.0",jsdom:"^28.1.0",less:"^4.2.0",ncp:"2.0.0","ng-mocks":"^14.13.4","ngrx-store-freeze":"0.2.4",protractor:"7.0.0",react:"17.0.1","rxjs-tslint-rules":"4.32.0","start-server-and-test":"1.11.0","ts-mocks":"2.6.1","ts-node":"9.1.1",typescript:"catalog:",vite:"catalog:","vite-tsconfig-paths":"^6.1.1",vitest:"catalog:"},homepage:"https://altair-graphql.github.io/altair/",license:"MIT",main:"dist/browser/main.js",private:!0,scripts:{analyze:"ng build --stats-json && npx webpack-bundle-analyzer dist/stats.json","analyze:prod":"ng build --aot --stats-json && npx webpack-bundle-analyzer dist/stats.json","ng:build":"cross-env NODE_OPTIONS=--max-old-space-size=8192 pnpm ng build --aot --stats-json --output-hashing=none",build:"node scripts/build.js",lint:"ng lint","new:component":"ng g component modules/altair/components/",ng:"ng",bootstrap:"pnpm build",start:"ng serve","sentry:sourcemaps:inject":"sentry-cli sourcemaps inject --org altair-graphql --project electron ./dist",test:"vitest run && ng lint","test-build":"ng lint && pnpm build && pnpm test-single-run","test-single-run":"vitest run","test:coverage":"vitest run --coverage","test:watch":"vitest"},repository:{type:"git",url:"https://github.com/altair-graphql/altair.git"}};var sr={production:!0,version:Hde.version,serverReady:!0};var IB="START_LOADING",Z5="STOP_LOADING",zB="SET_WINDOW_NAME",AB="SET_WINDOW_ID_IN_COLLECTION",jde="NOTIFY_EXPERIMENTAL",ik=class{constructor(t){this.windowId=t,this.type=IB}},i2=class{constructor(t){this.windowId=t,this.type=Z5}},nd=class{constructor(t,e){this.windowId=t,this.payload=e,this.type=zB}},rk=class{constructor(t,e){this.windowId=t,this.payload=e,this.type=AB}};var PB=()=>({isLoading:!1,title:"New window",hasDynamicTitle:!0});function $de(n=PB(),t){switch(t.type){case IB:return q(k({},n),{isLoading:!0});case Z5:return q(k({},n),{isLoading:!1});case zB:return q(k({},n),{title:t.payload.title,hasDynamicTitle:!t.payload.setByUser});case AB:return q(k({},n),{windowIdInCollection:t.payload.windowIdInCollection,collectionId:t.payload.collectionId});default:return n}}var qde=`
90
+ before dispatching the action. For example, someAction should be someAction().`);if(typeof e>"u")throw new TypeError("Actions must be objects");if(typeof e.type>"u")throw new TypeError("Actions must have a type property");super.next(e)}complete(){}ngOnDestroy(){super.complete()}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=oe({token:n,factory:n.\u0275fac}),n})(),B$e=[ch],gde=new Re("@ngrx/store Internal Root Guard"),ede=new Re("@ngrx/store Internal Initial State"),q5=new Re("@ngrx/store Initial State"),yde=new Re("@ngrx/store Reducer Factory"),tde=new Re("@ngrx/store Internal Reducer Factory Provider"),vde=new Re("@ngrx/store Initial Reducers"),yB=new Re("@ngrx/store Internal Initial Reducers"),nde=new Re("@ngrx/store Store Features"),ide=new Re("@ngrx/store Internal Store Reducers"),vB=new Re("@ngrx/store Internal Feature Reducers"),rde=new Re("@ngrx/store Internal Feature Configs"),_de=new Re("@ngrx/store Internal Store Features"),ode=new Re("@ngrx/store Internal Feature Reducers Token"),Cde=new Re("@ngrx/store Feature Reducers"),sde=new Re("@ngrx/store User Provided Meta Reducers"),Zx=new Re("@ngrx/store Meta Reducers"),ade=new Re("@ngrx/store Internal Resolved Meta Reducers"),lde=new Re("@ngrx/store User Runtime Checks Config"),cde=new Re("@ngrx/store Internal User Runtime Checks Config"),$5=new Re("@ngrx/store Internal Runtime Checks"),SB=new Re("@ngrx/store Check if Action types are unique");function S3(n,t={}){let e=Object.keys(n),i={};for(let o=0;o<e.length;o++){let s=e[o];typeof n[s]=="function"&&(i[s]=n[s])}let r=Object.keys(i);return function(s,a){s=s===void 0?t:s;let l=!1,c={};for(let u=0;u<r.length;u++){let h=r[u],p=i[h],f=s[h],_=p(f,a);c[h]=_,l=l||_!==f}return l?c:s}}function H$e(n,t){return Object.keys(n).filter(e=>e!==t).reduce((e,i)=>Object.assign(e,{[i]:n[i]}),{})}function wde(...n){return function(t){if(n.length===0)return t;let e=n[n.length-1];return n.slice(0,-1).reduceRight((r,o)=>o(r),e(t))}}function bde(n,t){return Array.isArray(t)&&t.length>0&&(n=wde.apply(null,[...t,n])),(e,i)=>{let r=n(e);return(o,s)=>(o=o===void 0?i:o,r(o,s))}}function j$e(n){let t=Array.isArray(n)&&n.length>0?wde(...n):e=>e;return(e,i)=>(e=t(e),(r,o)=>(r=r===void 0?i:r,e(r,o)))}var e2=class extends Zn{},w3=class extends ch{},Kx="@ngrx/store/update-reducers",Xx=(()=>{class n extends an{constructor(e,i,r,o){super(o(r,i)),this.dispatcher=e,this.initialState=i,this.reducers=r,this.reducerFactory=o}get currentReducers(){return this.reducers}addFeature(e){this.addFeatures([e])}addFeatures(e){let i=e.reduce((r,{reducers:o,reducerFactory:s,metaReducers:a,initialState:l,key:c})=>{let u=typeof o=="function"?j$e(a)(o,l):bde(s,a)(o,l);return r[c]=u,r},{});this.addReducers(i)}removeFeature(e){this.removeFeatures([e])}removeFeatures(e){this.removeReducers(e.map(i=>i.key))}addReducer(e,i){this.addReducers({[e]:i})}addReducers(e){this.reducers=k(k({},this.reducers),e),this.updateReducers(Object.keys(e))}removeReducer(e){this.removeReducers([e])}removeReducers(e){e.forEach(i=>{this.reducers=H$e(this.reducers,i)}),this.updateReducers(e)}updateReducers(e){this.next(this.reducerFactory(this.reducers,this.initialState)),this.dispatcher.next({type:Kx,features:e})}ngOnDestroy(){this.complete()}}return n.\u0275fac=function(e){return new(e||n)(ue(w3),ue(q5),ue(vde),ue(yde))},n.\u0275prov=oe({token:n,factory:n.\u0275fac}),n})(),$$e=[Xx,{provide:e2,useExisting:Xx},{provide:w3,useExisting:ch}],t2=(()=>{class n extends fe{ngOnDestroy(){this.complete()}}return n.\u0275fac=(()=>{let t;return function(i){return(t||(t=so(n)))(i||n)}})(),n.\u0275prov=oe({token:n,factory:n.\u0275fac}),n})(),q$e=[t2],b3=class extends Zn{},ude=(()=>{class n extends an{constructor(e,i,r,o){super(o);let a=e.pipe(bv(L9)).pipe(An(i)),l={state:o},c=a.pipe(pp(U$e,l));this.stateSubscription=c.subscribe(({state:u,action:h})=>{this.next(u),r.next(h)})}ngOnDestroy(){this.stateSubscription.unsubscribe(),this.complete()}}return n.INIT=lh,n.\u0275fac=function(e){return new(e||n)(ue(ch),ue(e2),ue(t2),ue(q5))},n.\u0275prov=oe({token:n,factory:n.\u0275fac}),n})();function U$e(n={state:void 0},[t,e]){let{state:i}=n;return{state:e(i,t),action:t}}var Q$e=[ude,{provide:b3,useExisting:ude}],mn=(()=>{class n extends Zn{constructor(e,i,r){super(),this.actionsObserver=i,this.reducerManager=r,this.source=e}select(e,...i){return ni.call(null,e,...i)(this)}lift(e){let i=new n(this,this.actionsObserver,this.reducerManager);return i.operator=e,i}dispatch(e){this.actionsObserver.next(e)}next(e){this.actionsObserver.next(e)}error(e){this.actionsObserver.error(e)}complete(){this.actionsObserver.complete()}addReducer(e,i){this.reducerManager.addReducer(e,i)}removeReducer(e){this.reducerManager.removeReducer(e)}}return n.\u0275fac=function(e){return new(e||n)(ue(b3),ue(ch),ue(Xx))},n.\u0275prov=oe({token:n,factory:n.\u0275fac}),n})(),W$e=[mn];function ni(n,t,...e){return function(r){let o;if(typeof n=="string"){let s=[t,...e].filter(Boolean);o=r.pipe(dN(n,...s))}else if(typeof n=="function")o=r.pipe(ze(s=>n(s,t)));else throw new TypeError(`Unexpected type '${typeof n}' in select operator, expected 'string' or 'function'`);return o.pipe(Hn())}}var xB="https://ngrx.io/guide/store/configuration/runtime-checks";function dde(n){return n===void 0}function hde(n){return n===null}function Sde(n){return Array.isArray(n)}function Y$e(n){return typeof n=="string"}function G$e(n){return typeof n=="boolean"}function Z$e(n){return typeof n=="number"}function xde(n){return typeof n=="object"&&n!==null}function X$e(n){return xde(n)&&!Sde(n)}function K$e(n){if(!X$e(n))return!1;let t=Object.getPrototypeOf(n);return t===Object.prototype||t===null}function CB(n){return typeof n=="function"}function J$e(n){return CB(n)&&n.hasOwnProperty("\u0275cmp")}function eqe(n,t){return Object.prototype.hasOwnProperty.call(n,t)}function pde(n,t){return n===t}function tqe(n,t,e){for(let i=0;i<n.length;i++)if(!e(n[i],t[i]))return!0;return!1}function kde(n,t=pde,e=pde){let i=null,r=null,o;function s(){i=null,r=null}function a(u=void 0){o={result:u}}function l(){o=void 0}function c(){if(o!==void 0)return o.result;if(!i)return r=n.apply(null,arguments),i=arguments,r;if(!tqe(arguments,i,t))return r;let u=n.apply(null,arguments);return i=arguments,e(r,u)?r:(r=u,u)}return{memoized:c,reset:s,setResult:a,clearResult:l}}function pn(...n){return iqe(kde)(...n)}function nqe(n,t,e,i){if(e===void 0){let o=t.map(s=>s(n));return i.memoized.apply(null,o)}let r=t.map(o=>o(n,e));return i.memoized.apply(null,[...r,e])}function iqe(n,t={stateFn:nqe}){return function(...e){let i=e;if(Array.isArray(i[0])){let[u,...h]=i;i=[...u,...h]}else i.length===1&&rqe(i[0])&&(i=oqe(i[0]));let r=i.slice(0,i.length-1),o=i[i.length-1],s=r.filter(u=>u.release&&typeof u.release=="function"),a=n(function(...u){return o.apply(null,u)}),l=kde(function(u,h){return t.stateFn.apply(null,[u,r,h,a])});function c(){l.reset(),a.reset(),s.forEach(u=>u.release())}return Object.assign(l.memoized,{release:c,projector:a.memoized,setResult:l.setResult,clearResult:l.clearResult})}}function rqe(n){return!!n&&typeof n=="object"&&Object.values(n).every(t=>typeof t=="function")}function oqe(n){let t=Object.values(n),e=Object.keys(n),i=(...r)=>e.reduce((o,s,a)=>q(k({},o),{[s]:r[a]}),{});return[...t,i]}function sqe(n){return n instanceof Re?R(n):n}function aqe(n,t){return t.map((e,i)=>{if(n[i]instanceof Re){let r=R(n[i]);return{key:e.key,reducerFactory:r.reducerFactory?r.reducerFactory:S3,metaReducers:r.metaReducers?r.metaReducers:[],initialState:r.initialState}}return e})}function lqe(n){return n.map(t=>t instanceof Re?R(t):t)}function Tde(n){return typeof n=="function"?n():n}function cqe(n,t){return n.concat(t)}function uqe(){if(R(mn,{optional:!0,skipSelf:!0}))throw new TypeError("The root Store has been provided more than once. Feature modules should provide feature states instead.");return"guarded"}function dqe(n,t){return function(e,i){let r=t.action(i)?wB(i):i,o=n(e,r);return t.state()?wB(o):o}}function wB(n){Object.freeze(n);let t=CB(n);return Object.getOwnPropertyNames(n).forEach(e=>{if(!e.startsWith("\u0275")&&eqe(n,e)&&(!t||e!=="caller"&&e!=="callee"&&e!=="arguments")){let i=n[e];(xde(i)||CB(i))&&!Object.isFrozen(i)&&wB(i)}}),n}function hqe(n,t){return function(e,i){if(t.action(i)){let o=bB(i);fde(o,"action")}let r=n(e,i);if(t.state()){let o=bB(r);fde(o,"state")}return r}}function bB(n,t=[]){return(dde(n)||hde(n))&&t.length===0?{path:["root"],value:n}:Object.keys(n).reduce((i,r)=>{if(i)return i;let o=n[r];return J$e(o)?i:dde(o)||hde(o)||Z$e(o)||G$e(o)||Y$e(o)||Sde(o)?!1:K$e(o)?bB(o,[...t,r]):{path:[...t,r],value:o}},!1)}function fde(n,t){if(n===!1)return;let e=n.path.join("."),i=new Error(`Detected unserializable ${t} at "${e}". ${xB}#strict${t}serializability`);throw i.value=n.value,i.unserializablePath=e,i}function pqe(n,t){return function(e,i){if(t.action(i)&&!at.isInAngularZone())throw new Error(`Action '${i.type}' running outside NgZone. ${xB}#strictactionwithinngzone`);return n(e,i)}}function fqe(n){return Sa()?k({strictStateSerializability:!1,strictActionSerializability:!1,strictStateImmutability:!0,strictActionImmutability:!0,strictActionWithinNgZone:!1,strictActionTypeUniqueness:!1},n):{strictStateSerializability:!1,strictActionSerializability:!1,strictStateImmutability:!1,strictActionImmutability:!1,strictActionWithinNgZone:!1,strictActionTypeUniqueness:!1}}function mqe({strictActionSerializability:n,strictStateSerializability:t}){return e=>n||t?hqe(e,{action:i=>n&&!kB(i),state:()=>t}):e}function gqe({strictActionImmutability:n,strictStateImmutability:t}){return e=>n||t?dqe(e,{action:i=>n&&!kB(i),state:()=>t}):e}function kB(n){return n.type.startsWith("@ngrx")}function yqe({strictActionWithinNgZone:n}){return t=>n?pqe(t,{action:e=>n&&!kB(e)}):t}function vqe(n){return[{provide:cde,useValue:n},{provide:lde,useFactory:_qe,deps:[cde]},{provide:$5,deps:[lde],useFactory:fqe},{provide:Zx,multi:!0,deps:[$5],useFactory:gqe},{provide:Zx,multi:!0,deps:[$5],useFactory:mqe},{provide:Zx,multi:!0,deps:[$5],useFactory:yqe}]}function Ode(){return[{provide:SB,multi:!0,deps:[$5],useFactory:Cqe}]}function _qe(n){return n}function Cqe(n){if(!n.strictActionTypeUniqueness)return;let t=Object.entries(_B).filter(([,e])=>e>1).map(([e])=>e);if(t.length)throw new Error(`Action types are registered more than once, ${t.map(e=>`"${e}"`).join(", ")}. ${xB}#strictactiontypeuniqueness`)}function wqe(n={},t={}){return[{provide:gde,useFactory:uqe},{provide:ede,useValue:t.initialState},{provide:q5,useFactory:Tde,deps:[ede]},{provide:yB,useValue:n},{provide:ide,useExisting:n instanceof Re?n:yB},{provide:vde,deps:[yB,[new _f(ide)]],useFactory:sqe},{provide:sde,useValue:t.metaReducers?t.metaReducers:[]},{provide:ade,deps:[Zx,sde],useFactory:cqe},{provide:tde,useValue:t.reducerFactory?t.reducerFactory:S3},{provide:yde,deps:[tde,ade],useFactory:bde},B$e,$$e,q$e,Q$e,W$e,vqe(t.runtimeChecks),Ode()]}function bqe(n,t,e={}){return[{provide:rde,multi:!0,useValue:n instanceof Object?{}:e},{provide:nde,multi:!0,useValue:{key:n instanceof Object?n.name:n,reducerFactory:!(e instanceof Re)&&e.reducerFactory?e.reducerFactory:S3,metaReducers:!(e instanceof Re)&&e.metaReducers?e.metaReducers:[],initialState:!(e instanceof Re)&&e.initialState?e.initialState:void 0}},{provide:_de,deps:[rde,nde],useFactory:aqe},{provide:vB,multi:!0,useValue:n instanceof Object?n.reducer:t},{provide:ode,multi:!0,useExisting:t instanceof Re?t:vB},{provide:Cde,multi:!0,deps:[vB,[new _f(ode)]],useFactory:lqe},Ode()]}var U5=(()=>{class n{constructor(e,i,r,o,s,a){}}return n.\u0275fac=function(e){return new(e||n)(ue(ch),ue(e2),ue(t2),ue(mn),ue(gde,8),ue(SB,8))},n.\u0275mod=He({type:n}),n.\u0275inj=Be({}),n})(),Jx=(()=>{class n{constructor(e,i,r,o,s){this.features=e,this.featureReducers=i,this.reducerManager=r;let a=e.map((l,c)=>{let h=i.shift()[c];return q(k({},l),{reducers:h,initialState:Tde(l.initialState)})});r.addFeatures(a)}ngOnDestroy(){this.reducerManager.removeFeatures(this.features)}}return n.\u0275fac=function(e){return new(e||n)(ue(_de),ue(Cde),ue(Xx),ue(U5),ue(SB,8))},n.\u0275mod=He({type:n}),n.\u0275inj=Be({}),n})(),Ede=(()=>{class n{static forRoot(e,i){return{ngModule:U5,providers:[...wqe(e,i)]}}static forFeature(e,i,r={}){return{ngModule:Jx,providers:[...bqe(e,i,r)]}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=He({type:n}),n.\u0275inj=Be({}),n})();var Y5=class{},Ide=(()=>{class n{handle(e){return e.key}static \u0275fac=function(i){return new(i||n)};static \u0275prov=oe({token:n,factory:n.\u0275fac})}return n})(),x3=class{},zde=(()=>{class n extends x3{compile(e,i){return e}compileTranslations(e,i){return e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=so(n)))(r||n)}})();static \u0275prov=oe({token:n,factory:n.\u0275fac})}return n})(),Of=class{},Ade=(()=>{class n extends Of{getTranslation(e){return rt({})}static \u0275fac=(()=>{let e;return function(r){return(e||(e=so(n)))(r||n)}})();static \u0275prov=oe({token:n,factory:n.\u0275fac})}return n})();function ek(n,t){if(n===t)return!0;if(n===null||t===null)return!1;if(n!==n&&t!==t)return!0;let e=typeof n,i=typeof t,r;if(e==i&&e=="object")if(Array.isArray(n)){if(!Array.isArray(t))return!1;if((r=n.length)==t.length){for(let o=0;o<r;o++)if(!ek(n[o],t[o]))return!1;return!0}}else{if(Array.isArray(t))return!1;if(Np(n)&&Np(t)){let o=Object.create(null);for(let s in n){if(!ek(n[s],t[s]))return!1;o[s]=!0}for(let s in t)if(!(s in o)&&typeof t[s]<"u")return!1;return!0}}return!1}function Tf(n){return typeof n<"u"&&n!==null}function Dde(n){return n!==void 0}function Np(n){return W5(n)&&!n2(n)&&n!==null}function W5(n){return typeof n=="object"&&n!==null}function n2(n){return Array.isArray(n)}function tk(n){return typeof n=="string"}function Sqe(n){return typeof n=="function"}function nk(n){if(n2(n))return n.map(t=>nk(t));if(Np(n)){let t={};return Object.keys(n).forEach(e=>{t[e]=nk(n[e])}),t}else return n}function MB(n,t){if(!W5(n))return nk(t);let e=nk(n);return W5(e)&&W5(t)&&Object.keys(t).forEach(i=>{Np(t[i])?i in n?e[i]=MB(n[i],t[i]):Object.assign(e,{[i]:t[i]}):Object.assign(e,{[i]:t[i]})}),e}function Pde(n,t){let e=t.split(".");t="";do{t+=e.shift();let i=!e.length;if(Tf(n)){if(Np(n)&&Dde(n[t])&&(Np(n[t])||n2(n[t])||i)){n=n[t],t="";continue}if(n2(n)){let r=parseInt(t,10);if(Dde(n[r])&&(Np(n[r])||n2(n[r])||i)){n=n[r],t="";continue}}}if(i){n=void 0;continue}t+="."}while(e.length);return n}function xqe(n,t,e){return MB(n,kqe(t,e))}function kqe(n,t){return n.split(".").reduceRight((e,i)=>({[i]:e}),t)}var k3=class{},Rde=(()=>{class n extends k3{templateMatcher=/{{\s?([^{}\s]*)\s?}}/g;interpolate(e,i){if(tk(e))return this.interpolateString(e,i);if(Sqe(e))return this.interpolateFunction(e,i)}interpolateFunction(e,i){return e(i)}interpolateString(e,i){return i?e.replace(this.templateMatcher,(r,o)=>{let s=this.getInterpolationReplacement(i,o);return s!==void 0?s:r}):e}getInterpolationReplacement(e,i){return this.formatValue(Pde(e,i))}formatValue(e){if(tk(e))return e;if(typeof e=="number"||typeof e=="boolean")return e.toString();if(e===null)return"null";if(n2(e))return e.join(", ");if(W5(e))return typeof e.toString=="function"&&e.toString!==Object.prototype.toString?e.toString():JSON.stringify(e)}static \u0275fac=(()=>{let e;return function(r){return(e||(e=so(n)))(r||n)}})();static \u0275prov=oe({token:n,factory:n.\u0275fac})}return n})(),TB=(()=>{class n{_onTranslationChange=new fe;_onLangChange=new fe;_onFallbackLangChange=new fe;fallbackLang=null;currentLang;translations={};languages=[];getTranslations(e){return this.translations[e]}setTranslations(e,i,r){this.translations[e]=r&&this.hasTranslationFor(e)?MB(this.translations[e],i):i,this.addLanguages([e]),this._onTranslationChange.next({lang:e,translations:this.getTranslations(e)})}getLanguages(){return this.languages}getCurrentLang(){return this.currentLang}getFallbackLang(){return this.fallbackLang}setFallbackLang(e,i=!0){this.fallbackLang=e,i&&this._onFallbackLangChange.next({lang:e,translations:this.translations[e]})}setCurrentLang(e,i=!0){this.currentLang=e,i&&this._onLangChange.next({lang:e,translations:this.translations[e]})}get onTranslationChange(){return this._onTranslationChange.asObservable()}get onLangChange(){return this._onLangChange.asObservable()}get onFallbackLangChange(){return this._onFallbackLangChange.asObservable()}addLanguages(e){this.languages=Array.from(new Set([...this.languages,...e]))}hasTranslationFor(e){return typeof this.translations[e]<"u"}deleteTranslations(e){delete this.translations[e]}getTranslation(e){let i=this.getValue(this.currentLang,e);return i===void 0&&this.fallbackLang!=null&&this.fallbackLang!==this.currentLang&&(i=this.getValue(this.fallbackLang,e)),i}getValue(e,i){return Pde(this.getTranslations(e),i)}static \u0275fac=function(i){return new(i||n)};static \u0275prov=oe({token:n,factory:n.\u0275fac})}return n})(),OB=new Re("TRANSLATE_CONFIG"),Q5=n=>ga(n)?n:rt(n);var G5=(()=>{class n{loadingTranslations;pending=!1;_translationRequests={};lastUseLanguage=null;currentLoader=R(Of);compiler=R(x3);parser=R(k3);missingTranslationHandler=R(Y5);store=R(TB);extend=!1;get onTranslationChange(){return this.store.onTranslationChange}get onLangChange(){return this.store.onLangChange}get onFallbackLangChange(){return this.store.onFallbackLangChange}get onDefaultLangChange(){return this.store.onFallbackLangChange}constructor(){let e=k({extend:!1,fallbackLang:null},R(OB,{optional:!0}));e.lang&&this.use(e.lang),e.fallbackLang&&this.setFallbackLang(e.fallbackLang),e.extend&&(this.extend=!0)}setFallbackLang(e){this.getFallbackLang()||this.store.setFallbackLang(e,!1);let i=this.loadOrExtendLanguage(e);return ga(i)?(i.pipe(Ct(1)).subscribe({next:()=>{this.store.setFallbackLang(e)},error:()=>{}}),i):(this.store.setFallbackLang(e),rt(this.store.getTranslations(e)))}use(e){this.lastUseLanguage=e,this.getCurrentLang()||this.store.setCurrentLang(e,!1);let i=this.loadOrExtendLanguage(e);return ga(i)?(i.pipe(Ct(1)).subscribe({next:()=>{this.changeLang(e)},error:()=>{}}),i):(this.changeLang(e),rt(this.store.getTranslations(e)))}loadOrExtendLanguage(e){if(!this.store.hasTranslationFor(e)||this.extend)return this._translationRequests[e]=this._translationRequests[e]||this.loadAndCompileTranslations(e),this._translationRequests[e]}changeLang(e){e===this.lastUseLanguage&&this.store.setCurrentLang(e)}getCurrentLang(){return this.store.getCurrentLang()}loadAndCompileTranslations(e){this.pending=!0;let i=this.currentLoader.getTranslation(e).pipe($u(1),Ct(1));return this.loadingTranslations=i.pipe(ze(r=>this.compiler.compileTranslations(r,e)),$u(1),Ct(1)),this.loadingTranslations.subscribe({next:r=>{this.store.setTranslations(e,r,this.extend),this.pending=!1},error:r=>{this.pending=!1}}),i}setTranslation(e,i,r=!1){let o=this.compiler.compileTranslations(i,e);this.store.setTranslations(e,o,r||this.extend)}getLangs(){return this.store.getLanguages()}addLangs(e){this.store.addLanguages(e)}getParsedResultForKey(e,i){let r=this.getTextToInterpolate(e);if(Tf(r))return this.runInterpolation(r,i);let o=this.missingTranslationHandler.handle(k({key:e,translateService:this},i!==void 0&&{interpolateParams:i}));return o!==void 0?o:e}getFallbackLang(){return this.store.getFallbackLang()}getTextToInterpolate(e){return this.store.getTranslation(e)}runInterpolation(e,i){if(Tf(e))return n2(e)?this.runInterpolationOnArray(e,i):Np(e)?this.runInterpolationOnDict(e,i):this.parser.interpolate(e,i)}runInterpolationOnArray(e,i){return e.map(r=>this.runInterpolation(r,i))}runInterpolationOnDict(e,i){let r={};for(let o in e){let s=this.runInterpolation(e[o],i);s!==void 0&&(r[o]=s)}return r}getParsedResult(e,i){return e instanceof Array?this.getParsedResultForArray(e,i):this.getParsedResultForKey(e,i)}getParsedResultForArray(e,i){let r={},o=!1;for(let a of e)r[a]=this.getParsedResultForKey(a,i),o=o||ga(r[a]);if(!o)return r;let s=e.map(a=>Q5(r[a]));return Hu(s).pipe(ze(a=>{let l={};return a.forEach((c,u)=>{l[e[u]]=c}),l}))}get(e,i){if(!Tf(e)||!e.length)throw new Error('Parameter "key" is required and cannot be empty');return this.pending?this.loadingTranslations.pipe(sc(()=>Q5(this.getParsedResult(e,i)))):Q5(this.getParsedResult(e,i))}getStreamOnTranslationChange(e,i){if(!Tf(e)||!e.length)throw new Error('Parameter "key" is required and cannot be empty');return bm(Ga(()=>this.get(e,i)),this.onTranslationChange.pipe(Ae(()=>{let r=this.getParsedResult(e,i);return Q5(r)})))}stream(e,i){if(!Tf(e)||!e.length)throw new Error('Parameter "key" required');return bm(Ga(()=>this.get(e,i)),this.onLangChange.pipe(Ae(()=>{let r=this.getParsedResult(e,i);return Q5(r)})))}instant(e,i){if(!Tf(e)||e.length===0)throw new Error('Parameter "key" is required and cannot be empty');let r=this.getParsedResult(e,i);return ga(r)?Array.isArray(e)?e.reduce((o,s)=>(o[s]=s,o),{}):e:r}set(e,i,r=this.getCurrentLang()){this.store.setTranslations(r,xqe(this.store.getTranslations(r),e,tk(i)?this.compiler.compile(i,r):this.compiler.compileTranslations(i,r)),!1)}reloadLang(e){return this.resetLang(e),this.loadAndCompileTranslations(e)}resetLang(e){delete this._translationRequests[e],this.store.deleteTranslations(e)}static getBrowserLang(){if(typeof window>"u"||!window.navigator)return;let e=this.getBrowserCultureLang();return e?e.split(/[-_]/)[0]:void 0}static getBrowserCultureLang(){if(!(typeof window>"u"||typeof window.navigator>"u"))return window.navigator.languages?window.navigator.languages[0]:window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage}getBrowserLang(){return n.getBrowserLang()}getBrowserCultureLang(){return n.getBrowserCultureLang()}get defaultLang(){return this.getFallbackLang()}get currentLang(){return this.store.getCurrentLang()}get langs(){return this.store.getLanguages()}setDefaultLang(e){return this.setFallbackLang(e)}getDefaultLang(){return this.getFallbackLang()}static \u0275fac=function(i){return new(i||n)};static \u0275prov=oe({token:n,factory:n.\u0275fac})}return n})();var Qt=(()=>{class n{translate=R(G5);_ref=R(Tt);value="";lastKey=null;lastParams=[];onTranslationChange;onLangChange;onFallbackLangChange;updateValue(e,i,r){let o=s=>{this.value=s!==void 0?s:e,this.lastKey=e,this._ref.markForCheck()};if(r){let s=this.translate.getParsedResult(e,i);ga(s)?s.subscribe(o):o(s)}this.translate.get(e,i).subscribe(o)}transform(e,...i){if(!e||!e.length)return e;if(ek(e,this.lastKey)&&ek(i,this.lastParams))return this.value;let r;if(Tf(i[0])&&i.length)if(tk(i[0])&&i[0].length){let o=i[0].replace(/(')?([a-zA-Z0-9_]+)(')?(\s)?:/g,'"$2":').replace(/:(\s)?(')(.*?)(')/g,':"$3"');try{r=JSON.parse(o)}catch(s){throw new SyntaxError(`Wrong parameter in TranslatePipe. Expected a valid Object, received: ${i[0]}`)}}else Np(i[0])&&(r=i[0]);return this.lastKey=e,this.lastParams=i,this.updateValue(e,r),this._dispose(),this.onTranslationChange||(this.onTranslationChange=this.translate.onTranslationChange.subscribe(o=>{(this.lastKey&&o.lang===this.translate.getCurrentLang()||o.lang===this.translate.getFallbackLang())&&(this.lastKey=null,this.updateValue(e,r,o.translations))})),this.onLangChange||(this.onLangChange=this.translate.onLangChange.subscribe(o=>{this.lastKey&&(this.lastKey=null,this.updateValue(e,r,o.translations))})),this.onFallbackLangChange||(this.onFallbackLangChange=this.translate.onFallbackLangChange.subscribe(()=>{this.lastKey&&(this.lastKey=null,this.updateValue(e,r))})),this.value}_dispose(){typeof this.onTranslationChange<"u"&&(this.onTranslationChange.unsubscribe(),this.onTranslationChange=void 0),typeof this.onLangChange<"u"&&(this.onLangChange.unsubscribe(),this.onLangChange=void 0),typeof this.onFallbackLangChange<"u"&&(this.onFallbackLangChange.unsubscribe(),this.onFallbackLangChange=void 0)}ngOnDestroy(){this._dispose()}static \u0275fac=function(i){return new(i||n)};static \u0275pipe=ao({name:"translate",type:n,pure:!1});static \u0275prov=oe({token:n,factory:n.\u0275fac})}return n})();function Nde(n){return{provide:Of,useClass:n}}function Lde(n){return{provide:x3,useClass:n}}function Fde(n){return{provide:k3,useClass:n}}function Vde(n){return{provide:Y5,useClass:n}}function Bde(n={}){return EB(k({compiler:Lde(zde),parser:Fde(Rde),loader:Nde(Ade),missingTranslationHandler:Vde(Ide)},n),!0)}function EB(n={},t){let e=[];n.loader&&e.push(n.loader),n.compiler&&e.push(n.compiler),n.parser&&e.push(n.parser),n.missingTranslationHandler&&e.push(n.missingTranslationHandler),t&&e.push(TB),(n.useDefaultLang||n.defaultLanguage)&&(console.warn("The `useDefaultLang` and `defaultLanguage` options are deprecated. Please use `fallbackLang` instead."),n.useDefaultLang===!0&&n.defaultLanguage&&(n.fallbackLang=n.defaultLanguage));let i={fallbackLang:n.fallbackLang??null,lang:n.lang,extend:n.extend??!1};return e.push({provide:OB,useValue:i}),e.push({provide:G5,useClass:G5,deps:[TB,Of,x3,k3,Y5,OB]}),e}var DB=(()=>{class n{static forRoot(e={}){return{ngModule:n,providers:[...EB(k({compiler:Lde(zde),parser:Fde(Rde),loader:Nde(Ade),missingTranslationHandler:Vde(Ide)},e),!0)]}}static forChild(e={}){return{ngModule:n,providers:[...EB(e,e.isolate??!1)]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=He({type:n});static \u0275inj=Be({})}return n})();Uu();var Hde={name:"@altairgraphql/app",description:"Contains the altair app",version:"8.5.6",author:"Samuel Imolorhe <hello@altairgraphql.dev> (https://altairgraphql.dev/)",dependencies:{"@altairgraphql/api-utils":"workspace:*","@altairgraphql/db":"workspace:*","@altairgraphql/electron-interop":"workspace:*","@altairgraphql/tauri":"workspace:*","@angular/animations":"20.3.19","@angular/cdk":"20.2.7","@angular/cli":"20.3.4","@angular/common":"20.3.19","@angular/core":"^20.3.3","@angular/forms":"20.3.19","@angular/platform-browser":"20.3.19","@angular/platform-browser-dynamic":"20.3.19","@angular/platform-server":"20.3.19","@angular/router":"20.3.19","@apollo/client":"3.5.6","@codemirror/autocomplete":"^6.20.0","@codemirror/commands":"^6.10.0","@codemirror/lang-javascript":"^6.2.4","@codemirror/lang-json":"^6.0.2","@codemirror/language":"^6.11.3","@codemirror/lint":"^6.9.2","@codemirror/search":"^6.5.11","@codemirror/state":"^6.5.2","@codemirror/view":"^6.38.8","@emotion/css":"^11.13.5","@fontsource/jetbrains-mono":"4.2.2","@lezer/common":"1.4.0","@lezer/highlight":"1.2.3","@lezer/lr":"1.4.4","@ngneat/hot-toast":"2.0.1","@ngneat/overview":"1.0.0","@ngneat/until-destroy":"8.0.1","@ngrx/effects":"15.4.0","@ngrx/store":"15.4.0","@ngrx/store-devtools":"15.4.0","@ngui/auto-complete":"3.0.0","@ngx-translate/core":"^17.0.0","@ngx-translate/http-loader":"^17.0.0","@sentry/electron":"^7.5.0","@supabase/supabase-js":"1.29.1","@webcomponents/custom-elements":"1.4.1",abab:"2.0.6",actioncable:"5.2.8",ajv:"^8.11.2","altair-graphql-core":"workspace:*","angular-resizable-element":"^6.0.0","angular-split":"^18.0.0","apollo-cache-inmemory":"1.6.6","apollo-link":"1.2.14","apollo-link-http":"1.5.17","aws-appsync-auth-link":"^3.0.8","aws-appsync-subscription-link":"^3.1.3","cm6-graphql":"0.0.14","codemirror-graphql":"1.0.2","codemirror-json-schema":"^0.6.0",comlink:"4.3.0","compare-versions":"^6.1.1","cookie-parser":"1.4.5","core-js":"3.6.5","crypto-js":"3.3.0",curlup:"1.0.0",deepmerge:"4.2.2",dexie:"^4.4.2",dompurify:"^3.4.2",express:"^4.19.2","file-dialog":"0.0.8","file-saver":"2.0.2","fuse.js":"6.4.6",graphql:"15.5.1","graphql-language-service":"^5.2.0","graphql-language-service-parser":"1.10.4","graphql-language-service-types":"1.8.2","graphql-query-compress":"1.2.3","graphql-ws":"5.9.1","hotkeys-js":"^3.13.15","json-bigint":"^1.0.0","json-schema":"^0.4.0","lodash-es":"4.17.21",loglevel:"1.8.0","loglevel-plugin-prefix":"0.8.4","lucide-angular":"^0.298.0",marked:"^15.0.3",memoizee:"0.4.14","ng-zorro-antd":"^15.1.1","ngrx-store-localstorage":"12.0.1","ngx-cookie-service":"14.0.1","ngx-markdown":"^14.0.1","ngx-pipes":"^3.2.2","ngx-sonner":"^3.1.0","ngx-take-until-destroy":"5.4.0","ngx-toastr":"^18.0.0",nx:"17.1.3","object-path":"0.11.5",prettier:"^3.2.5",rxjs:"7.8.1","sanitize-html":"2.7.1","subscriptions-transport-ws":"0.9.19",sval:"0.4.8",tslib:"2.0.0",uuid:"^14.0.0",zod:"catalog:","zone.js":"0.15.1"},devDependencies:{"@altairgraphql/iframe-sandbox":"workspace:*","@analogjs/vite-plugin-angular":"^2.3.1","@analogjs/vitest-angular":"^2.3.1","@angular-eslint/builder":"20.3.0","@angular-eslint/eslint-plugin":"20.3.0","@angular-eslint/eslint-plugin-template":"20.3.0","@angular-eslint/schematics":"20.3.0","@angular-eslint/template-parser":"20.3.0","@angular/build":"^20.3.4","@angular/compiler":"20.3.19","@angular/compiler-cli":"20.3.19","@ngrx/schematics":"12.4.0","@playwright/test":"catalog:","@sentry/cli":"^3.0.0","@types/actioncable":"5.2.3","@types/chrome":"^0.0.209","@types/codemirror":"^5.60.15","@types/crypto-js":"^4.0.1","@types/dompurify":"^3.2.0","@types/electron":"^1.6.10","@types/file-saver":"^2.0.1","@types/firefox-webext-browser":"^109.0.0","@types/graphql":"^14.5.0","@types/json-bigint":"^1.0.1","@types/json-schema":"^7.0.6","@types/lodash-es":"^4.17.4","@types/memoizee":"^0.4.3","@types/mousetrap":"^1.6.3","@types/node":"catalog:","@types/object-path":"^0.11.0","@types/sanitize-html":"^2.6.2","@types/to-snake-case":"^1.0.0","@types/uuid":"^9.0.5","@types/zen-observable":"^0.8.1","@typescript-eslint/eslint-plugin":"^8.46.0","@typescript-eslint/parser":"^8.46.0","@vitest/coverage-v8":"catalog:","babel-plugin-transform-async-to-generator":"6.24.1","babel-preset-env":"1.7.0","babel-preset-react":"6.24.1",chai:"4.2.0","chai-as-promised":"7.1.1",electron:"catalog:",eslint:"^8.57.0","eslint-config-altair":"workspace:*","eslint-config-prettier":"^9.1.0","eslint-plugin-import":"^2.27.4","eslint-plugin-no-unsanitized":"^4.0.2","eslint-plugin-prettier":"^5.1.3","fake-indexeddb":"^4.0.1","jest-chrome":"^0.8.0",jsdom:"^28.1.0",less:"^4.2.0",ncp:"2.0.0","ng-mocks":"^14.13.4","ngrx-store-freeze":"0.2.4",protractor:"7.0.0",react:"17.0.1","rxjs-tslint-rules":"4.32.0","start-server-and-test":"1.11.0","ts-mocks":"2.6.1","ts-node":"9.1.1",typescript:"catalog:",vite:"catalog:","vite-tsconfig-paths":"^6.1.1",vitest:"catalog:"},homepage:"https://altair-graphql.github.io/altair/",license:"MIT",main:"dist/browser/main.js",private:!0,scripts:{analyze:"ng build --stats-json && npx webpack-bundle-analyzer dist/stats.json","analyze:prod":"ng build --aot --stats-json && npx webpack-bundle-analyzer dist/stats.json","ng:build":"cross-env NODE_OPTIONS=--max-old-space-size=8192 pnpm ng build --aot --stats-json --output-hashing=none",build:"node scripts/build.js",lint:"ng lint","new:component":"ng g component modules/altair/components/",ng:"ng",bootstrap:"pnpm build",start:"ng serve","sentry:sourcemaps:inject":"sentry-cli sourcemaps inject --org altair-graphql --project electron ./dist",test:"vitest run && ng lint","test-build":"ng lint && pnpm build && pnpm test-single-run","test-single-run":"vitest run","test:coverage":"vitest run --coverage","test:watch":"vitest"},repository:{type:"git",url:"https://github.com/altair-graphql/altair.git"}};var sr={production:!0,version:Hde.version,serverReady:!0};var IB="START_LOADING",Z5="STOP_LOADING",zB="SET_WINDOW_NAME",AB="SET_WINDOW_ID_IN_COLLECTION",jde="NOTIFY_EXPERIMENTAL",ik=class{constructor(t){this.windowId=t,this.type=IB}},i2=class{constructor(t){this.windowId=t,this.type=Z5}},nd=class{constructor(t,e){this.windowId=t,this.payload=e,this.type=zB}},rk=class{constructor(t,e){this.windowId=t,this.payload=e,this.type=AB}};var PB=()=>({isLoading:!1,title:"New window",hasDynamicTitle:!0});function $de(n=PB(),t){switch(t.type){case IB:return q(k({},n),{isLoading:!0});case Z5:return q(k({},n),{isLoading:!1});case zB:return q(k({},n),{title:t.payload.title,hasDynamicTitle:!t.payload.setByUser});case AB:return q(k({},n),{windowIdInCollection:t.payload.windowIdInCollection,collectionId:t.payload.collectionId});default:return n}}var qde=`
91
91
  # Welcome to Altair GraphQL Client.
92
92
  # You can send your request using CmdOrCtrl + Enter.
93
93
 
@@ -299,13 +299,13 @@ S ::= [ ]*
299
299
  `))},encapsulation:2,changeDetection:0})}}return n})(),bX=()=>(Ne.log("no op"),!0);var Ift=["editor"],GCe="app-variables-editor",ez=(()=>{class n{constructor(){this.variables=Z(""),this.variableToType=Z({}),this.tabSize=Z(4),this.showVariableDialog=Z(!1),this.enableExperimental=Z(!1),this.variablesChange=me(),this.editorExtensions=[b7e()],Rn(()=>{this.updateVariablesToType(this.variableToType())})}ngAfterViewInit(){let e=this.variableToType();this.editor?.view&&e&&PG(this.editor.view,FZ(e))}updateVariablesToType(e){e&&this.editor?.view&&PG(this.editor.view,FZ(e))}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=re({type:n,selectors:[["app-variables-editor"]],viewQuery:function(i,r){if(i&1&&kt(Ift,5),i&2){let o;ot(o=st())&&(r.editor=o.first)}},inputs:{variables:[1,"variables"],variableToType:[1,"variableToType"],tabSize:[1,"tabSize"],showVariableDialog:[1,"showVariableDialog"],enableExperimental:[1,"enableExperimental"]},outputs:{variablesChange:"variablesChange"},standalone:!1,decls:6,vars:3,consts:[["editor",""],[1,"variables-editor"],[3,"ngModelChange","fullHeight","extensions","ngModel"]],template:function(i,r){if(i&1){let o=ie();m(0,"div",1),d(1,`
300
300
  `),m(2,"app-codemirror",2,0),N("ngModelChange",function(a){return E(o),M(r.variablesChange.emit(a))}),y(),d(4,`
301
301
  `),y(),d(5,`
302
- `)}i&2&&(g(2),S("fullHeight",!0)("extensions",r.editorExtensions)("ngModel",r.variables()))},dependencies:[nn,wn,xo],encapsulation:2,changeDetection:0})}}return n})();var Mg=(()=>{class n{constructor(){this.store=R(mn),this.windowService=R(Go),this.zone=R(at),this.windowIds=[],this.activeWindowId="",this.shortcuts=[],hd.filter=function(e){return!0},this.store.subscribe(e=>{this.windowIds=Object.keys(e.windows),this.activeWindowId=e.windowsMeta.activeWindowId})}connect(){this.bindShortcut(["Ctrl+Shift+V"],()=>this.store.dispatch(new Vf(this.activeWindowId)),"Toggle Variable Pane",!0),this.bindShortcut(["Ctrl+Shift+H"],()=>this.store.dispatch(new Ff(this.activeWindowId)),"Toggle Header Pane",!0),this.bindShortcut(["Ctrl+Shift+R"],()=>this.store.dispatch(new _s(this.activeWindowId)),"Reload Docs"),this.bindShortcut(["Ctrl+Shift+D"],()=>this.store.dispatch(new Hf(this.activeWindowId)),"Toggle Docs"),this.bindShortcut(["Ctrl+Shift+P"],()=>{document.activeElement?.closest(GCe)?this.store.dispatch(new pO(this.activeWindowId)):this.store.dispatch(new T3(this.activeWindowId))},"Prettify Query"),this.bindShortcut(["Command+Enter","Ctrl+Enter"],()=>this.store.dispatch(new Ef(this.activeWindowId)),"Send Request"),this.bindShortcut(["Command+S"],()=>this.store.dispatch(new Uf({windowId:this.activeWindowId})),"Save Request"),this.bindShortcut(["Ctrl+T"],()=>this.windowService.newWindow().pipe(Ct(1),Z7).subscribe(),"Create new window"),this.bindShortcut(["Ctrl+Shift+T"],()=>this.store.dispatch(new jf),"Reopen closed window"),this.bindShortcut(["Ctrl+W"],()=>{this.windowIds.length>1&&this.windowService.removeWindow(this.activeWindowId).pipe(Z7).subscribe()},"Close window")}bindShortcut(e,i,r,o=!1){return this.shortcuts.push({keys:e,description:r}),hd(e.map(s=>s.toLowerCase()).join(","),()=>{if(!(!o&&this.isInPopup()))return this.zone.run(i),!1})}getShortcuts(){let e=[{title:"General",shortcuts:this.shortcuts},{title:"Editor",shortcuts:[{keys:["Ctrl+D"],description:"Jump to docs"},{keys:["Ctrl+F","Alt+F"],description:"Search in context"},{keys:["Ctrl+/","Command+/"],description:"Toggle comment"},{keys:["Ctrl+Shift+Enter"],description:"Fill all fields"}]}];return Cc()&&e.push({title:"Electron Shortcuts",shortcuts:[]}),e}isInPopup(){return!!document.activeElement?.closest("nz-modal-container")}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=oe({token:n,factory:n.\u0275fac})}}return n})();Uu();Uu();var b1=(()=>{class n{constructor(){this.errorHandler=R(qo),this.eventStream=new fe,this.appReadyStream=new Qi(1)}group(){return new SX(this)}emit(e,i){return e==="app-ready"&&this.appReadyStream.next(i),this.eventStream.next({event:e,payload:i})}on(e,i){return e==="app-ready"?this.appReadyStream.subscribe(r=>{try{i(r)}catch(o){this.errorHandler.handleError(o)}}):this.eventStream.pipe(xt(r=>r.event===e)).subscribe(r=>{try{i(r.payload)}catch(o){this.errorHandler.handleError(o)}})}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=oe({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),SX=class{constructor(t){this.pluginEventService=t,this.subscriptions=[]}emit(t,e){return this.pluginEventService.emit(t,e)}on(t,e){let i=this.pluginEventService.on(t,e);return this.subscriptions.push(i),{unsubscribe:()=>{if(this.subscriptions=this.subscriptions.filter(r=>r!==i),!i.closed)return i.unsubscribe()}}}unsubscribe(){for(let t of this.subscriptions)t.unsubscribe();this.subscriptions=[]}};var S1=(()=>{class n{constructor(){this.registry=new Map,this.addDefaults()}addDefaults(){this.registry.set("light",Fme),this.registry.set("dark",Vme),this.registry.set("dracula",Bme)}getTheme(e){return this.registry.get(e)}getThemeFromSettings(e,i=!1){let r=i?e["theme.dark"]:e.theme;if(i&&!r)return;let o=r&&this.getTheme(r)||{isSystem:!0},s=k(k(k({},e["theme.fontsize"]&&{"fontSize.remBase":e["theme.fontsize"]}),e["theme.editorFontSize"]&&{"fontSize.code":e["theme.editorFontSize"]}),e["theme.editorFontFamily"]&&{"fontFamily.code":e["theme.editorFontFamily"]}),a=Ame((i?e["themeConfig.dark"]:e.themeConfig)||{});return this.mergeThemes(o,s,a)}addTheme(e,i){if(this.registry.has(e))throw new Error(`"${e}" theme already exists`);this.registry.set(e,i)}mergeThemes(...e){return Pme(...e)}getAllThemes(){return Array.from(this.registry.keys())}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=oe({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();Uu();var xX=n=>`${n}_response`,kX=n=>`${n}_error`;var Cw=class{subscribe(t,e){this.onMessage(i=>{i.type===t&&e(t,i)})}request(t,...e){return new Promise((i,r)=>{let o=Fr();this.onMessage(s=>{switch(s.type){case xX(t):return s.payload.id!==o?void 0:i(s.payload.response);case kX(t):return s.payload.id!==o?void 0:r(s.payload.error)}}),this.send(t,{id:o,args:e})})}respond(t,e){this.subscribe(t,(i,r)=>G(this,null,function*(){let{id:o,args:s}=r.payload;try{let a=yield e(...s);this.send(xX(i),{id:o,response:a})}catch(a){this.send(kX(i),{id:o,error:`${a.message??a}`})}}))}};var TX=(n,t)=>{let e=new URLSearchParams(t),i=new URL(n);return new URL(`${i.origin}${i.pathname}?${e.toString()}`).toString()};var j6={MAIN:"main",PANEL:"panel"};var Dg=class extends Cw{constructor(t){super(),this.opts=t,this.messageListeners=[],this.iframe=this.createIframe(),this.frameReadyPromise=new Promise(e=>{this.iframe.addEventListener("load",()=>{e()})})}createIframe(){let t=document.createElement("iframe");t.id=this.opts.id,this.opts.instanceType===j6.PANEL?(t.style.width="100%",t.style.height="100%",t.style.border="none",t.style.display="block","width"in this.opts&&this.opts.width&&(t.style.minWidth=`${this.opts.width}px`)):t.style.display="none";let e=q(k({},this.opts.additionalParams),{sc:window.location.origin,id:this.opts.id,instanceType:this.getInstanceType()});if(t.sandbox.add("allow-scripts"),this.opts.additionalSandboxAttributes&&this.opts.additionalSandboxAttributes.forEach(i=>{t.sandbox.add(i)}),t.referrerPolicy="no-referrer",this.opts.type==="scripts"){let i=TX(this.opts.sandboxUrl,q(k({},e),{sandbox_type:"plugin",plugin_sandbox_opts:JSON.stringify(this.opts)}));t.src=i}else if(this.opts.type==="url"){let i=TX(this.opts.pluginEntrypointUrl,e);t.src=i}return this.opts.disableAppend||document.body.appendChild(t),t}frameReady(){return G(this,null,function*(){yield this.frameReadyPromise})}getIframe(){return this.iframe}getInstanceType(){return this.opts.instanceType??j6.MAIN}onMessage(t){let e=i=>{if(!(i.origin!=="null"||i.source!==this.iframe.contentWindow)){if(i.data.frameId!==this.opts.id){console.error("Invalid frameId in data",i.data.frameId,this.opts.id);return}t(i.data)}};window.addEventListener("message",e,!1),this.messageListeners.push(e)}send(t,e){this.frameReady().then(()=>{this.iframe.contentWindow?.postMessage({type:t,payload:e},"*")})}onError(t){this.iframe.addEventListener("error",t)}destroy(){this.messageListeners.forEach(t=>{window.removeEventListener("message",t)}),this.iframe.remove()}};var XCe="plugin-engine::ready",KCe="plugin::subscribe_to_event",JCe="plugin::create_action",ewe="plugin::get_app_style_url",twe=n=>`action::${n}`;var zft=["createPanel","destroyPanel","createAction"],Aft=["on","createAction"];function Pft(n){try{return Array.from(document.styleSheets).map(e=>Array.from(e.cssRules).map(i=>i.cssText).join("")).filter(e=>n.some(i=>e.includes(`.${i}`)))}catch{return[]}}var $6=class{constructor(t,e){this.worker=t,this.opts=e,this.subscribedEvents=[]}start(t){this.context=t,this.prepareListeners(),this.handleEvents(),this.worker.getInstanceType()===j6.MAIN&&this.handleActionEvents(),this.worker.send(XCe)}prepareListeners(){this.context&&Object.entries(this.context).forEach(([t,e])=>{Aft.includes(t)||this.worker.getInstanceType()!==j6.MAIN&&zft.includes(t)||this.worker.respond(t,(...i)=>G(this,null,function*(){return e(...i)}))})}handleEvents(){this.worker.respond(KCe,t=>G(this,null,function*(){typeof t=="string"&&(this.subscribedEvents.includes(t)||this.context&&(this.context.on(t,(...e)=>{this.worker.request(t,...e)}),this.subscribedEvents.push(t)))})),this.worker.respond(ewe,()=>G(this,null,function*(){let e=Array.from(document.styleSheets).map(o=>o?.href?o.href:"").filter(Boolean),i=Array.from(document.documentElement.classList),r=Pft(i).filter(o=>o.trim().length>0);return{styleUrls:e,styles:r,htmlClasses:i,theme:this.opts?.theme}}))}handleActionEvents(){this.worker.respond(JCe,t=>G(this,null,function*(){if(!this.context)return;let e="";return e=yield this.context.createAction(q(k({},t),{execute:(...i)=>G(this,null,function*(){if(e)return this.worker.request(twe(e),...i)})})),e}))}destroy(){this.worker.destroy()}};var x1=(()=>{class n{constructor(){this.list=[],this.list$=new an(this.list),this.addHandlerData({id:uu,getHandler(){return G(this,null,function*(){let l=(yield import("./chunk-OGULX36T.js")).HttpRequestHandler;return new l})},copyTag:"REQUEST_HANDLER_HTTP"}),this.addHandlerData({id:wc,getHandler(){return G(this,null,function*(){let l=(yield import("./chunk-C3YCLGYT.js")).WebsocketRequestHandler;return new l})},copyTag:"REQUEST_HANDLER_WEBSOCKET"}),this.addHandlerData({id:YT,getHandler(){return G(this,null,function*(){let l=(yield import("./chunk-3E7DRPPH.js")).GraphQLWsRequestHandler;return new l})},copyTag:"REQUEST_HANDLER_GRAPHQL_WS"}),this.addHandlerData({id:GT,getHandler(){return G(this,null,function*(){let l=(yield import("./chunk-7THP26YK.js")).AppSyncRequestHandler;return new l})},copyTag:"REQUEST_HANDLER_APP_SYNC"}),this.addHandlerData({id:ZT,getHandler(){return G(this,null,function*(){let l=(yield import("./chunk-YJNGIILY.js")).ActionCableRequestHandler;return new l})},copyTag:"REQUEST_HANDLER_ACTION_CABLE"}),this.addHandlerData({id:XT,getHandler(){return G(this,null,function*(){let l=(yield import("./chunk-FYNPTAVN.js")).SSERequestHandler;return new l})},copyTag:"REQUEST_HANDLER_GRAPHQL_SSE"})}addHandlerData(e){this.list.push(e),this.list$.next(this.list)}getHandlerData(e){let i=this.list.find(r=>r.id===e);if(!i)throw new Error(`No request handler found for "${e}"`);return i}getAllHandlerData(){return this.list}getAllHandlerData$(){return this.list$.asObservable()}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=oe({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var nwe=n=>n.reduce((t,e)=>(e.key&&e.value&&e.enabled&&(t[e.key]=e.value),t),{});var tz=class{constructor(t){this.providerClass=t}handle(t){return new Zn(e=>{let i=Date.now();return this.provider=new this.providerClass(t.url,t.additionalParams??{},{headers:nwe(t.headers??[]),onConnected(r,o){r&&e.error(r)}}),this.provider.execute({query:t.query,variables:t.variables,operationName:t.selectedOperation??void 0}).subscribe(Moe(e,t.url,i)),()=>{this.provider?.close()}})}generateCurl(t){throw new Error("Method not implemented.")}};var ww=(()=>{class n{constructor(){this.store=R(mn),this.windowService=R(Go),this.pluginEventService=R(b1),this.themeRegistryService=R(S1),this.requestHandlerRegistryService=R(x1),this.notifyService=R(ii),this.sanitizer=R(fc)}createV1Context(e,i){let r=this,o=c=>Ne.log(`PLUGIN[${e}]: ${c}`),s=this.pluginEventService.group();return o("creating context.."),{app:{getWindowState(c){return G(this,null,function*(){return r.getWindowState(c)})},getCurrentWindowState(){return G(this,null,function*(){return r.getCurrentWindowState()})},createPanel(c,{location:u=Wf.SIDEBAR,title:h=i.display_name}={}){o(`Creating panel<${h}>`);let p=new T2(h,c,u);return r.store.dispatch(new m7(p)),p},destroyPanel(c){o(`Destroying panel<${c.title}:[${c.id}]>`),c instanceof T2&&(c.destroy(),r.store.dispatch(new g7({panelId:c.id})))},createAction({title:c,location:u=D8.RESULT_PANE,execute:h}){o(`Creating ui action<${c}>`);let p=new M8(c,u,()=>G(null,null,function*(){let f=yield r.getCurrentWindowState();f&&h(f)}));return r.store.dispatch(new y7(p)),p},destroyAction(c){o(`Destroying ui action<${c.title}:[${c.id}]>`),c instanceof M8&&r.store.dispatch(new v7({actionId:c.id}))},isElectron(){return mc},createWindow(c){return o("creating window"),r.windowService.importWindowData(c)},setQuery(c,u){o("setting query"),r.store.dispatch(new Rs(u,c))},setVariables(c,u){o("setting variables"),r.store.dispatch(new du(u,c))},setEndpoint(c,u){o("setting endpoint"),r.store.dispatch(new Lp({url:u},c)),r.store.dispatch(new _s(c))},setHeader(c,u,h){return G(this,null,function*(){o(`setting header: ${u}`);let f=(yield this.getWindowState(c))?.headers??[],_=t$(f);_[u]=h,r.store.dispatch(new _2({headers:X_(_)},c))})},addSubscriptionProvider(c){o(`adding subscription provider: ${c.id}`),r.requestHandlerRegistryService.addHandlerData({id:c.id,getHandler(){return G(this,null,function*(){return new tz(yield c.getProviderClass())})},copyTag:c.copyTag})},executeCommand(){}},events:{on(c,u){return s.on(c,u)},off(){return o("unsubscribing from all events"),s.unsubscribe()}},theme:{add(c,u){return o("Adding theme: "+c),r.themeRegistryService.addTheme(`plugin:${c}`,u)},enable(c,u=!1){return G(this,null,function*(){o("Enabling theme: "+c);let h=k({},yield r.store.select("settings").pipe(Ct(1)).toPromise());u?h["theme.dark"]=`plugin:${c}`:h.theme=`plugin:${c}`,r.store.dispatch(new vh({value:JSON.stringify(h)})),r.notifyService.info(`Plugin "${e}" has enabled the "${c}" theme`)})}}}}createV3Context(e,i,r){let o=this,s=(u,...h)=>Ne.log(`PLUGIN[${e}]: ${u}`,...h),a=this.pluginEventService.group();s("creating context..");let l={getWindowState(u){return G(this,null,function*(){return o.getWindowState(u)})},getCurrentWindowState(){return G(this,null,function*(){return o.getCurrentWindowState()})},createPanel(_){return G(this,arguments,function*(u,{location:h=Wf.SIDEBAR,title:p=i.display_name??i.name,width:f}={}){s(`Creating panel<${u}, ${p}>`);let w=`panel-${Fr()}`,x=new Dg(q(k({},r),{id:w,instanceType:"panel",disableAppend:!0,width:f,additionalParams:{panelName:u}})),T=i.icon?.type==="image"?i.icon.url:"",z="";if(i.icon?.type==="svg"){let Le=(yield import("./chunk-35VQWODI.js")).default.sanitize(i.icon.src);z=o.sanitizer.bypassSecurityTrustHtml(Le)}let A=yield ps(o.store.select("settings").pipe(Ct(1))),V=o.themeRegistryService.getTheme(A.theme)||{isSystem:!0},U=A.themeConfig||{},B=o.themeRegistryService.mergeThemes(V,U),K=new $6(x,{theme:B}),$=new T2(p,x.getIframe(),h,K,T,z);return K.start(l),o.store.dispatch(new m7($)),$.id})},destroyPanel(u){return G(this,null,function*(){let p=(yield o.store.select("local").pipe(Ct(1)).toPromise())?.panels.find(f=>f.id===u);p&&(s(`Destroying panel<${p.title}:[${p.id}]>`),p instanceof T2&&(p.engine?.destroy(),p.destroy(),o.store.dispatch(new g7({panelId:p.id}))))})},createAction(f){return G(this,arguments,function*({title:u,location:h=D8.RESULT_PANE,execute:p}){s(`Creating ui action<${u}>`);let _=new M8(u,h,()=>G(null,null,function*(){let w=yield o.getCurrentWindowState();w&&p(w)}));return o.store.dispatch(new y7(_)),_.id})},destroyAction(u){return G(this,null,function*(){s(`Destroying ui action<[${u}]>`),o.store.dispatch(new v7({actionId:u}))})},isElectron(){return G(this,null,function*(){return mc})},createWindow(u){return G(this,null,function*(){s("creating window"),yield o.windowService.importWindowData(u)})},setQuery(u,h){return G(this,null,function*(){s("setting query"),o.store.dispatch(new Rs(h,u))})},setVariables(u,h){return G(this,null,function*(){s("setting variables"),o.store.dispatch(new du(h,u))})},setEndpoint(u,h){return G(this,null,function*(){s("setting endpoint"),o.store.dispatch(new Lp({url:h},u)),o.store.dispatch(new _s(u))})},setHeader(u,h,p){return G(this,null,function*(){s(`setting header: ${h}`);let _=(yield this.getWindowState(u))?.headers??[],w=t$(_);w[h]=p,o.store.dispatch(new _2({headers:X_(w)},u))})},on(u,h){return a.on(u,h)},off(){return s("unsubscribing from all events"),a.unsubscribe()},addTheme(u,h){return G(this,null,function*(){return s("Adding theme: "+u),o.themeRegistryService.addTheme(`plugin:${u}`,h)})},enableTheme(u,h=!1){return G(this,null,function*(){s("Enabling theme: "+u);let p=k({},yield o.store.select("settings").pipe(Ct(1)).toPromise());h?p["theme.dark"]=`plugin:${u}`:p.theme=`plugin:${u}`,o.store.dispatch(new vh({value:JSON.stringify(p)})),o.notifyService.info(`Plugin "${e}" has enabled the "${u}" theme`)})},getUserInfo(){return G(this,null,function*(){let u=yield ps(o.store.select("account").pipe(Ct(1)));return{avatar:u.picture,email:u.email,loggedIn:u.loggedIn,name:u.firstName,plan:u.plan}})},getAvailableCredits(){return G(this,null,function*(){return yield Yn.getAvailableCredits()})},createAiSession(){return G(this,null,function*(){return yield Yn.createAiSession()})},getActiveAiSession(){return G(this,null,function*(){return yield Yn.getActiveAiSession()})},getAiSessionMessages(u){return G(this,null,function*(){return yield Yn.getAiSessionMessages(u)})},sendMessageToAiSession(u,h){return Yn.sendMessageToAiSession(u,h)},rateAiSessionMessage(u,h,p){return Yn.rateAiMessage(u,h,{rating:p})}};return l}getWindowState(e){return G(this,null,function*(){let i=yield this.store.select(xc(e)).pipe(Ct(1)).toPromise();return i?{version:1,type:"window",windowId:e,query:i.query.query||"",apiUrl:i.query.url,variables:i.variables.variables,subscriptionUrl:i.query.subscriptionUrl,headers:i.headers,windowName:i.layout.title,preRequestScript:i.preRequest.script,preRequestScriptEnabled:i.preRequest.enabled,postRequestScript:i.postRequest.script,postRequestScriptEnabled:i.postRequest.enabled,requestHandlerId:i.query.requestHandlerId,requestHandlerAdditionalParams:i.query.requestHandlerAdditionalParams,subscriptionRequestHandlerId:i.query.subscriptionRequestHandlerId,subscriptionConnectionParams:i.query.subscriptionConnectionParams,subscriptionUseDefaultRequestHandler:i.query.subscriptionUseDefaultRequestHandler,authorizationType:i.authorization.type,authorizationData:i.authorization.data,sdl:i.schema.sdl,queryResults:i.query.responses?.map(o=>o.content)??[],requestStartTime:i.query.requestStartTime,requestEndTime:i.query.requestEndTime,responseTime:i.query.responseTime,responseStatus:i.query.responseStatus}:void 0})}getCurrentWindowState(){return G(this,null,function*(){let e=yield this.store.select("windowsMeta").pipe(Ct(1)).toPromise();if(e)return this.getWindowState(e.activeWindowId)})}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=oe({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var q6=zs.enum({NPM:"npm",GITHUB:"github",URL:"url"}),iwe=zs.enum({HEADER:"header",SIDEBAR:"sidebar",ACTION_BUTTON:"action_button"}),bw=zs.enum(["query:read","query:write","header:read","header:write","environment:read","environment:write"]),OX=ir({manifest_version:Qu(1).or(Qu(2)).meta({description:"Version of manifest. Should be 1 or 2."}),name:Je().meta({description:"Name of the plugin"}),display_name:Je().meta({description:"Display name of the plugin"}),version:Je().meta({description:"Version of the plugin"}),description:Je().meta({description:"Description of the plugin"}),author_email:Je().meta({description:"Author email of the plugin"}).optional(),author:Je().meta({description:"Author of the plugin"}).optional(),type:iwe.meta({description:"This specifies the type of plugin. This determines how the plugin would interact with Altair. For now there is just the typical plugin type (registered plugin class). In the future, this would include other plugins like themes."}).optional(),plugin_class:Je().meta({description:"This specifies the class name of the plugin, for discovery"}).optional(),scripts:Je().array().meta({description:"An array containing the list of scripts (relative to the plugin root directory) that need to be loaded for the plugin to function."}),styles:Je().array().meta({description:"An array containing the list of styles (relative to the plugin root directory) that need to be loaded for the plugin to function."}).optional(),capabilities:bw.array().meta({description:"Specifies the capabilities (functionalities) available to the plugin. In the future, this would be used to request the necessary permissions from the user"}).optional()}),rwe=ir({name:Je().meta({description:"Name of the plugin"}),display_name:Je().meta({description:"Display name of the plugin"}),capabilities:bw.array().meta({description:"Specifies the capabilities (functionalities) available to the plugin. In the future, this would be used to request the necessary permissions from the user"}),type:iwe.meta({description:"This specifies the type of plugin. This determines how the plugin would interact with Altair. For now there is just the typical plugin type (registered plugin class). In the future, this would include other plugins like themes."}).optional(),plugin_class:Je().meta({description:"This specifies the class name of the plugin, for discovery"}).optional(),manifest:OX.meta({description:"The plugin manifest"})});var owe=(n,t)=>rwe.parse({name:n,manifest:t,type:t.type,display_name:t.display_name||n,plugin_class:t.plugin_class,capabilities:Array.from(new Set([...t.capabilities||[],"query:read","query:write"]))});var Rft=ir({type:Qu("html"),path:Je()}),Nft=ir({type:Qu("js"),scripts:Je().array(),styles:Je().array()}),Lft=Sm([Rft,Nft]),Fft=ir({type:Qu("image"),url:Je()}),Vft=ir({type:Qu("svg"),src:Je()}),Bft=Sm([Fft,Vft]),swe=ir({manifest_version:Qu(3).meta({description:"Version of manifest (should be 3). It is a control measure for variations in the plugin versions"}),name:Je().meta({description:"Name of the plugin. It should be the same name you would use in your `package.json` file. It uniquely identifies your plugin. The plugin name must begin with `altair-graphql-plugin-`."}),display_name:Je().meta({description:"The name of the plugin that is displayed in the UI. It is the human readable version of your plugin name."}),version:Je().meta({description:"The version of your plugin. It should be the same version you would have in your `package.json` file (except you have a good reason why they should be different)."}),description:Je().meta({description:"The description of what your plugin is about. It would be used to describe your plugin."}),entry:Lft.meta({description:"The entry point of the plugin"}),capabilities:bw.array().meta({description:"Specifies the capabilities (functionalities) available to the plugin. In the future, this would be used to request the necessary permissions from the user"}).optional(),author_email:Je().meta({description:"Email of the author of the plugin"}).optional(),author:Je().meta({description:"Name of the author of the plugin"}).optional(),minimum_altair_version:Je().meta({description:"The minimum version of Altair that the plugin is compatible with. This is useful for when the plugin uses features that are only available in a certain version of Altair"}).optional(),icon:Bft.meta({description:"The icon of the plugin. It can be an image or an SVG"}).optional()});var ywe=Ci(U_());var awe=n=>new Promise((t,e)=>{let i=document.getElementsByTagName("head")[0];if(!i)return e(new Error("No head found!"));let r=document.createElement("script");r.type="text/javascript",r.src=n,r.onload=()=>t(null),r.onerror=o=>e(o),i.appendChild(r)}),lwe=n=>new Promise((t,e)=>{let i=document.getElementsByTagName("head")[0];if(!i)return e(new Error("No head found!"));let r=document.createElement("link");r.type="text/css",r.rel="stylesheet",r.href=n,r.onload=()=>t(null),r.onerror=o=>e(o),i.appendChild(r)});var Hft=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,EX=n=>{if(typeof n!="string")throw new TypeError("Invalid argument expected string");let t=n.match(Hft);if(!t)throw new Error(`Invalid argument not valid semver ('${n}' received)`);return t.shift(),t},cwe=n=>n==="*"||n==="x"||n==="X",uwe=n=>{let t=parseInt(n,10);return isNaN(t)?n:t},jft=(n,t)=>typeof n!=typeof t?[String(n),String(t)]:[n,t],$ft=(n,t)=>{if(cwe(n)||cwe(t))return 0;let[e,i]=jft(uwe(n),uwe(t));return e>i?1:e<i?-1:0},MX=(n,t)=>{for(let e=0;e<Math.max(n.length,t.length);e++){let i=$ft(n[e]||"0",t[e]||"0");if(i!==0)return i}return 0};var dwe=(n,t)=>{let e=EX(n),i=EX(t),r=e.pop(),o=i.pop(),s=MX(e,i);return s!==0?s:r&&o?MX(r.split("."),o.split(".")):r||o?r?-1:1:0};var DX=(n,t,e)=>{qft(e);let i=dwe(n,t);return pwe[e].includes(i)},pwe={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},hwe=Object.keys(pwe),qft=n=>{if(typeof n!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof n}`);if(hwe.indexOf(n)===-1)throw new Error(`Invalid operator, expected one of ${hwe.join("|")}`)};var fwe=ir({id:Je().meta({description:"The plugin ID (used to install the plugin)"}),name:Je().meta({description:"The display name of the plugin"}),description:Je().meta({description:"The description of the plugin"}),author:Je().meta({description:"The author of the plugin"}),repository:Je().meta({description:"The GitHub repository of the plugin"}),homepage:Je().optional().meta({description:"The homepage of the plugin"})}),P5n=ir({plugins:$d(Je(),fwe).meta({description:"List of approved plugins"})}),mwe=ir({plugins:fwe.array().meta({description:"List of approved plugins"})});function IX(n){return Cv(ze(t=>{let e=n.safeParse(t);if(!e.success){Ne.error(e.error);return}return t}))}var gwe="altair-graphql-plugin-",zX="__user_plugin_approved_map",Uft=Ii().getUrlConfig(sr.production?"production":"development"),Ig=(()=>{class n{constructor(){this.http=R(Ta),this.pluginContextService=R(ww),this.db=R(Ec),this.notifyService=R(ii),this.store=R(mn),this.fetchedPlugins=[]}addV1Plugin(e,i){let r=this.pluginContextService.createV1Context(e,i),o=this.getPluginClass(i),s={manifest_version:i.manifest.manifest_version,name:e,context:r,instance:o?new o:void 0,plugin:i};if(!s.instance)throw new Error(`Could not create the plugin instance for plugin: ${e}. Check that plugin_class is set correctly in manifest.`);s.instance.initialize(r),this.store.dispatch(new f7(s))}addV3Plugin(e,i,r,o){let s=new $6(r),a=this.pluginContextService.createV3Context(e,i,o);s.start(a);let l={manifest_version:i.manifest_version,name:e,context:a,engine:s,manifest:i};this.store.dispatch(new f7(l))}getRemotePluginList(){let e=new URL("/data/v1/plugins.json",Uft.docs).href;return this.http.get(e).pipe(IX(mwe))}fetchPlugin(e,i){e&&this.fetchedPlugins.push(this.fetchPluginAssets(e,i))}installedPlugins(){return this.store.select(e=>e.local.installedPlugins)}getPluginInfoFromString(e){let i=e.match(/(([A-Za-z_]*):)?(.[A-Za-z0-9-]*)(@([^#:[\]]*))?(::\[(.*)\]->\[(.*)\])?/);if(i&&i.length){let[,,r=q6.enum.NPM,o,,s="latest",,a,l]=i;if(o&&s){if(!o.startsWith(gwe)){Ne.error(`Plugin name must start with ${gwe}`);return}return k({name:o,version:s,pluginSource:r},a&&l&&{[a]:l})}}}pluginsReady(){return Promise.all(this.fetchedPlugins)}isUserApprovedPlugin(e){return G(this,null,function*(){if(e.version==="latest")return!1;let i=yield this.db.getItem(zX).pipe(Ct(1)).toPromise();return!i||!i[e.pluginSource]||!i[e.pluginSource]?.[e.name]?!1:i[e.pluginSource]?.[e.name]?.includes(e.version)})}addPluginToApprovedMap(e){return G(this,null,function*(){let i={};if(e.version==="latest")return;let r=yield this.db.getItem(zX).pipe(Ct(1)).toPromise();r&&(i=r);let o=i[e.pluginSource]||={};(o[e.name]||=[]).push(e.version),yield this.db.setItem(zX,i).pipe(Ct(1)).toPromise()})}isPluginInSettings(e){return G(this,null,function*(){let i=yield this.store.select(r=>r.settings).pipe(Ct(1)).toPromise();return i?.["plugin.list"]?i["plugin.list"].some(r=>{let o=this.getPluginInfoFromString(r);return o?o.name===e:!1}):!1})}addPluginToSettings(e){return G(this,null,function*(){let i=yield this.store.select(o=>o.settings).pipe(Ct(1)).toPromise(),r=JSON.parse(JSON.stringify(i));r["plugin.list"]=r["plugin.list"]||[],r["plugin.list"].push(e),this.store.dispatch(new vh({value:JSON.stringify(r)}))})}removePluginFromSettings(e){return G(this,null,function*(){let i=yield this.store.select(o=>o.settings).pipe(Ct(1)).toPromise(),r=JSON.parse(JSON.stringify(i));r["plugin.list"]=(r["plugin.list"]||[]).filter(o=>{let s=this.getPluginInfoFromString(o);if(s)return e!==s.name}),this.store.dispatch(new vh({value:JSON.stringify(r)}))})}fetchPluginAssets(e,s){return G(this,null,function*(){var a=s,{pluginSource:i=q6.enum.NPM,version:r="latest"}=a,o=$o(a,["pluginSource","version"]);Ne.log("PLUGIN: ",e,i,r);let l=this.getPluginBaseURL(k({pluginSource:i,version:r},o)),c=this.resolveURL(l,"manifest.json");try{Ne.debug(`PLUGIN[${e}]: Fetching manifest from ${c}`);let u=yield ps(this.http.get(c).pipe(IX(Sm([OX,swe]))));if(!u)throw new Error(`PLUGIN[${e}]: Could not fetch manifest file`);Ne.debug(`PLUGIN[${e}]: Manifest fetched successfully`,u);let h={name:e,pluginSource:i,version:u.version};if(Ne.debug(`PLUGIN[${e}]: Checking if user has approved the plugin or not`),!(yield this.isUserApprovedPlugin(h))){if(Ne.debug(`PLUGIN[${e}]: Plugin is not approved by user. Asking for approval.`),!(yield this.notifyService.confirm(`Are you sure you want to install "${(0,ywe.default)(e)}" plugin?`,"Plugin manager"))){yield this.removePluginFromSettings(h.name);return}yield this.addPluginToApprovedMap(h)}if(Ne.debug(`PLUGIN[${e}]: User approval check complete`),u.manifest_version===1||u.manifest_version===2)return this.fetchPluginV1Assets(e,u,l);if(u.manifest_version>=3&&"entry"in u){if(u.minimum_altair_version&&DX(u.minimum_altair_version,sr.version,">")){this.notifyService.warning(`Plugin ${e} requires Altair version ${u.minimum_altair_version} or higher. Please update Altair to use this plugin.`);return}return this.fetchPluginV3Assets(e,u,l)}}catch(u){Ne.error(`PLUGIN[${e}]: Error fetching plugin assets`,u)}})}fetchPluginV1Assets(e,i,r){return G(this,null,function*(){i?.styles?.length&&(Ne.log("V1 PLUGIN styles",i.styles),yield Promise.all(i.styles.map(s=>lwe(this.resolveURL(r,s))))),i?.scripts?.length&&(Ne.log("V1 PLUGIN scripts",i.scripts),yield Promise.all(i.scripts.map(s=>awe(this.resolveURL(r,s)))));let o=owe(e,i);return this.addV1Plugin(e,o),Ne.debug(`PLUGIN[${e}]: V1 plugin scripts and styles injected and loaded.`),this.notifyService.warning(`V1 plugins are deprecated and will be disabled in the future. If you're an owner of ${e}, consider migrating to V3.`,void 0,{data:{url:"https://altairgraphql.dev/docs/learn/mv3"}}),o})}fetchPluginV3Assets(e,i,r){return G(this,null,function*(){let o=`plugin-${Fr()}`,s=i.entry;if(s.type==="html"){let a=this.resolveURL(r,s.path),l={id:o,type:"url",pluginEntrypointUrl:a},c=new Dg(l);this.addV3Plugin(e,i,c,l),Ne.log("PLUGIN","V3 plugin loaded with src.")}else if(s.type==="js"){let a=s.scripts.map(h=>this.resolveURL(r,h)),l=s.styles.map(h=>this.resolveURL(r,h)),c={id:o,sandboxUrl:yield Ii().getUrl("sandbox",sr.production?"production":"development"),type:"scripts",scriptUrls:a,styleUrls:l},u=new Dg(c);this.addV3Plugin(e,i,u,c)}})}getPluginBaseURL(e){switch(e.pluginSource){case q6.enum.NPM:return this.getNPMPluginBaseURL(e.name,{version:e.version});case q6.enum.GITHUB:return this.getGithubPluginBaseURL(e.name,e);case q6.enum.URL:return this.getURLPluginBaseURL(e.name,e)}}getNPMPluginBaseURL(e,{version:i="latest"}){return`https://cdn.jsdelivr.net/npm/${e}@${i}/`}getGithubPluginBaseURL(e,i){let r="https://cdn.jsdelivr.net/gh/",o=i.version==="latest"?"":`@${i.version}`;return`${r}${i.repo}${o}/`}getURLPluginBaseURL(e,i){return i.url||""}resolveURL(e,i){return e.replace(/\/$/,"")+"/"+i.replace(/^\//,"")}getPluginClass(e){if(e.plugin_class)return window.AltairGraphQL.plugins[e.plugin_class]}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=oe({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var nz=(()=>{class n{constructor(e,i){this.document=e,this.platformId=i,this.documentIsAccessible=rs(this.platformId)}static getCookieRegExp(e){let i=e.replace(/([\[\]\{\}\(\)\|\=\;\+\?\,\.\*\^\$])/gi,"\\$1");return new RegExp("(?:^"+i+"|;\\s*"+i+")=(.*?)(?:;|$)","g")}static safeDecodeURIComponent(e){try{return decodeURIComponent(e)}catch{return e}}check(e){return this.documentIsAccessible?(e=encodeURIComponent(e),n.getCookieRegExp(e).test(this.document.cookie)):!1}get(e){if(this.documentIsAccessible&&this.check(e)){e=encodeURIComponent(e);let r=n.getCookieRegExp(e).exec(this.document.cookie);return r[1]?n.safeDecodeURIComponent(r[1]):""}else return""}getAll(){if(!this.documentIsAccessible)return{};let e={},i=this.document;return i.cookie&&i.cookie!==""&&i.cookie.split(";").forEach(r=>{let[o,s]=r.split("=");e[n.safeDecodeURIComponent(o.replace(/^ /,""))]=n.safeDecodeURIComponent(s)}),e}set(e,i,r,o,s,a,l){if(!this.documentIsAccessible)return;if(typeof r=="number"||r instanceof Date||o||s||a||l){let h={expires:r,path:o,domain:s,secure:a,sameSite:l||"Lax"};this.set(e,i,h);return}let c=encodeURIComponent(e)+"="+encodeURIComponent(i)+";",u=r||{};if(u.expires)if(typeof u.expires=="number"){let h=new Date(new Date().getTime()+u.expires*1e3*60*60*24);c+="expires="+h.toUTCString()+";"}else c+="expires="+u.expires.toUTCString()+";";u.path&&(c+="path="+u.path+";"),u.domain&&(c+="domain="+u.domain+";"),u.secure===!1&&u.sameSite==="None"&&(u.secure=!0,console.warn(`[ngx-cookie-service] Cookie ${e} was forced with secure flag because sameSite=None.More details : https://github.com/stevermeister/ngx-cookie-service/issues/86#issuecomment-597720130`)),u.secure&&(c+="secure;"),u.sameSite||(u.sameSite="Lax"),c+="sameSite="+u.sameSite+";",this.document.cookie=c}delete(e,i,r,o,s="Lax"){if(!this.documentIsAccessible)return;let a=new Date("Thu, 01 Jan 1970 00:00:01 GMT");this.set(e,"",{expires:a,path:i,domain:r,secure:o,sameSite:s})}deleteAll(e,i,r,o="Lax"){if(!this.documentIsAccessible)return;let s=this.getAll();for(let a in s)s.hasOwnProperty(a)&&this.delete(a,e,i,r,o)}}return n.\u0275fac=function(e){return new(e||n)(ue(Xt),ue(vs))},n.\u0275prov=oe({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();var zg=class extends Error{constructor(t){let e=t instanceof Error?t.message:String(t);super(e),this.name="RequestScriptError",this.cause=t instanceof Error?t:new Error(String(t))}};var vwe="init_execute",_we=n=>`${n}_response`,Cwe=n=>`${n}_error`;var Qft=1e3*60*5,iz=class{constructor(t,e=Qft){this.engineFactory=t,this.timeout=e}getClient(){return G(this,null,function*(){let t=this.client??(yield this.engineFactory.create());return this.client=t,t})}executeScript(t,e,i){return G(this,null,function*(){try{let r=yield this.getClient();return yield new Promise((s,a)=>{let l=setTimeout(()=>{this.killClient(),a(new Error("script timeout"))},this.timeout),c=q(k({},i),{executeComplete:u=>{clearTimeout(l),s({environment:u.environment,requestScriptLogs:u.requestScriptLogs||[]})},scriptError:u=>{clearTimeout(l),a(u)}});Object.entries(c).forEach(([u,h])=>{r.subscribe(u,(p,f)=>{let{id:_,args:w}=f.payload;G(this,null,function*(){try{let x=yield h(...w);r.sendResponse(p,{id:_,response:x})}catch(x){r.sendError(p,{id:_,error:`${x.message??x}`})}})})}),r.onError(u=>{clearTimeout(l),a(u)}),r.send(vwe,[t,e])})}finally{this.killClient()}})}killClient(){this.client?.destroy(),this.client=void 0}};var k1=(function(n){return n.INTROSPECTION="introspection",n.QUERY="query",n.SUBSCRIPTION="subscription",n})(k1||{}),U6=class{sendResponse(t,e){this.send(_we(t),e)}sendError(t,e){this.send(Cwe(t),e)}};var Sw=Ci(zk());var Wft={atob:{exec(){return G(this,null,function*(){return(yield import("./chunk-SLWAEMHP.js")).atob})}},btoa:{exec(){return G(this,null,function*(){return(yield import("./chunk-SLWAEMHP.js")).btoa})}},"crypto-js":{exec(){return G(this,null,function*(){return(yield import("./chunk-BFZ77DNT.js")).default})}}},Yft=n=>{if(n.response)return{body:n.response.body,requestType:n.requestType??k1.QUERY,responseTime:n.response.responseTime,statusCode:n.response.status,headers:n.response.headers}},Gft=n=>G(null,null,function*(){let t=Wft[n];if(!t)throw new Error(`No request script module found matching "${n}"`);return t.exec()}),Q6=(n,t)=>({data:n,helpers:{getEnvironment:e=>(0,Sw.get)(n.environment,e),setEnvironment:(e,i,r=!1)=>{(0,Sw.set)(n.environment,e,i),r&&(n.__toSetActiveEnvironment=n.__toSetActiveEnvironment??{},(0,Sw.set)(n.__toSetActiveEnvironment,e,i))},getCookie:e=>n.__cookieJar?.[e]??"",setCookie:(e,i,r)=>{t.setCookie(e,i,r)},request:(e,i,r)=>G(null,null,function*(){return t.request(e,i,r)})},storage:{get:e=>t.getStorageItem(e),set:(e,i)=>t.setStorageItem(e,i)},importModule:e=>Gft(e),response:Yft(n),log:e=>{n.requestScriptLogs=n.requestScriptLogs??[],n.requestScriptLogs.push({id:crypto.randomUUID(),time:Date.now(),text:JSON.stringify(e,null,2),source:"Request script"})}});var rz=class extends U6{constructor(){super(...arguments),this.worker=new Worker(new URL("worker-JHIJ5B6A.js",import.meta.url),{type:"module"})}subscribe(t,e){this.worker.addEventListener("message",i=>{let r=i.data;r.type===t&&(Ne.log(r.type,r),e(t,r))})}send(t,e){this.worker.postMessage({type:t,payload:e})}onError(t){this.worker.addEventListener("error",t)}destroy(){this.worker.terminate()}};var AX=class extends U6{constructor(t){super(),this.sandboxUrl=t,this.iframe=this.createIframe(),this.messageListeners=[],this.iframeLoadedPromise=new Promise(e=>{this.iframe.addEventListener("load",()=>{e()})})}createIframe(){let t=document.createElement("iframe");t.style.display="none";let e=new URL(this.sandboxUrl);return e.searchParams.set("sc",window.location.origin),e.searchParams.set("action","evaluator"),t.src=e.toString(),t.sandbox.add("allow-scripts"),t.sandbox.add("allow-same-origin"),t.referrerPolicy="no-referrer",document.body.appendChild(t),t}subscribe(t,e){let i=r=>{if(r.origin!==new URL(this.sandboxUrl).origin)return;let o=r.data;o.type===t&&(Ne.log(o.type,o),e(t,o))};window.addEventListener("message",i),this.messageListeners.push(i)}send(t,e){return G(this,null,function*(){yield this.iframeLoadedPromise,this.iframe.contentWindow?.postMessage({type:t,payload:e},this.sandboxUrl)})}onError(t){this.iframe.addEventListener("error",t)}destroy(){this.messageListeners.forEach(t=>{window.removeEventListener("message",t)}),this.iframe.removeAllListeners?.(),this.iframe.remove()}},oz=class{create(){return G(this,null,function*(){return!this.isManifestV3Extension()&&this.isSameOriginBaseURI()&&this.isEvalAllowed()?new rz:new AX(yield Ii().getUrl("sandbox",sr.production?"production":"development"))})}isManifestV3Extension(){return id&&chrome.runtime.getManifest().manifest_version===3}isSameOriginBaseURI(){return document.baseURI&&new URL(document.baseURI).origin===window.origin}isEvalAllowed(){try{return(0,eval)("1"),!0}catch{return!1}}};var wwe="request-script",xw=(()=>{class n{constructor(){this.cookieService=R(nz),this.http=R(Ta),this.store=R(mn),this.notifyService=R(ii),this.dbService=R(Ec)}executeScript(e,i){return G(this,null,function*(){return(yield this.store.select(o=>o.settings["beta.disable.newScript"]).pipe(Ct(1)).toPromise())?this.executeScriptOld(e,i):this.executeScriptNew(e,i)})}executeScriptNew(e,i){return G(this,null,function*(){let r=this,o=yield this.store.select(c=>c.settings["script.allowedCookies"]).pipe(Ct(1)).toPromise(),s=r.cookieService.getAll(),a=Object.entries(s).reduce((c,[u,h])=>(o?.includes(u)&&(c[u]=h),c),{});i.__cookieJar=a;let l=yield new iz(new oz).executeScript(e,i,{alert:c=>G(this,null,function*(){return this.notifyService.info(`Alert: ${c}`,"Request script")}),log:c=>G(this,null,function*(){Ne.log("request script log:",c)}),request:(c,u,h)=>G(this,null,function*(){try{return r.http.request(c,u,h).toPromise()}catch{return null}}),setCookie:(c,u,h)=>G(this,null,function*(){if(!o?.includes(c))return this.notifyService.warning(`Cookie "${c}" is not allowed to be set by scripts. You can configure allowed cookies in settings.`,"Request script");r.cookieService.set(c,u,h)}),getStorageItem:c=>this.getStorageItem(c),setStorageItem:(c,u)=>this.setStorageItem(c,u),updateActiveEnvironment:c=>this.updateActiveEnvironment(c)});return Ne.debug("script result:",l),l})}executeScriptOld(e,i){return G(this,null,function*(){let r=(yield import("./chunk-2OVBIND4.js")).default,o=JSON.parse(JSON.stringify(i)),s=new r({ecmaVer:10,sandBox:!0});s.import({altair:Q6(o,{setCookie:(a,l,c)=>G(this,null,function*(){this.cookieService.set(a,l,c)}),request:(a,l,c)=>G(this,null,function*(){try{return ps(this.http.request(a,l,c))}catch{return null}}),getStorageItem:a=>this.getStorageItem(a),setStorageItem:(a,l)=>this.setStorageItem(a,l)}),alert:a=>this.notifyService.info(`Alert: ${a}`)}),s.run(`
302
+ `)}i&2&&(g(2),S("fullHeight",!0)("extensions",r.editorExtensions)("ngModel",r.variables()))},dependencies:[nn,wn,xo],encapsulation:2,changeDetection:0})}}return n})();var Mg=(()=>{class n{constructor(){this.store=R(mn),this.windowService=R(Go),this.zone=R(at),this.windowIds=[],this.activeWindowId="",this.shortcuts=[],hd.filter=function(e){return!0},this.store.subscribe(e=>{this.windowIds=Object.keys(e.windows),this.activeWindowId=e.windowsMeta.activeWindowId})}connect(){this.bindShortcut(["Ctrl+Shift+V"],()=>this.store.dispatch(new Vf(this.activeWindowId)),"Toggle Variable Pane",!0),this.bindShortcut(["Ctrl+Shift+H"],()=>this.store.dispatch(new Ff(this.activeWindowId)),"Toggle Header Pane",!0),this.bindShortcut(["Ctrl+Shift+R"],()=>this.store.dispatch(new _s(this.activeWindowId)),"Reload Docs"),this.bindShortcut(["Ctrl+Shift+D"],()=>this.store.dispatch(new Hf(this.activeWindowId)),"Toggle Docs"),this.bindShortcut(["Ctrl+Shift+P"],()=>{document.activeElement?.closest(GCe)?this.store.dispatch(new pO(this.activeWindowId)):this.store.dispatch(new T3(this.activeWindowId))},"Prettify Query"),this.bindShortcut(["Command+Enter","Ctrl+Enter"],()=>this.store.dispatch(new Ef(this.activeWindowId)),"Send Request"),this.bindShortcut(["Command+S"],()=>this.store.dispatch(new Uf({windowId:this.activeWindowId})),"Save Request"),this.bindShortcut(["Ctrl+T"],()=>this.windowService.newWindow().pipe(Ct(1),Z7).subscribe(),"Create new window"),this.bindShortcut(["Ctrl+Shift+T"],()=>this.store.dispatch(new jf),"Reopen closed window"),this.bindShortcut(["Ctrl+W"],()=>{this.windowIds.length>1&&this.windowService.removeWindow(this.activeWindowId).pipe(Z7).subscribe()},"Close window")}bindShortcut(e,i,r,o=!1){return this.shortcuts.push({keys:e,description:r}),hd(e.map(s=>s.toLowerCase()).join(","),()=>{if(!(!o&&this.isInPopup()))return this.zone.run(i),!1})}getShortcuts(){let e=[{title:"General",shortcuts:this.shortcuts},{title:"Editor",shortcuts:[{keys:["Ctrl+D"],description:"Jump to docs"},{keys:["Ctrl+F","Alt+F"],description:"Search in context"},{keys:["Ctrl+/","Command+/"],description:"Toggle comment"},{keys:["Ctrl+Shift+Enter"],description:"Fill all fields"}]}];return Cc()&&e.push({title:"Electron Shortcuts",shortcuts:[]}),e}isInPopup(){return!!document.activeElement?.closest("nz-modal-container")}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=oe({token:n,factory:n.\u0275fac})}}return n})();Uu();Uu();var b1=(()=>{class n{constructor(){this.errorHandler=R(qo),this.eventStream=new fe,this.appReadyStream=new Qi(1)}group(){return new SX(this)}emit(e,i){return e==="app-ready"&&this.appReadyStream.next(i),this.eventStream.next({event:e,payload:i})}on(e,i){return e==="app-ready"?this.appReadyStream.subscribe(r=>{try{i(r)}catch(o){this.errorHandler.handleError(o)}}):this.eventStream.pipe(xt(r=>r.event===e)).subscribe(r=>{try{i(r.payload)}catch(o){this.errorHandler.handleError(o)}})}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=oe({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),SX=class{constructor(t){this.pluginEventService=t,this.subscriptions=[]}emit(t,e){return this.pluginEventService.emit(t,e)}on(t,e){let i=this.pluginEventService.on(t,e);return this.subscriptions.push(i),{unsubscribe:()=>{if(this.subscriptions=this.subscriptions.filter(r=>r!==i),!i.closed)return i.unsubscribe()}}}unsubscribe(){for(let t of this.subscriptions)t.unsubscribe();this.subscriptions=[]}};var S1=(()=>{class n{constructor(){this.registry=new Map,this.addDefaults()}addDefaults(){this.registry.set("light",Fme),this.registry.set("dark",Vme),this.registry.set("dracula",Bme)}getTheme(e){return this.registry.get(e)}getThemeFromSettings(e,i=!1){let r=i?e["theme.dark"]:e.theme;if(i&&!r)return;let o=r&&this.getTheme(r)||{isSystem:!0},s=k(k(k({},e["theme.fontsize"]&&{"fontSize.remBase":e["theme.fontsize"]}),e["theme.editorFontSize"]&&{"fontSize.code":e["theme.editorFontSize"]}),e["theme.editorFontFamily"]&&{"fontFamily.code":e["theme.editorFontFamily"]}),a=Ame((i?e["themeConfig.dark"]:e.themeConfig)||{});return this.mergeThemes(o,s,a)}addTheme(e,i){if(this.registry.has(e))throw new Error(`"${e}" theme already exists`);this.registry.set(e,i)}mergeThemes(...e){return Pme(...e)}getAllThemes(){return Array.from(this.registry.keys())}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=oe({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();Uu();var xX=n=>`${n}_response`,kX=n=>`${n}_error`;var Cw=class{subscribe(t,e){this.onMessage(i=>{i.type===t&&e(t,i)})}request(t,...e){return new Promise((i,r)=>{let o=Fr();this.onMessage(s=>{switch(s.type){case xX(t):return s.payload.id!==o?void 0:i(s.payload.response);case kX(t):return s.payload.id!==o?void 0:r(s.payload.error)}}),this.send(t,{id:o,args:e})})}respond(t,e){this.subscribe(t,(i,r)=>G(this,null,function*(){let{id:o,args:s}=r.payload;try{let a=yield e(...s);this.send(xX(i),{id:o,response:a})}catch(a){this.send(kX(i),{id:o,error:`${a.message??a}`})}}))}};var TX=(n,t)=>{let e=new URLSearchParams(t),i=new URL(n);return new URL(`${i.origin}${i.pathname}?${e.toString()}`).toString()};var j6={MAIN:"main",PANEL:"panel"};var Dg=class extends Cw{constructor(t){super(),this.opts=t,this.messageListeners=[],this.iframe=this.createIframe(),this.frameReadyPromise=new Promise(e=>{this.iframe.addEventListener("load",()=>{e()})})}createIframe(){let t=document.createElement("iframe");t.id=this.opts.id,this.opts.instanceType===j6.PANEL?(t.style.width="100%",t.style.height="100%",t.style.border="none",t.style.display="block","width"in this.opts&&this.opts.width&&(t.style.minWidth=`${this.opts.width}px`)):t.style.display="none";let e=q(k({},this.opts.additionalParams),{sc:window.location.origin,id:this.opts.id,instanceType:this.getInstanceType()});if(t.sandbox.add("allow-scripts"),this.opts.additionalSandboxAttributes&&this.opts.additionalSandboxAttributes.forEach(i=>{t.sandbox.add(i)}),t.referrerPolicy="no-referrer",this.opts.type==="scripts"){let i=TX(this.opts.sandboxUrl,q(k({},e),{sandbox_type:"plugin",plugin_sandbox_opts:JSON.stringify(this.opts)}));t.src=i}else if(this.opts.type==="url"){let i=TX(this.opts.pluginEntrypointUrl,e);t.src=i}return this.opts.disableAppend||document.body.appendChild(t),t}frameReady(){return G(this,null,function*(){yield this.frameReadyPromise})}getIframe(){return this.iframe}getInstanceType(){return this.opts.instanceType??j6.MAIN}onMessage(t){let e=i=>{if(!(i.origin!=="null"||i.source!==this.iframe.contentWindow)){if(i.data.frameId!==this.opts.id){console.error("Invalid frameId in data",i.data.frameId,this.opts.id);return}t(i.data)}};window.addEventListener("message",e,!1),this.messageListeners.push(e)}send(t,e){this.frameReady().then(()=>{this.iframe.contentWindow?.postMessage({type:t,payload:e},"*")})}onError(t){this.iframe.addEventListener("error",t)}destroy(){this.messageListeners.forEach(t=>{window.removeEventListener("message",t)}),this.iframe.remove()}};var XCe="plugin-engine::ready",KCe="plugin::subscribe_to_event",JCe="plugin::create_action",ewe="plugin::get_app_style_url",twe=n=>`action::${n}`;var zft=["createPanel","destroyPanel","createAction"],Aft=["on","createAction"];function Pft(n){try{return Array.from(document.styleSheets).map(e=>Array.from(e.cssRules).map(i=>i.cssText).join("")).filter(e=>n.some(i=>e.includes(`.${i}`)))}catch{return[]}}var $6=class{constructor(t,e){this.worker=t,this.opts=e,this.subscribedEvents=[]}start(t){this.context=t,this.prepareListeners(),this.handleEvents(),this.worker.getInstanceType()===j6.MAIN&&this.handleActionEvents(),this.worker.send(XCe)}prepareListeners(){this.context&&Object.entries(this.context).forEach(([t,e])=>{Aft.includes(t)||this.worker.getInstanceType()!==j6.MAIN&&zft.includes(t)||this.worker.respond(t,(...i)=>G(this,null,function*(){return e(...i)}))})}handleEvents(){this.worker.respond(KCe,t=>G(this,null,function*(){typeof t=="string"&&(this.subscribedEvents.includes(t)||this.context&&(this.context.on(t,(...e)=>{this.worker.request(t,...e)}),this.subscribedEvents.push(t)))})),this.worker.respond(ewe,()=>G(this,null,function*(){let e=Array.from(document.styleSheets).map(o=>o?.href?o.href:"").filter(Boolean),i=Array.from(document.documentElement.classList),r=Pft(i).filter(o=>o.trim().length>0);return{styleUrls:e,styles:r,htmlClasses:i,theme:this.opts?.theme}}))}handleActionEvents(){this.worker.respond(JCe,t=>G(this,null,function*(){if(!this.context)return;let e="";return e=yield this.context.createAction(q(k({},t),{execute:(...i)=>G(this,null,function*(){if(e)return this.worker.request(twe(e),...i)})})),e}))}destroy(){this.worker.destroy()}};var x1=(()=>{class n{constructor(){this.list=[],this.list$=new an(this.list),this.addHandlerData({id:uu,getHandler(){return G(this,null,function*(){let l=(yield import("./chunk-OGULX36T.js")).HttpRequestHandler;return new l})},copyTag:"REQUEST_HANDLER_HTTP"}),this.addHandlerData({id:wc,getHandler(){return G(this,null,function*(){let l=(yield import("./chunk-C3YCLGYT.js")).WebsocketRequestHandler;return new l})},copyTag:"REQUEST_HANDLER_WEBSOCKET"}),this.addHandlerData({id:YT,getHandler(){return G(this,null,function*(){let l=(yield import("./chunk-3E7DRPPH.js")).GraphQLWsRequestHandler;return new l})},copyTag:"REQUEST_HANDLER_GRAPHQL_WS"}),this.addHandlerData({id:GT,getHandler(){return G(this,null,function*(){let l=(yield import("./chunk-7THP26YK.js")).AppSyncRequestHandler;return new l})},copyTag:"REQUEST_HANDLER_APP_SYNC"}),this.addHandlerData({id:ZT,getHandler(){return G(this,null,function*(){let l=(yield import("./chunk-YJNGIILY.js")).ActionCableRequestHandler;return new l})},copyTag:"REQUEST_HANDLER_ACTION_CABLE"}),this.addHandlerData({id:XT,getHandler(){return G(this,null,function*(){let l=(yield import("./chunk-FYNPTAVN.js")).SSERequestHandler;return new l})},copyTag:"REQUEST_HANDLER_GRAPHQL_SSE"})}addHandlerData(e){this.list.push(e),this.list$.next(this.list)}getHandlerData(e){let i=this.list.find(r=>r.id===e);if(!i)throw new Error(`No request handler found for "${e}"`);return i}getAllHandlerData(){return this.list}getAllHandlerData$(){return this.list$.asObservable()}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=oe({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var nwe=n=>n.reduce((t,e)=>(e.key&&e.value&&e.enabled&&(t[e.key]=e.value),t),{});var tz=class{constructor(t){this.providerClass=t}handle(t){return new Zn(e=>{let i=Date.now();return this.provider=new this.providerClass(t.url,t.additionalParams??{},{headers:nwe(t.headers??[]),onConnected(r,o){r&&e.error(r)}}),this.provider.execute({query:t.query,variables:t.variables,operationName:t.selectedOperation??void 0}).subscribe(Moe(e,t.url,i)),()=>{this.provider?.close()}})}generateCurl(t){throw new Error("Method not implemented.")}};var ww=(()=>{class n{constructor(){this.store=R(mn),this.windowService=R(Go),this.pluginEventService=R(b1),this.themeRegistryService=R(S1),this.requestHandlerRegistryService=R(x1),this.notifyService=R(ii),this.sanitizer=R(fc)}createV1Context(e,i){let r=this,o=c=>Ne.log(`PLUGIN[${e}]: ${c}`),s=this.pluginEventService.group();return o("creating context.."),{app:{getWindowState(c){return G(this,null,function*(){return r.getWindowState(c)})},getCurrentWindowState(){return G(this,null,function*(){return r.getCurrentWindowState()})},createPanel(c,{location:u=Wf.SIDEBAR,title:h=i.display_name}={}){o(`Creating panel<${h}>`);let p=new T2(h,c,u);return r.store.dispatch(new m7(p)),p},destroyPanel(c){o(`Destroying panel<${c.title}:[${c.id}]>`),c instanceof T2&&(c.destroy(),r.store.dispatch(new g7({panelId:c.id})))},createAction({title:c,location:u=D8.RESULT_PANE,execute:h}){o(`Creating ui action<${c}>`);let p=new M8(c,u,()=>G(null,null,function*(){let f=yield r.getCurrentWindowState();f&&h(f)}));return r.store.dispatch(new y7(p)),p},destroyAction(c){o(`Destroying ui action<${c.title}:[${c.id}]>`),c instanceof M8&&r.store.dispatch(new v7({actionId:c.id}))},isElectron(){return mc},createWindow(c){return o("creating window"),r.windowService.importWindowData(c)},setQuery(c,u){o("setting query"),r.store.dispatch(new Rs(u,c))},setVariables(c,u){o("setting variables"),r.store.dispatch(new du(u,c))},setEndpoint(c,u){o("setting endpoint"),r.store.dispatch(new Lp({url:u},c)),r.store.dispatch(new _s(c))},setHeader(c,u,h){return G(this,null,function*(){o(`setting header: ${u}`);let f=(yield this.getWindowState(c))?.headers??[],_=t$(f);_[u]=h,r.store.dispatch(new _2({headers:X_(_)},c))})},addSubscriptionProvider(c){o(`adding subscription provider: ${c.id}`),r.requestHandlerRegistryService.addHandlerData({id:c.id,getHandler(){return G(this,null,function*(){return new tz(yield c.getProviderClass())})},copyTag:c.copyTag})},executeCommand(){}},events:{on(c,u){return s.on(c,u)},off(){return o("unsubscribing from all events"),s.unsubscribe()}},theme:{add(c,u){return o("Adding theme: "+c),r.themeRegistryService.addTheme(`plugin:${c}`,u)},enable(c,u=!1){return G(this,null,function*(){o("Enabling theme: "+c);let h=k({},yield r.store.select("settings").pipe(Ct(1)).toPromise());u?h["theme.dark"]=`plugin:${c}`:h.theme=`plugin:${c}`,r.store.dispatch(new vh({value:JSON.stringify(h)})),r.notifyService.info(`Plugin "${e}" has enabled the "${c}" theme`)})}}}}createV3Context(e,i,r){let o=this,s=(u,...h)=>Ne.log(`PLUGIN[${e}]: ${u}`,...h),a=this.pluginEventService.group();s("creating context..");let l={getWindowState(u){return G(this,null,function*(){return o.getWindowState(u)})},getCurrentWindowState(){return G(this,null,function*(){return o.getCurrentWindowState()})},createPanel(_){return G(this,arguments,function*(u,{location:h=Wf.SIDEBAR,title:p=i.display_name??i.name,width:f}={}){s(`Creating panel<${u}, ${p}>`);let w=`panel-${Fr()}`,x=new Dg(q(k({},r),{id:w,instanceType:"panel",disableAppend:!0,width:f,additionalParams:{panelName:u}})),T=i.icon?.type==="image"?i.icon.url:"",z="";if(i.icon?.type==="svg"){let Le=(yield import("./chunk-35VQWODI.js")).default.sanitize(i.icon.src);z=o.sanitizer.bypassSecurityTrustHtml(Le)}let A=yield ps(o.store.select("settings").pipe(Ct(1))),V=o.themeRegistryService.getTheme(A.theme)||{isSystem:!0},U=A.themeConfig||{},B=o.themeRegistryService.mergeThemes(V,U),K=new $6(x,{theme:B}),$=new T2(p,x.getIframe(),h,K,T,z);return K.start(l),o.store.dispatch(new m7($)),$.id})},destroyPanel(u){return G(this,null,function*(){let p=(yield o.store.select("local").pipe(Ct(1)).toPromise())?.panels.find(f=>f.id===u);p&&(s(`Destroying panel<${p.title}:[${p.id}]>`),p instanceof T2&&(p.engine?.destroy(),p.destroy(),o.store.dispatch(new g7({panelId:p.id}))))})},createAction(f){return G(this,arguments,function*({title:u,location:h=D8.RESULT_PANE,execute:p}){s(`Creating ui action<${u}>`);let _=new M8(u,h,()=>G(null,null,function*(){let w=yield o.getCurrentWindowState();w&&p(w)}));return o.store.dispatch(new y7(_)),_.id})},destroyAction(u){return G(this,null,function*(){s(`Destroying ui action<[${u}]>`),o.store.dispatch(new v7({actionId:u}))})},isElectron(){return G(this,null,function*(){return mc})},createWindow(u){return G(this,null,function*(){s("creating window"),yield o.windowService.importWindowData(u)})},setQuery(u,h){return G(this,null,function*(){s("setting query"),o.store.dispatch(new Rs(h,u))})},setVariables(u,h){return G(this,null,function*(){s("setting variables"),o.store.dispatch(new du(h,u))})},setEndpoint(u,h){return G(this,null,function*(){s("setting endpoint"),o.store.dispatch(new Lp({url:h},u)),o.store.dispatch(new _s(u))})},setHeader(u,h,p){return G(this,null,function*(){s(`setting header: ${h}`);let _=(yield this.getWindowState(u))?.headers??[],w=t$(_);w[h]=p,o.store.dispatch(new _2({headers:X_(w)},u))})},on(u,h){return a.on(u,h)},off(){return s("unsubscribing from all events"),a.unsubscribe()},addTheme(u,h){return G(this,null,function*(){return s("Adding theme: "+u),o.themeRegistryService.addTheme(`plugin:${u}`,h)})},enableTheme(u,h=!1){return G(this,null,function*(){s("Enabling theme: "+u);let p=k({},yield o.store.select("settings").pipe(Ct(1)).toPromise());h?p["theme.dark"]=`plugin:${u}`:p.theme=`plugin:${u}`,o.store.dispatch(new vh({value:JSON.stringify(p)})),o.notifyService.info(`Plugin "${e}" has enabled the "${u}" theme`)})},getUserInfo(){return G(this,null,function*(){let u=yield ps(o.store.select("account").pipe(Ct(1)));return{avatar:u.picture,email:u.email,loggedIn:u.loggedIn,name:u.firstName,plan:u.plan}})},getAvailableCredits(){return G(this,null,function*(){return yield Yn.getAvailableCredits()})},createAiSession(){return G(this,null,function*(){return yield Yn.createAiSession()})},getActiveAiSession(){return G(this,null,function*(){return yield Yn.getActiveAiSession()})},getAiSessionMessages(u){return G(this,null,function*(){return yield Yn.getAiSessionMessages(u)})},sendMessageToAiSession(u,h){return Yn.sendMessageToAiSession(u,h)},rateAiSessionMessage(u,h,p){return Yn.rateAiMessage(u,h,{rating:p})}};return l}getWindowState(e){return G(this,null,function*(){let i=yield this.store.select(xc(e)).pipe(Ct(1)).toPromise();return i?{version:1,type:"window",windowId:e,query:i.query.query||"",apiUrl:i.query.url,variables:i.variables.variables,subscriptionUrl:i.query.subscriptionUrl,headers:i.headers,windowName:i.layout.title,preRequestScript:i.preRequest.script,preRequestScriptEnabled:i.preRequest.enabled,postRequestScript:i.postRequest.script,postRequestScriptEnabled:i.postRequest.enabled,requestHandlerId:i.query.requestHandlerId,requestHandlerAdditionalParams:i.query.requestHandlerAdditionalParams,subscriptionRequestHandlerId:i.query.subscriptionRequestHandlerId,subscriptionConnectionParams:i.query.subscriptionConnectionParams,subscriptionUseDefaultRequestHandler:i.query.subscriptionUseDefaultRequestHandler,authorizationType:i.authorization.type,authorizationData:i.authorization.data,sdl:i.schema.sdl,queryResults:i.query.responses?.map(o=>o.content)??[],requestStartTime:i.query.requestStartTime,requestEndTime:i.query.requestEndTime,responseTime:i.query.responseTime,responseStatus:i.query.responseStatus}:void 0})}getCurrentWindowState(){return G(this,null,function*(){let e=yield this.store.select("windowsMeta").pipe(Ct(1)).toPromise();if(e)return this.getWindowState(e.activeWindowId)})}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=oe({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var q6=zs.enum({NPM:"npm",GITHUB:"github",URL:"url"}),iwe=zs.enum({HEADER:"header",SIDEBAR:"sidebar",ACTION_BUTTON:"action_button"}),bw=zs.enum(["query:read","query:write","header:read","header:write","environment:read","environment:write"]),OX=ir({manifest_version:Qu(1).or(Qu(2)).meta({description:"Version of manifest. Should be 1 or 2."}),name:Je().meta({description:"Name of the plugin"}),display_name:Je().meta({description:"Display name of the plugin"}),version:Je().meta({description:"Version of the plugin"}),description:Je().meta({description:"Description of the plugin"}),author_email:Je().meta({description:"Author email of the plugin"}).optional(),author:Je().meta({description:"Author of the plugin"}).optional(),type:iwe.meta({description:"This specifies the type of plugin. This determines how the plugin would interact with Altair. For now there is just the typical plugin type (registered plugin class). In the future, this would include other plugins like themes."}).optional(),plugin_class:Je().meta({description:"This specifies the class name of the plugin, for discovery"}).optional(),scripts:Je().array().meta({description:"An array containing the list of scripts (relative to the plugin root directory) that need to be loaded for the plugin to function."}),styles:Je().array().meta({description:"An array containing the list of styles (relative to the plugin root directory) that need to be loaded for the plugin to function."}).optional(),capabilities:bw.array().meta({description:"Specifies the capabilities (functionalities) available to the plugin. In the future, this would be used to request the necessary permissions from the user"}).optional()}),rwe=ir({name:Je().meta({description:"Name of the plugin"}),display_name:Je().meta({description:"Display name of the plugin"}),capabilities:bw.array().meta({description:"Specifies the capabilities (functionalities) available to the plugin. In the future, this would be used to request the necessary permissions from the user"}),type:iwe.meta({description:"This specifies the type of plugin. This determines how the plugin would interact with Altair. For now there is just the typical plugin type (registered plugin class). In the future, this would include other plugins like themes."}).optional(),plugin_class:Je().meta({description:"This specifies the class name of the plugin, for discovery"}).optional(),manifest:OX.meta({description:"The plugin manifest"})});var owe=(n,t)=>rwe.parse({name:n,manifest:t,type:t.type,display_name:t.display_name||n,plugin_class:t.plugin_class,capabilities:Array.from(new Set([...t.capabilities||[],"query:read","query:write"]))});var Rft=ir({type:Qu("html"),path:Je()}),Nft=ir({type:Qu("js"),scripts:Je().array(),styles:Je().array()}),Lft=Sm([Rft,Nft]),Fft=ir({type:Qu("image"),url:Je()}),Vft=ir({type:Qu("svg"),src:Je()}),Bft=Sm([Fft,Vft]),swe=ir({manifest_version:Qu(3).meta({description:"Version of manifest (should be 3). It is a control measure for variations in the plugin versions"}),name:Je().meta({description:"Name of the plugin. It should be the same name you would use in your `package.json` file. It uniquely identifies your plugin. The plugin name must begin with `altair-graphql-plugin-`."}),display_name:Je().meta({description:"The name of the plugin that is displayed in the UI. It is the human readable version of your plugin name."}),version:Je().meta({description:"The version of your plugin. It should be the same version you would have in your `package.json` file (except you have a good reason why they should be different)."}),description:Je().meta({description:"The description of what your plugin is about. It would be used to describe your plugin."}),entry:Lft.meta({description:"The entry point of the plugin"}),capabilities:bw.array().meta({description:"Specifies the capabilities (functionalities) available to the plugin. In the future, this would be used to request the necessary permissions from the user"}).optional(),author_email:Je().meta({description:"Email of the author of the plugin"}).optional(),author:Je().meta({description:"Name of the author of the plugin"}).optional(),minimum_altair_version:Je().meta({description:"The minimum version of Altair that the plugin is compatible with. This is useful for when the plugin uses features that are only available in a certain version of Altair"}).optional(),icon:Bft.meta({description:"The icon of the plugin. It can be an image or an SVG"}).optional()});var ywe=Ci(U_());var awe=n=>new Promise((t,e)=>{let i=document.getElementsByTagName("head")[0];if(!i)return e(new Error("No head found!"));let r=document.createElement("script");r.type="text/javascript",r.src=n,r.onload=()=>t(null),r.onerror=o=>e(o),i.appendChild(r)}),lwe=n=>new Promise((t,e)=>{let i=document.getElementsByTagName("head")[0];if(!i)return e(new Error("No head found!"));let r=document.createElement("link");r.type="text/css",r.rel="stylesheet",r.href=n,r.onload=()=>t(null),r.onerror=o=>e(o),i.appendChild(r)});var Hft=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,EX=n=>{if(typeof n!="string")throw new TypeError("Invalid argument expected string");let t=n.match(Hft);if(!t)throw new Error(`Invalid argument not valid semver ('${n}' received)`);return t.shift(),t},cwe=n=>n==="*"||n==="x"||n==="X",uwe=n=>{let t=parseInt(n,10);return isNaN(t)?n:t},jft=(n,t)=>typeof n!=typeof t?[String(n),String(t)]:[n,t],$ft=(n,t)=>{if(cwe(n)||cwe(t))return 0;let[e,i]=jft(uwe(n),uwe(t));return e>i?1:e<i?-1:0},MX=(n,t)=>{for(let e=0;e<Math.max(n.length,t.length);e++){let i=$ft(n[e]||"0",t[e]||"0");if(i!==0)return i}return 0};var dwe=(n,t)=>{let e=EX(n),i=EX(t),r=e.pop(),o=i.pop(),s=MX(e,i);return s!==0?s:r&&o?MX(r.split("."),o.split(".")):r||o?r?-1:1:0};var DX=(n,t,e)=>{qft(e);let i=dwe(n,t);return pwe[e].includes(i)},pwe={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},hwe=Object.keys(pwe),qft=n=>{if(typeof n!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof n}`);if(hwe.indexOf(n)===-1)throw new Error(`Invalid operator, expected one of ${hwe.join("|")}`)};var fwe=ir({id:Je().meta({description:"The plugin ID (used to install the plugin)"}),name:Je().meta({description:"The display name of the plugin"}),description:Je().meta({description:"The description of the plugin"}),author:Je().meta({description:"The author of the plugin"}),repository:Je().meta({description:"The GitHub repository of the plugin"}),homepage:Je().optional().meta({description:"The homepage of the plugin"})}),P5n=ir({plugins:$d(Je(),fwe).meta({description:"List of approved plugins"})}),mwe=ir({plugins:fwe.array().meta({description:"List of approved plugins"})});function IX(n){return Cv(ze(t=>{let e=n.safeParse(t);if(!e.success){Ne.error(e.error);return}return t}))}var gwe="altair-graphql-plugin-",zX="__user_plugin_approved_map",Uft=Ii().getUrlConfig(sr.production?"production":"development"),Ig=(()=>{class n{constructor(){this.http=R(Ta),this.pluginContextService=R(ww),this.db=R(Ec),this.notifyService=R(ii),this.store=R(mn),this.fetchedPlugins=[]}addV1Plugin(e,i){let r=this.pluginContextService.createV1Context(e,i),o=this.getPluginClass(i),s={manifest_version:i.manifest.manifest_version,name:e,context:r,instance:o?new o:void 0,plugin:i};if(!s.instance)throw new Error(`Could not create the plugin instance for plugin: ${e}. Check that plugin_class is set correctly in manifest.`);s.instance.initialize(r),this.store.dispatch(new f7(s))}addV3Plugin(e,i,r,o){let s=new $6(r),a=this.pluginContextService.createV3Context(e,i,o);s.start(a);let l={manifest_version:i.manifest_version,name:e,context:a,engine:s,manifest:i};this.store.dispatch(new f7(l))}getRemotePluginList(){let e=new URL("/data/v1/plugins.json",Uft.docs).href;return this.http.get(e).pipe(IX(mwe))}fetchPlugin(e,i){e&&this.fetchedPlugins.push(this.fetchPluginAssets(e,i))}installedPlugins(){return this.store.select(e=>e.local.installedPlugins)}getPluginInfoFromString(e){let i=e.match(/(([A-Za-z_]*):)?(.[A-Za-z0-9-]*)(@([^#:[\]]*))?(::\[(.*)\]->\[(.*)\])?/);if(i&&i.length){let[,,r=q6.enum.NPM,o,,s="latest",,a,l]=i;if(o&&s){if(!o.startsWith(gwe)){Ne.error(`Plugin name must start with ${gwe}`);return}return k({name:o,version:s,pluginSource:r},a&&l&&{[a]:l})}}}pluginsReady(){return Promise.all(this.fetchedPlugins)}isUserApprovedPlugin(e){return G(this,null,function*(){if(e.version==="latest")return!1;let i=yield this.db.getItem(zX).pipe(Ct(1)).toPromise();return!i||!i[e.pluginSource]||!i[e.pluginSource]?.[e.name]?!1:i[e.pluginSource]?.[e.name]?.includes(e.version)})}addPluginToApprovedMap(e){return G(this,null,function*(){let i={};if(e.version==="latest")return;let r=yield this.db.getItem(zX).pipe(Ct(1)).toPromise();r&&(i=r);let o=i[e.pluginSource]||={};(o[e.name]||=[]).push(e.version),yield this.db.setItem(zX,i).pipe(Ct(1)).toPromise()})}isPluginInSettings(e){return G(this,null,function*(){let i=yield this.store.select(r=>r.settings).pipe(Ct(1)).toPromise();return i?.["plugin.list"]?i["plugin.list"].some(r=>{let o=this.getPluginInfoFromString(r);return o?o.name===e:!1}):!1})}addPluginToSettings(e){return G(this,null,function*(){let i=yield this.store.select(o=>o.settings).pipe(Ct(1)).toPromise(),r=JSON.parse(JSON.stringify(i));r["plugin.list"]=r["plugin.list"]||[],r["plugin.list"].push(e),this.store.dispatch(new vh({value:JSON.stringify(r)}))})}removePluginFromSettings(e){return G(this,null,function*(){let i=yield this.store.select(o=>o.settings).pipe(Ct(1)).toPromise(),r=JSON.parse(JSON.stringify(i));r["plugin.list"]=(r["plugin.list"]||[]).filter(o=>{let s=this.getPluginInfoFromString(o);if(s)return e!==s.name}),this.store.dispatch(new vh({value:JSON.stringify(r)}))})}fetchPluginAssets(e,s){return G(this,null,function*(){var a=s,{pluginSource:i=q6.enum.NPM,version:r="latest"}=a,o=$o(a,["pluginSource","version"]);Ne.log("PLUGIN: ",e,i,r);let l=this.getPluginBaseURL(k({pluginSource:i,version:r},o)),c=this.resolveURL(l,"manifest.json");try{Ne.debug(`PLUGIN[${e}]: Fetching manifest from ${c}`);let u=yield ps(this.http.get(c).pipe(IX(Sm([OX,swe]))));if(!u)throw new Error(`PLUGIN[${e}]: Could not fetch manifest file`);Ne.debug(`PLUGIN[${e}]: Manifest fetched successfully`,u);let h={name:e,pluginSource:i,version:u.version};if(Ne.debug(`PLUGIN[${e}]: Checking if user has approved the plugin or not`),!(yield this.isUserApprovedPlugin(h))){if(Ne.debug(`PLUGIN[${e}]: Plugin is not approved by user. Asking for approval.`),!(yield this.notifyService.confirm(`Are you sure you want to install "${(0,ywe.default)(e)}" plugin?`,"Plugin manager"))){yield this.removePluginFromSettings(h.name);return}yield this.addPluginToApprovedMap(h)}if(Ne.debug(`PLUGIN[${e}]: User approval check complete`),u.manifest_version===1||u.manifest_version===2)return this.fetchPluginV1Assets(e,u,l);if(u.manifest_version>=3&&"entry"in u){if(u.minimum_altair_version&&DX(u.minimum_altair_version,sr.version,">")){this.notifyService.warning(`Plugin ${e} requires Altair version ${u.minimum_altair_version} or higher. Please update Altair to use this plugin.`);return}return this.fetchPluginV3Assets(e,u,l)}}catch(u){Ne.error(`PLUGIN[${e}]: Error fetching plugin assets`,u)}})}fetchPluginV1Assets(e,i,r){return G(this,null,function*(){i?.styles?.length&&(Ne.log("V1 PLUGIN styles",i.styles),yield Promise.all(i.styles.map(s=>lwe(this.resolveURL(r,s))))),i?.scripts?.length&&(Ne.log("V1 PLUGIN scripts",i.scripts),yield Promise.all(i.scripts.map(s=>awe(this.resolveURL(r,s)))));let o=owe(e,i);return this.addV1Plugin(e,o),Ne.debug(`PLUGIN[${e}]: V1 plugin scripts and styles injected and loaded.`),this.notifyService.warning(`V1 plugins are deprecated and will be disabled in the future. If you're an owner of ${e}, consider migrating to V3.`,void 0,{data:{url:"https://altairgraphql.dev/docs/learn/mv3"}}),o})}fetchPluginV3Assets(e,i,r){return G(this,null,function*(){let o=`plugin-${Fr()}`,s=i.entry;if(s.type==="html"){let a=this.resolveURL(r,s.path),l={id:o,type:"url",pluginEntrypointUrl:a},c=new Dg(l);this.addV3Plugin(e,i,c,l),Ne.log("PLUGIN","V3 plugin loaded with src.")}else if(s.type==="js"){let a=s.scripts.map(h=>this.resolveURL(r,h)),l=s.styles.map(h=>this.resolveURL(r,h)),c={id:o,sandboxUrl:yield Ii().getUrl("sandbox",sr.production?"production":"development"),type:"scripts",scriptUrls:a,styleUrls:l},u=new Dg(c);this.addV3Plugin(e,i,u,c)}})}getPluginBaseURL(e){switch(e.pluginSource){case q6.enum.NPM:return this.getNPMPluginBaseURL(e.name,{version:e.version});case q6.enum.GITHUB:return this.getGithubPluginBaseURL(e.name,e);case q6.enum.URL:return this.getURLPluginBaseURL(e.name,e)}}getNPMPluginBaseURL(e,{version:i="latest"}){return`https://cdn.jsdelivr.net/npm/${e}@${i}/`}getGithubPluginBaseURL(e,i){let r="https://cdn.jsdelivr.net/gh/",o=i.version==="latest"?"":`@${i.version}`;return`${r}${i.repo}${o}/`}getURLPluginBaseURL(e,i){return i.url||""}resolveURL(e,i){return e.replace(/\/$/,"")+"/"+i.replace(/^\//,"")}getPluginClass(e){if(e.plugin_class)return window.AltairGraphQL.plugins[e.plugin_class]}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=oe({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var nz=(()=>{class n{constructor(e,i){this.document=e,this.platformId=i,this.documentIsAccessible=rs(this.platformId)}static getCookieRegExp(e){let i=e.replace(/([\[\]\{\}\(\)\|\=\;\+\?\,\.\*\^\$])/gi,"\\$1");return new RegExp("(?:^"+i+"|;\\s*"+i+")=(.*?)(?:;|$)","g")}static safeDecodeURIComponent(e){try{return decodeURIComponent(e)}catch{return e}}check(e){return this.documentIsAccessible?(e=encodeURIComponent(e),n.getCookieRegExp(e).test(this.document.cookie)):!1}get(e){if(this.documentIsAccessible&&this.check(e)){e=encodeURIComponent(e);let r=n.getCookieRegExp(e).exec(this.document.cookie);return r[1]?n.safeDecodeURIComponent(r[1]):""}else return""}getAll(){if(!this.documentIsAccessible)return{};let e={},i=this.document;return i.cookie&&i.cookie!==""&&i.cookie.split(";").forEach(r=>{let[o,s]=r.split("=");e[n.safeDecodeURIComponent(o.replace(/^ /,""))]=n.safeDecodeURIComponent(s)}),e}set(e,i,r,o,s,a,l){if(!this.documentIsAccessible)return;if(typeof r=="number"||r instanceof Date||o||s||a||l){let h={expires:r,path:o,domain:s,secure:a,sameSite:l||"Lax"};this.set(e,i,h);return}let c=encodeURIComponent(e)+"="+encodeURIComponent(i)+";",u=r||{};if(u.expires)if(typeof u.expires=="number"){let h=new Date(new Date().getTime()+u.expires*1e3*60*60*24);c+="expires="+h.toUTCString()+";"}else c+="expires="+u.expires.toUTCString()+";";u.path&&(c+="path="+u.path+";"),u.domain&&(c+="domain="+u.domain+";"),u.secure===!1&&u.sameSite==="None"&&(u.secure=!0,console.warn(`[ngx-cookie-service] Cookie ${e} was forced with secure flag because sameSite=None.More details : https://github.com/stevermeister/ngx-cookie-service/issues/86#issuecomment-597720130`)),u.secure&&(c+="secure;"),u.sameSite||(u.sameSite="Lax"),c+="sameSite="+u.sameSite+";",this.document.cookie=c}delete(e,i,r,o,s="Lax"){if(!this.documentIsAccessible)return;let a=new Date("Thu, 01 Jan 1970 00:00:01 GMT");this.set(e,"",{expires:a,path:i,domain:r,secure:o,sameSite:s})}deleteAll(e,i,r,o="Lax"){if(!this.documentIsAccessible)return;let s=this.getAll();for(let a in s)s.hasOwnProperty(a)&&this.delete(a,e,i,r,o)}}return n.\u0275fac=function(e){return new(e||n)(ue(Xt),ue(vs))},n.\u0275prov=oe({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();var zg=class extends Error{constructor(t){let e=t instanceof Error?t.message:String(t);super(e),this.name="RequestScriptError",this.cause=t instanceof Error?t:new Error(String(t))}};var vwe="init_execute",_we=n=>`${n}_response`,Cwe=n=>`${n}_error`;var Qft=1e3*60*5,iz=class{constructor(t,e=Qft){this.engineFactory=t,this.timeout=e}getClient(){return G(this,null,function*(){let t=this.client??(yield this.engineFactory.create());return this.client=t,t})}executeScript(t,e,i){return G(this,null,function*(){try{let r=yield this.getClient();return yield new Promise((s,a)=>{let l=setTimeout(()=>{this.killClient(),a(new Error("script timeout"))},this.timeout),c=q(k({},i),{executeComplete:u=>{clearTimeout(l),s({environment:u.environment,requestScriptLogs:u.requestScriptLogs||[]})},scriptError:u=>{clearTimeout(l),a(u)}});Object.entries(c).forEach(([u,h])=>{r.subscribe(u,(p,f)=>{let{id:_,args:w}=f.payload;G(this,null,function*(){try{let x=yield h(...w);r.sendResponse(p,{id:_,response:x})}catch(x){r.sendError(p,{id:_,error:`${x.message??x}`})}})})}),r.onError(u=>{clearTimeout(l),a(u)}),r.send(vwe,[t,e])})}finally{this.killClient()}})}killClient(){this.client?.destroy(),this.client=void 0}};var k1=(function(n){return n.INTROSPECTION="introspection",n.QUERY="query",n.SUBSCRIPTION="subscription",n})(k1||{}),U6=class{sendResponse(t,e){this.send(_we(t),e)}sendError(t,e){this.send(Cwe(t),e)}};var Sw=Ci(zk());var Wft={atob:{exec(){return G(this,null,function*(){return(yield import("./chunk-SLWAEMHP.js")).atob})}},btoa:{exec(){return G(this,null,function*(){return(yield import("./chunk-SLWAEMHP.js")).btoa})}},"crypto-js":{exec(){return G(this,null,function*(){return(yield import("./chunk-BFZ77DNT.js")).default})}}},Yft=n=>{if(n.response)return{body:n.response.body,requestType:n.requestType??k1.QUERY,responseTime:n.response.responseTime,statusCode:n.response.status,headers:n.response.headers}},Gft=n=>G(null,null,function*(){let t=Wft[n];if(!t)throw new Error(`No request script module found matching "${n}"`);return t.exec()}),Q6=(n,t)=>({data:n,helpers:{getEnvironment:e=>(0,Sw.get)(n.environment,e),setEnvironment:(e,i,r=!1)=>{(0,Sw.set)(n.environment,e,i),r&&(n.__toSetActiveEnvironment=n.__toSetActiveEnvironment??{},(0,Sw.set)(n.__toSetActiveEnvironment,e,i))},getCookie:e=>n.__cookieJar?.[e]??"",setCookie:(e,i,r)=>{t.setCookie(e,i,r)},request:(e,i,r)=>G(null,null,function*(){return t.request(e,i,r)})},storage:{get:e=>t.getStorageItem(e),set:(e,i)=>t.setStorageItem(e,i)},importModule:e=>Gft(e),response:Yft(n),log:e=>{n.requestScriptLogs=n.requestScriptLogs??[],n.requestScriptLogs.push({id:crypto.randomUUID(),time:Date.now(),text:JSON.stringify(e,null,2),source:"Request script"})}});var rz=class extends U6{constructor(){super(...arguments),this.worker=new Worker(new URL("worker-2ZPX3FTR.js",import.meta.url),{type:"module"})}subscribe(t,e){this.worker.addEventListener("message",i=>{let r=i.data;r.type===t&&(Ne.log(r.type,r),e(t,r))})}send(t,e){this.worker.postMessage({type:t,payload:e})}onError(t){this.worker.addEventListener("error",t)}destroy(){this.worker.terminate()}};var AX=class extends U6{constructor(t){super(),this.sandboxUrl=t,this.iframe=this.createIframe(),this.messageListeners=[],this.iframeLoadedPromise=new Promise(e=>{this.iframe.addEventListener("load",()=>{e()})})}createIframe(){let t=document.createElement("iframe");t.style.display="none";let e=new URL(this.sandboxUrl);return e.searchParams.set("sc",window.location.origin),e.searchParams.set("action","evaluator"),t.src=e.toString(),t.sandbox.add("allow-scripts"),t.sandbox.add("allow-same-origin"),t.referrerPolicy="no-referrer",document.body.appendChild(t),t}subscribe(t,e){let i=r=>{if(r.origin!==new URL(this.sandboxUrl).origin)return;let o=r.data;o.type===t&&(Ne.log(o.type,o),e(t,o))};window.addEventListener("message",i),this.messageListeners.push(i)}send(t,e){return G(this,null,function*(){yield this.iframeLoadedPromise,this.iframe.contentWindow?.postMessage({type:t,payload:e},this.sandboxUrl)})}onError(t){this.iframe.addEventListener("error",t)}destroy(){this.messageListeners.forEach(t=>{window.removeEventListener("message",t)}),this.iframe.removeAllListeners?.(),this.iframe.remove()}},oz=class{create(){return G(this,null,function*(){return!this.isManifestV3Extension()&&this.isSameOriginBaseURI()&&this.isEvalAllowed()?new rz:new AX(yield Ii().getUrl("sandbox",sr.production?"production":"development"))})}isManifestV3Extension(){return id&&chrome.runtime.getManifest().manifest_version===3}isSameOriginBaseURI(){return document.baseURI&&new URL(document.baseURI).origin===window.origin}isEvalAllowed(){try{return(0,eval)("1"),!0}catch{return!1}}};var wwe="request-script",xw=(()=>{class n{constructor(){this.cookieService=R(nz),this.http=R(Ta),this.store=R(mn),this.notifyService=R(ii),this.dbService=R(Ec)}executeScript(e,i){return G(this,null,function*(){return(yield this.store.select(o=>o.settings["beta.disable.newScript"]).pipe(Ct(1)).toPromise())?this.executeScriptOld(e,i):this.executeScriptNew(e,i)})}executeScriptNew(e,i){return G(this,null,function*(){let r=this,o=yield this.store.select(c=>c.settings["script.allowedCookies"]).pipe(Ct(1)).toPromise(),s=r.cookieService.getAll(),a=Object.entries(s).reduce((c,[u,h])=>(o?.includes(u)&&(c[u]=h),c),{});i.__cookieJar=a;let l=yield new iz(new oz).executeScript(e,i,{alert:c=>G(this,null,function*(){return this.notifyService.info(`Alert: ${c}`,"Request script")}),log:c=>G(this,null,function*(){Ne.log("request script log:",c)}),request:(c,u,h)=>G(this,null,function*(){try{return r.http.request(c,u,h).toPromise()}catch{return null}}),setCookie:(c,u,h)=>G(this,null,function*(){if(!o?.includes(c))return this.notifyService.warning(`Cookie "${c}" is not allowed to be set by scripts. You can configure allowed cookies in settings.`,"Request script");r.cookieService.set(c,u,h)}),getStorageItem:c=>this.getStorageItem(c),setStorageItem:(c,u)=>this.setStorageItem(c,u),updateActiveEnvironment:c=>this.updateActiveEnvironment(c)});return Ne.debug("script result:",l),l})}executeScriptOld(e,i){return G(this,null,function*(){let r=(yield import("./chunk-2OVBIND4.js")).default,o=JSON.parse(JSON.stringify(i)),s=new r({ecmaVer:10,sandBox:!0});s.import({altair:Q6(o,{setCookie:(a,l,c)=>G(this,null,function*(){this.cookieService.set(a,l,c)}),request:(a,l,c)=>G(this,null,function*(){try{return ps(this.http.request(a,l,c))}catch{return null}}),getStorageItem:a=>this.getStorageItem(a),setStorageItem:(a,l)=>this.setStorageItem(a,l)}),alert:a=>this.notifyService.info(`Alert: ${a}`)}),s.run(`
303
303
  const program = async() => {
304
304
  ${e};
305
305
  return altair.data;
306
306
  };
307
307
  exports.end = program();
308
- `);try{let a=yield s.exports.end;Ne.log("interpreter result:",a)}catch(a){throw new zg(a)}return o.__toSetActiveEnvironment&&(yield this.updateActiveEnvironment(o.__toSetActiveEnvironment)),{environment:o.environment,requestScriptLogs:o.requestScriptLogs??[]}})}getStorageItem(e){return G(this,null,function*(){return(yield ps(this.store.select(r=>r.settings["script.allowedLocalStorageKeys"]).pipe(Ct(1))))?.includes(e)?(this.notifyService.warning(`Accessing local storage key "${e}" (read-only) from request script.`,"Request script"),localStorage.getItem(e)):this.dbService.getItem(`${wwe}:${e}`).pipe(Ct(1)).toPromise()})}setStorageItem(e,i){return this.dbService.setItem(`${wwe}:${e}`,i).pipe(Ct(1)).toPromise()}updateActiveEnvironment(e){return G(this,null,function*(){let i=yield this.store.select(I8).pipe(Ct(1)).toPromise();if(i)try{let r=k(k({},JSON.parse(i.variablesJson)),e),o=i.id;if(!o)throw new zg("Invalid active environment state ID");this.store.dispatch(new E3({id:o,value:JSON.stringify(r,null,2)})),this.notifyService.info(`Updated active environment variables: ${Object.keys(e).join(", ")}.`,"Request script")}catch(r){this.notifyService.errorWithError(r,"Could not update active environment variables.","Request script")}else this.notifyService.warning("No active environment selected. Cannot update environment variables","Request script")})}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=oe({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var sz={[yh.NONE]:{copy:"AUTHORIZATION_PROVIDER_NONE"},[yh.BASIC]:{copy:"AUTHORIZATION_PROVIDER_BASIC",getProviderClass(){return G(this,null,function*(){return(yield import("./chunk-FPFH3SGP.js")).default})}},[yh.BEARER]:{copy:"AUTHORIZATION_PROVIDER_BEARER",getProviderClass(){return G(this,null,function*(){return(yield import("./chunk-SMDHZLZM.js")).default})}},[yh.API_KEY]:{copy:"AUTHORIZATION_PROVIDER_API_KEY",getProviderClass(){return G(this,null,function*(){return(yield import("./chunk-FG6ERPTD.js")).default})}},[yh.OAUTH2]:{copy:"AUTHORIZATION_PROVIDER_OAUTH2",getProviderClass(){return G(this,null,function*(){return(yield import("./chunk-SYGR42K4.js")).default})}}};var kw=(()=>{class n{constructor(){this.notifyService=R(ii),this.environmentService=R(na),this.preRequestService=R(xw),this.requestHandlerRegistryService=R(x1),this.store=R(mn)}getWindowState$(e){return this.store.pipe(ni(xc(e)))}getWindowState(e){return G(this,null,function*(){return this.getWindowState$(e).pipe(Ct(1)).toPromise()})}getDefaultTransformResult(){return{combinedHeaders:[],requestScriptLogs:[],environment:this.environmentService.getActiveEnvironment()}}getPrerequestScriptResultForScript(e,i,r){return G(this,null,function*(){let o=yield this.getWindowState(e);if(!o)return r;let s=(o.query.selectedOperation??"").trim(),{query:a,variables:l,headers:c,extensions:u,url:h}=this.hydrateAllHydratables(o,r),p=this.environmentService.mergeWithActiveEnvironment(r?.environment??{});try{let f=yield this.preRequestService.executeScript(i,{environment:p,headers:c,operationName:s,query:a,variables:l,url:h,requestExtensions:u});return k(k({},r),f)}catch(f){return Ne.error(f),this.notifyService.error(`Error executing pre-request script: ${f}`),r}})}getCombinedHeaders(e,i){return[...i.map(o=>o.headers||[]).flat(),...e.headers]}getPrerequestTransformedData(e){return G(this,null,function*(){let i=yield this.getWindowState(e),r=this.getDefaultTransformResult();if(!i)return r;let o=yield this.getWindowParentCollections(i.windowId);r.combinedHeaders=this.getCombinedHeaders(i,o),r.environment=this.environmentService.getActiveEnvironment(o);let a=o.filter(l=>l.preRequest?.enabled).map(l=>({script:l.preRequest?.script??"",source:"collection",sourceId:l.id,type:"pre-request"}));return i?.preRequest.enabled&&a.push({script:i.preRequest.script??"",source:"window",sourceId:i.windowId,type:"pre-request"}),i?.authorization&&AE(i.authorization)&&a.push({script:"",source:"window",sourceId:i.windowId,type:"auth"}),this.store.dispatch(new uE({windowId:e,entries:a.map(l=>({source:l.source,sourceId:l.sourceId,type:l.type}))})),this.applyPrerequestTransforms(r,i,a)})}applyPrerequestTransforms(){return G(this,arguments,function*(e=this.getDefaultTransformResult(),i,r){for(let o of r)try{switch(this.store.dispatch(new fu({windowId:i.windowId,entry:{source:o.source,sourceId:o.sourceId,type:o.type,state:"active"}})),o.type){case"pre-request":{e=yield this.getPrerequestScriptResultForScript(i.windowId,o.script,e);break}case"auth":{let s=yield sz[i.authorization.type].getProviderClass?.();if(s){let a=new s(h=>this.environmentService.hydrate(h,{activeEnvironment:e?.environment})),l=i.authorization.data,c=yield a.execute({data:l}),u=Object.entries(c.headers).map(([h,p])=>({key:h,value:p,enabled:!0}));e.combinedHeaders=[...e?.combinedHeaders??[],...u]}break}}this.store.dispatch(new fu({windowId:i.windowId,entry:{source:o.source,sourceId:o.sourceId,type:o.type,state:"done"}}))}catch(s){throw this.store.dispatch(new fu({windowId:i.windowId,entry:{source:o.source,sourceId:o.sourceId,type:o.type,state:"error"}})),s}return e})}getPostRequestTransformedDataForScript(e,i,r,o,s){return G(this,null,function*(){let a=yield this.getWindowState(e);if(!a)return s;let l=(a.query.selectedOperation??"").trim(),c=this.environmentService.mergeWithActiveEnvironment(s?.environment??{}),{query:u,headers:h,variables:p,extensions:f,url:_}=this.hydrateAllHydratables(a,s);try{let w=yield this.preRequestService.executeScript(i,{environment:c,headers:h,operationName:l,query:u,variables:p,url:_,requestExtensions:f,requestType:r,response:o});return k(k({},s),w)}catch(w){return Ne.error(w),this.notifyService.error(`Error executing post-request script: ${w}`),s}})}getPostRequestTransformedData(s,a,l){return G(this,arguments,function*(e,i,r,o=this.getDefaultTransformResult()){let c=yield this.getWindowState(e);if(!c)return o;let p=(yield this.getWindowParentCollections(c.windowId)).filter(f=>f.postRequest?.enabled).map(f=>({script:f.postRequest?.script??"",source:"collection",sourceId:f.id,type:"post-request"}));return c?.postRequest.enabled&&p.push({script:c.postRequest.script??"",source:"window",sourceId:c.windowId,type:"post-request"}),this.store.dispatch(new dE({windowId:e,entries:p.map(f=>({source:f.source,sourceId:f.sourceId,type:f.type}))})),this.applyPostRequestTransforms(o,c,i,r,p)})}applyPostRequestTransforms(){return G(this,arguments,function*(e=this.getDefaultTransformResult(),i,r,o,s){for(let a of s)try{switch(this.store.dispatch(new fu({windowId:i.windowId,entry:{source:a.source,sourceId:a.sourceId,type:a.type,state:"active"}})),a.type){case"post-request":{e=yield this.getPostRequestTransformedDataForScript(i.windowId,a.script,r,o,e);break}}r!==k1.SUBSCRIPTION&&this.store.dispatch(new fu({windowId:i.windowId,entry:{source:a.source,sourceId:a.sourceId,type:a.type,state:"done"}}))}catch(l){throw this.store.dispatch(new fu({windowId:i.windowId,entry:{source:a.source,sourceId:a.sourceId,type:a.type,state:"error"}})),l}return e})}hydrateAllHydratables(e,i){let r=i.environment,o=this.environmentService.hydrate(e.query.url,{activeEnvironment:r}),s=this.environmentService.hydrate(e.query.subscriptionUrl,{activeEnvironment:r}),a=this.environmentService.hydrate((e.query.query??"").trim(),{activeEnvironment:r}),l=this.environmentService.hydrate(e.variables.variables,{activeEnvironment:r}),c=this.environmentService.hydrate(e.query.requestExtensions??"",{activeEnvironment:r}),u=this.environmentService.hydrate(e.query.subscriptionConnectionParams,{activeEnvironment:r}),h=this.environmentService.hydrate(e.query.requestHandlerAdditionalParams??"",{activeEnvironment:r}),p=this.environmentService.hydrateHeaders(i.combinedHeaders,{activeEnvironment:r});return{url:o,subscriptionUrl:s,query:a,variables:l,extensions:c,headers:p,subscriptionConnectionParams:u,requestHandlerAdditionalParams:h}}getRequestHandlerId(e,i){let r=e.query.requestHandlerId??uu;return i&&!e.query.subscriptionUseDefaultRequestHandler?e.query.subscriptionRequestHandlerId??wc:r}getRequestHandler(e,i){return G(this,null,function*(){let r=this.getRequestHandlerId(e,i);return this.requestHandlerRegistryService.getHandlerData(r).getHandler()})}getWindowParentCollections$(e){return this.store.pipe(ni(w7(e)))}getWindowParentCollections(e){return G(this,null,function*(){return ps(this.getWindowParentCollections$(e))})}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=oe({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Hh=(n,t=window.location.href)=>{try{let e=new URL(t),i=e.searchParams.get(n);return i?(e.searchParams.delete(n),window.history.replaceState({},"",e.href),i):void 0}catch(e){Ne.error("Error consuming query param",e)}};var T1=(()=>{class n{constructor(){this.apiService=R(Oc),this.accountService=R(al),this.windowService=R(Go),this.notifyService=R(ii)}checkForShareUrl(e=window.location.href){Ne.log("Checking for shared url",e);let i=this.getShareDetailsFromUrl(e);i&&this.handleShareDetails(i)}copyQueryShareUrl(e){Q_(this.apiService.getQueryShareUrl(e)),this.notifyService.info("Copied share url to clipboard")}sharePublicQueryAndCopyUrl(e){return G(this,null,function*(){try{let i=yield this.apiService.sharePublicQuery(e),r=`${Yn.urlConfig.docs}/shared?id=${i.shareId}`;Q_(r),this.notifyService.info(`Public share link copied to clipboard: ${r}`)}catch(i){Ne.error(i),this.notifyService.error("Could not create public share link")}})}getShareDetailsFromUrl(e){let i=Hh("q",e);if(i)return{type:"remote-query",queryId:i};let r=Hh("query",e);if(r)return{type:"window-data",query:r,variables:Hh("variables",e),endpoint:Hh("endpoint",e)}}handleShareDetails(e){return G(this,null,function*(){try{switch(e.type){case"window-data":{let{query:i,variables:r,endpoint:o}=e;return this.windowService.importWindowData(q(k({},this.windowService.getEmptyWindowState()),{query:i,variables:r??"{}",apiUrl:o??"",windowName:"From url"}))}case"remote-query":{if(!(yield this.accountService.getUser()))return;let r=yield this.apiService.getQuery(e.queryId);if(!r)throw new Error("Query not found");return this.windowService.loadQueryFromCollection(r.query,r.collectionId,r.query.id??e.queryId)}}}catch(i){Ne.error(i),this.notifyService.error("Error loading shared details")}})}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=oe({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Tw=(()=>{class n{constructor(){this.windowService=R(Go),this.collectionService=R(cl),this.gqlService=R(ll),this.environmentService=R(na),this.notifyService=R(ii)}handleImportedFile(e){return G(this,null,function*(){let i=yield Lf(e);try{let r=this.parseAsJson(i);switch(r.type){case"window":if(r.version===1)return this.windowService.importWindowData(r,{fixedTitle:!0});throw new Error("Invalid Altair window file.");case"collection":if(r.version===1)return this.collectionService.importCollectionData(r);throw new Error("Invalid Altair collection file.");case"environment":if(r.version===1)return this.environmentService.importEnvironmentData(r);throw new Error("Invalid Altair environment file.");default:throw new Error("Invalid Altair file.")}}catch(r){if((yield this.trySdlImport(i))||(yield this.tryQueryImport(i)))return;throw Ne.log("Invalid Altair window file.",r),this.notifyService.error("Invalid Altair file."),r}})}parseAsJson(e){try{return JSON.parse(e)}catch{return JSON.parse(decodeURIComponent(e))}}trySdlImport(e){return G(this,null,function*(){try{let i=this.gqlService.sdlToSchema(e);return yield this.windowService.importWindowData(q(k({},this.windowService.getEmptyWindowState()),{gqlSchema:i})),this.notifyService.success("Successfully imported GraphQL schema. Open the docs section to view it."),!0}catch{return!1}})}tryQueryImport(e){return G(this,null,function*(){let i=this.gqlService.getOperations(e);return i&&i.length?(yield this.windowService.importWindowData(q(k({},this.windowService.getEmptyWindowState()),{query:e})),!0):!1})}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=oe({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Ow=(()=>{class n{constructor(){this.banners={},this.bannersSubject=new an([])}getBanners(){return this.bannersSubject.asObservable()}addBanner(e,i){this.banners[e]=q(k({},i),{id:e,enabled:!0}),this.updateBanners()}removeBanner(e){this.banners[e]?.onDismiss?.(),delete this.banners[e],this.updateBanners()}clearBanners(){this.banners={},this.updateBanners()}enableBanner(e){this.updateBannerStatus(e,!0)}disableBanner(e){this.updateBannerStatus(e,!1)}updateBannerStatus(e,i){let r=this.banners[e];r&&(r.enabled=i,this.updateBanners())}updateBanners(){this.bannersSubject.next(Object.values(this.banners))}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=oe({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Ew=(()=>{class n{constructor(){this.windowService=R(Go)}connect(){let e=window.browser||window.chrome;id&&(e.runtime.onMessage.addListener((i,r,o)=>{switch(Ne.log("Message received in webextension service",i),i.type){case"import-window":{this.windowService.importWindowData(i.window);return}case"ping":{sH({type:"pong"});return}default:{Ne.log("Unknown message type received",i);return}}}),sH({type:"ready"}))}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=oe({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Xft=Bv;function Kft(n){return!!n[Xft]}function PX(n){return typeof n=="function"}var Jft=Symbol("__destroy"),bwe=Symbol("__decoratorApplied");function Swe(n){return typeof n=="string"?Symbol(`__destroy__${n}`):Jft}function e0t(n){n.prototype[bwe]=!0}function t0t(n){if(n0t(n.constructor))throw new Error("untilDestroyed operator cannot be used inside directives or components or providers that are not decorated with UntilDestroy decorator")}function xwe(n,t){n[t]||(n[t]=new fe)}function kwe(n,t){n[t]&&(n[t].next(),n[t].complete(),n[t]=null)}function n0t(n){return!(bwe in n.prototype)}function Twe(n){n&&PX(n.unsubscribe)&&n.unsubscribe()}function i0t(n){Array.isArray(n)&&n.forEach(Twe)}function Owe(n,t){return function(){var e;if(n&&n.call(this),kwe(this,Swe()),t.arrayName)return i0t(this[t.arrayName]);if(t.checkProperties)for(let i in this)!((e=t.blackList)===null||e===void 0)&&e.includes(i)||Twe(this[i])}}function r0t(n,t){n.prototype.ngOnDestroy=Owe(n.prototype.ngOnDestroy,t)}function o0t(n,t){let e=n.\u0275pipe;e.onDestroy=Owe(e.onDestroy,t)}function D0(n={}){return t=>{Kft(t)?o0t(t,n):r0t(t,n),e0t(t)}}function s0t(n,t,e){let i=n[t];if(PX(i)===!1)throw new Error(`${n.constructor.name} is using untilDestroyed but doesn't implement ${t}`);xwe(n,e),n[t]=function(){PX(i)&&i.apply(this,arguments),kwe(this,e),n[t]=i}}function Fc(n,t){return e=>{let i=Swe(t);return typeof t=="string"?s0t(n,t,i):(t0t(n),xwe(n,i)),e.pipe(se(n[i]))}}var a0t=["*"];var Ewe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]];var Mwe=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z",key:"c3ski4"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]];var Dwe=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]];var Iwe=[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"M11 4h4",key:"6d7r33"}],["path",{d:"M11 8h7",key:"djye34"}],["path",{d:"M11 12h10",key:"1438ji"}]];var zwe=[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"M11 4h10",key:"1w87gc"}],["path",{d:"M11 8h7",key:"djye34"}],["path",{d:"M11 12h4",key:"q8tih4"}]];var Awe=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]];var Pwe=[["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["path",{d:"M10 21V8a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-5a1 1 0 0 0-1-1H3",key:"1fpvtg"}]];var Rwe=[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20",key:"t4utmx"}]];var Nwe=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]];var Lwe=[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]];var Fwe=[["rect",{width:"20",height:"14",x:"2",y:"7",rx:"2",ry:"2",key:"eto64e"}],["path",{d:"M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"zwj3tp"}]];var Vwe=[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]];var Bwe=[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]];var Hwe=[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]];var jwe=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]];var $we=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]];var qwe=[["path",{d:"M10.1 2.18a9.93 9.93 0 0 1 3.8 0",key:"1qdqn0"}],["path",{d:"M17.6 3.71a9.95 9.95 0 0 1 2.69 2.7",key:"1bq7p6"}],["path",{d:"M21.82 10.1a9.93 9.93 0 0 1 0 3.8",key:"1rlaqf"}],["path",{d:"M20.29 17.6a9.95 9.95 0 0 1-2.7 2.69",key:"1xk03u"}],["path",{d:"M13.9 21.82a9.94 9.94 0 0 1-3.8 0",key:"l7re25"}],["path",{d:"M6.4 20.29a9.95 9.95 0 0 1-2.69-2.7",key:"1v18p6"}],["path",{d:"M2.18 13.9a9.93 9.93 0 0 1 0-3.8",key:"xdo6bj"}],["path",{d:"M3.71 6.4a9.95 9.95 0 0 1 2.7-2.69",key:"1jjmaz"}]];var Uwe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]];var Qwe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]];var Wwe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]];var Ywe=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]];var Gwe=[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]];var Zwe=[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]];var Xwe=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]];var Kwe=[["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"9",y:"9",width:"6",height:"6",key:"o3kz5p"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]];var Jwe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]];var ebe=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]];var tbe=[["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}],["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["line",{x1:"10",x2:"21",y1:"14",y2:"3",key:"18c3s4"}]],nbe=[["path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24",key:"1jxqfv"}],["path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",key:"9wicm4"}],["path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61",key:"1jreej"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]],ibe=[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]];var rbe=[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["path",{d:"M12 18v-6",key:"17g6i2"}],["path",{d:"m9 15 3 3 3-3",key:"1npd3o"}]];var obe=[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["line",{x1:"12",x2:"12",y1:"18",y2:"12",key:"1tsf04"}],["line",{x1:"9",x2:"15",y1:"15",y2:"15",key:"110plj"}]];var sbe=[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}]];var abe=[["path",{d:"M10 2v7.527a2 2 0 0 1-.211.896L4.72 20.55a1 1 0 0 0 .9 1.45h12.76a1 1 0 0 0 .9-1.45l-5.069-10.127A2 2 0 0 1 14 9.527V2",key:"pzvekw"}],["path",{d:"M8.5 2h7",key:"csnxdl"}],["path",{d:"M7 16h10",key:"wp8him"}]];var lbe=[["path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z",key:"1fr9dc"}],["circle",{cx:"12",cy:"13",r:"1",key:"49l61u"}]];var cbe=[["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]];var ube=[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]];var dbe=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]];var hbe=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]];var pbe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]];var fbe=[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]];var mbe=[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]];var gbe=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],ybe=[["path",{d:"m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"y5dka4"}],["polyline",{points:"9 22 9 12 15 12 15 22",key:"e2us08"}]];var vbe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]];var _be=[["line",{x1:"8",x2:"21",y1:"6",y2:"6",key:"7ey8pc"}],["line",{x1:"8",x2:"21",y1:"12",y2:"12",key:"rjfblc"}],["line",{x1:"8",x2:"21",y1:"18",y2:"18",key:"c3b1m8"}],["line",{x1:"3",x2:"3.01",y1:"6",y2:"6",key:"1g7gq3"}],["line",{x1:"3",x2:"3.01",y1:"12",y2:"12",key:"1pjlvk"}],["line",{x1:"3",x2:"3.01",y1:"18",y2:"18",key:"28t2mc"}]];var Cbe=[["line",{x1:"12",x2:"12",y1:"2",y2:"6",key:"gza1u7"}],["line",{x1:"12",x2:"12",y1:"18",y2:"22",key:"1qhbu9"}],["line",{x1:"4.93",x2:"7.76",y1:"4.93",y2:"7.76",key:"xae44r"}],["line",{x1:"16.24",x2:"19.07",y1:"16.24",y2:"19.07",key:"bxnmvf"}],["line",{x1:"2",x2:"6",y1:"12",y2:"12",key:"89khin"}],["line",{x1:"18",x2:"22",y1:"12",y2:"12",key:"pb8tfm"}],["line",{x1:"4.93",x2:"7.76",y1:"19.07",y2:"16.24",key:"1uxjnu"}],["line",{x1:"16.24",x2:"19.07",y1:"7.76",y2:"4.93",key:"6duxfx"}]];var wbe=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],bbe=[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]],Sbe=[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]];var xbe=[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]];var kbe=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],Tbe=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]];var Obe=[["path",{d:"M18.37 2.63 14 7l-1.59-1.59a2 2 0 0 0-2.82 0L8 7l9 9 1.59-1.59a2 2 0 0 0 0-2.82L17 10l4.37-4.37a2.12 2.12 0 1 0-3-3Z",key:"m6k5sh"}],["path",{d:"M9 8c-2 3-4 3.5-7 4l8 10c2-1 6-5 6-7",key:"arzq70"}],["path",{d:"M14.5 17.5 4.5 15",key:"s7fvrz"}]];var Ebe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["line",{x1:"9",x2:"9",y1:"3",y2:"21",key:"13tij5"}]];var Mbe=[["path",{d:"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48",key:"1u3ebp"}]];var Dbe=[["path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1qinfi"}],["path",{d:"M18.5 2.5a2.12 2.12 0 0 1 3 3L12 15l-4 1 1-4Z",key:"w2jsv5"}]];var Ibe=[["path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z",key:"5qss01"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]];var zbe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]],Abe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]];var Pbe=[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]];var Rbe=[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}]];var Nbe=[["path",{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z",key:"1owoqh"}],["polyline",{points:"17 21 17 13 7 13 7 21",key:"1md35c"}],["polyline",{points:"7 3 7 8 15 8",key:"8nz8an"}]];var Lbe=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]];var Fbe=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]];var Vbe=[["path",{d:"m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z",key:"17u4zn"}],["path",{d:"M5 3v4",key:"bklmnn"}],["path",{d:"M19 17v4",key:"iiml17"}],["path",{d:"M3 5h4",key:"nem4j1"}],["path",{d:"M17 19h4",key:"lbex7p"}]];var Bbe=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]];var Hbe=[["path",{d:"M12 2H2v10l9.29 9.29c.94.94 2.48.94 3.42 0l6.58-6.58c.94-.94.94-2.48 0-3.42L12 2Z",key:"14b2ls"}],["path",{d:"M7 7h.01",key:"7u93v4"}]];var jbe=[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]];var $be=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]];var qbe=[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]];var Ube=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["polyline",{points:"16 11 18 13 22 9",key:"1pwet4"}]];var Qbe=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]];var Wbe=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]];var Ybe=[["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["polyline",{points:"12 10 12 12 13 13",key:"19dquz"}],["path",{d:"m16.13 7.66-.81-4.05a2 2 0 0 0-2-1.61h-2.68a2 2 0 0 0-2 1.61l-.78 4.05",key:"18k57s"}],["path",{d:"m7.88 16.36.8 4a2 2 0 0 0 2 1.61h2.72a2 2 0 0 0 2-1.61l.81-4.05",key:"16ny36"}]];var Gbe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]];var Zbe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],Xbe=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]];var Kbe=[["polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2",key:"45s27k"}]];var Mw={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"},RX=new Re("LucideIcons",{factory:()=>new Dw({})}),Dw=class{constructor(t){this.icons=t}getIcon(t){return this.hasIcon(t)?this.icons[t]:null}hasIcon(t){return typeof this.icons=="object"&&t in this.icons}},l0t=(()=>{class n{constructor(){this.color=Mw.stroke,this.size=Mw.width,this.strokeWidth=Mw["stroke-width"],this.absoluteStrokeWidth=!1}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=oe({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function c0t(n,t=3){return parseFloat(n.toFixed(t)).toString(10)}var Jbe=(()=>{class n{constructor(e,i,r,o,s){this.elem=e,this.renderer=i,this.changeDetector=r,this.iconProviders=o,this.iconConfig=s,this.absoluteStrokeWidth=!1,this.defaultSize=Mw.height}set img(e){this.name=e}get size(){return this._size??this.iconConfig.size}set size(e){e?this._size=this.parseNumber(e):delete this._size}get strokeWidth(){return this._strokeWidth??this.iconConfig.strokeWidth}set strokeWidth(e){e?this._strokeWidth=this.parseNumber(e):delete this._strokeWidth}ngOnChanges(e){if(this.color=this.color??this.iconConfig.color,this.size=this.parseNumber(this.size??this.iconConfig.size),this.strokeWidth=this.parseNumber(this.strokeWidth??this.iconConfig.strokeWidth),this.absoluteStrokeWidth=this.absoluteStrokeWidth??this.iconConfig.absoluteStrokeWidth,e.name||e.img){let i=e.img?.currentValue??e.name?.currentValue;if(typeof i=="string"){let r=this.getIcon(this.toPascalCase(i));if(r)this.replaceElement(r);else throw new Error(`The "${i}" icon has not been provided by any available icon providers.`)}else if(Array.isArray(i))this.replaceElement(i);else throw new Error("No icon name or image has been provided.")}this.changeDetector.markForCheck()}replaceElement(e){let i=q(k({},Mw),{width:this.size,height:this.size,stroke:this.color??this.iconConfig.color,"stroke-width":this.absoluteStrokeWidth?c0t(this.strokeWidth/(this.size/this.defaultSize)):this.strokeWidth.toString(10)}),r=this.createElement(["svg",i,e]);r.classList.add("lucide"),typeof this.name=="string"&&r.classList.add(`lucide-${this.name.replace("_","-")}`),this.class&&r.classList.add(...this.class.split(/ /).map(s=>s.trim()).filter(s=>s.length>0));let o=this.elem.nativeElement.childNodes;for(let s of o)this.renderer.removeChild(this.elem.nativeElement,s);this.renderer.appendChild(this.elem.nativeElement,r)}toPascalCase(e){return e.replace(/(\w)([a-z0-9]*)(_|-|\s*)/g,(i,r,o)=>r.toUpperCase()+o.toLowerCase())}parseNumber(e){if(typeof e=="string"){let i=parseInt(e,10);if(isNaN(i))throw new Error(`${e} is not numeric.`);return i}return e}getIcon(e){for(let i of Array.isArray(this.iconProviders)?this.iconProviders:[this.iconProviders])if(i.hasIcon(e))return i.getIcon(e);return null}createElement([e,i,r=[]]){let o=this.renderer.createElement(e,"http://www.w3.org/2000/svg");return Object.keys(i).forEach(s=>{let a=typeof i[s]=="string"?i[s]:i[s].toString(10);this.renderer.setAttribute(o,s,a)}),r.length&&r.forEach(s=>{let a=this.createElement(s);this.renderer.appendChild(o,a)}),o}}return n.\u0275fac=function(e){return new(e||n)(I(tt),I(on),I(Tt),I(RX),I(l0t))},n.\u0275cmp=re({type:n,selectors:[["lucide-angular"],["lucide-icon"],["i-lucide"],["span-lucide"]],inputs:{class:"class",name:"name",color:"color",absoluteStrokeWidth:"absoluteStrokeWidth",img:"img",size:"size",strokeWidth:"strokeWidth"},standalone:!1,features:[ft],ngContentSelectors:a0t,decls:1,vars:0,template:function(e,i){e&1&&(Gt(),At(0))},encapsulation:2}),n})(),NX=class{constructor(t){this.icons=t}},u0t=n=>new Dw(n??{}),LX=(()=>{class n{static pick(e){return{ngModule:n,providers:[{provide:RX,multi:!0,useValue:new Dw(e)},{provide:RX,multi:!0,useFactory:u0t,deps:[[new Gc,NX]]}]}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=He({type:n}),n.\u0275inj=Be({imports:[[]]}),n})();function h0t(n,t){if(n&1&&(d(0,`
308
+ `);try{let a=yield s.exports.end;Ne.log("interpreter result:",a)}catch(a){throw new zg(a)}return o.__toSetActiveEnvironment&&(yield this.updateActiveEnvironment(o.__toSetActiveEnvironment)),{environment:o.environment,requestScriptLogs:o.requestScriptLogs??[]}})}getStorageItem(e){return G(this,null,function*(){return(yield ps(this.store.select(r=>r.settings["script.allowedLocalStorageKeys"]).pipe(Ct(1))))?.includes(e)?(this.notifyService.warning(`Accessing local storage key "${e}" (read-only) from request script.`,"Request script"),localStorage.getItem(e)):this.dbService.getItem(`${wwe}:${e}`).pipe(Ct(1)).toPromise()})}setStorageItem(e,i){return this.dbService.setItem(`${wwe}:${e}`,i).pipe(Ct(1)).toPromise()}updateActiveEnvironment(e){return G(this,null,function*(){let i=yield this.store.select(I8).pipe(Ct(1)).toPromise();if(i)try{let r=k(k({},JSON.parse(i.variablesJson)),e),o=i.id;if(!o)throw new zg("Invalid active environment state ID");this.store.dispatch(new E3({id:o,value:JSON.stringify(r,null,2)})),this.notifyService.info(`Updated active environment variables: ${Object.keys(e).join(", ")}.`,"Request script")}catch(r){this.notifyService.errorWithError(r,"Could not update active environment variables.","Request script")}else this.notifyService.warning("No active environment selected. Cannot update environment variables","Request script")})}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=oe({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var sz={[yh.NONE]:{copy:"AUTHORIZATION_PROVIDER_NONE"},[yh.BASIC]:{copy:"AUTHORIZATION_PROVIDER_BASIC",getProviderClass(){return G(this,null,function*(){return(yield import("./chunk-FPFH3SGP.js")).default})}},[yh.BEARER]:{copy:"AUTHORIZATION_PROVIDER_BEARER",getProviderClass(){return G(this,null,function*(){return(yield import("./chunk-SMDHZLZM.js")).default})}},[yh.API_KEY]:{copy:"AUTHORIZATION_PROVIDER_API_KEY",getProviderClass(){return G(this,null,function*(){return(yield import("./chunk-FG6ERPTD.js")).default})}},[yh.OAUTH2]:{copy:"AUTHORIZATION_PROVIDER_OAUTH2",getProviderClass(){return G(this,null,function*(){return(yield import("./chunk-SYGR42K4.js")).default})}}};var kw=(()=>{class n{constructor(){this.notifyService=R(ii),this.environmentService=R(na),this.preRequestService=R(xw),this.requestHandlerRegistryService=R(x1),this.store=R(mn)}getWindowState$(e){return this.store.pipe(ni(xc(e)))}getWindowState(e){return G(this,null,function*(){return this.getWindowState$(e).pipe(Ct(1)).toPromise()})}getDefaultTransformResult(){return{combinedHeaders:[],requestScriptLogs:[],environment:this.environmentService.getActiveEnvironment()}}getPrerequestScriptResultForScript(e,i,r){return G(this,null,function*(){let o=yield this.getWindowState(e);if(!o)return r;let s=(o.query.selectedOperation??"").trim(),{query:a,variables:l,headers:c,extensions:u,url:h}=this.hydrateAllHydratables(o,r),p=this.environmentService.mergeWithActiveEnvironment(r?.environment??{});try{let f=yield this.preRequestService.executeScript(i,{environment:p,headers:c,operationName:s,query:a,variables:l,url:h,requestExtensions:u});return k(k({},r),f)}catch(f){return Ne.error(f),this.notifyService.error(`Error executing pre-request script: ${f}`,`[${o.layout.title}]`,{}),r}})}getCombinedHeaders(e,i){return[...i.map(o=>o.headers||[]).flat(),...e.headers]}getPrerequestTransformedData(e){return G(this,null,function*(){let i=yield this.getWindowState(e),r=this.getDefaultTransformResult();if(!i)return r;let o=yield this.getWindowParentCollections(i.windowId);r.combinedHeaders=this.getCombinedHeaders(i,o),r.environment=this.environmentService.getActiveEnvironment(o);let a=o.filter(l=>l.preRequest?.enabled).map(l=>({script:l.preRequest?.script??"",source:"collection",sourceId:l.id,type:"pre-request"}));return i?.preRequest.enabled&&a.push({script:i.preRequest.script??"",source:"window",sourceId:i.windowId,type:"pre-request"}),i?.authorization&&AE(i.authorization)&&a.push({script:"",source:"window",sourceId:i.windowId,type:"auth"}),this.store.dispatch(new uE({windowId:e,entries:a.map(l=>({source:l.source,sourceId:l.sourceId,type:l.type}))})),this.applyPrerequestTransforms(r,i,a)})}applyPrerequestTransforms(){return G(this,arguments,function*(e=this.getDefaultTransformResult(),i,r){for(let o of r)try{switch(this.store.dispatch(new fu({windowId:i.windowId,entry:{source:o.source,sourceId:o.sourceId,type:o.type,state:"active"}})),o.type){case"pre-request":{e=yield this.getPrerequestScriptResultForScript(i.windowId,o.script,e);break}case"auth":{let s=yield sz[i.authorization.type].getProviderClass?.();if(s){let a=new s(h=>this.environmentService.hydrate(h,{activeEnvironment:e?.environment})),l=i.authorization.data,c=yield a.execute({data:l}),u=Object.entries(c.headers).map(([h,p])=>({key:h,value:p,enabled:!0}));e.combinedHeaders=[...e?.combinedHeaders??[],...u]}break}}this.store.dispatch(new fu({windowId:i.windowId,entry:{source:o.source,sourceId:o.sourceId,type:o.type,state:"done"}}))}catch(s){throw this.store.dispatch(new fu({windowId:i.windowId,entry:{source:o.source,sourceId:o.sourceId,type:o.type,state:"error"}})),s}return e})}getPostRequestTransformedDataForScript(e,i,r,o,s){return G(this,null,function*(){let a=yield this.getWindowState(e);if(!a)return s;let l=(a.query.selectedOperation??"").trim(),c=this.environmentService.mergeWithActiveEnvironment(s?.environment??{}),{query:u,headers:h,variables:p,extensions:f,url:_}=this.hydrateAllHydratables(a,s);try{let w=yield this.preRequestService.executeScript(i,{environment:c,headers:h,operationName:l,query:u,variables:p,url:_,requestExtensions:f,requestType:r,response:o});return k(k({},s),w)}catch(w){return Ne.error(w),this.notifyService.error(`Error executing post-request script: ${w}`),s}})}getPostRequestTransformedData(s,a,l){return G(this,arguments,function*(e,i,r,o=this.getDefaultTransformResult()){let c=yield this.getWindowState(e);if(!c)return o;let p=(yield this.getWindowParentCollections(c.windowId)).filter(f=>f.postRequest?.enabled).map(f=>({script:f.postRequest?.script??"",source:"collection",sourceId:f.id,type:"post-request"}));return c?.postRequest.enabled&&p.push({script:c.postRequest.script??"",source:"window",sourceId:c.windowId,type:"post-request"}),this.store.dispatch(new dE({windowId:e,entries:p.map(f=>({source:f.source,sourceId:f.sourceId,type:f.type}))})),this.applyPostRequestTransforms(o,c,i,r,p)})}applyPostRequestTransforms(){return G(this,arguments,function*(e=this.getDefaultTransformResult(),i,r,o,s){for(let a of s)try{switch(this.store.dispatch(new fu({windowId:i.windowId,entry:{source:a.source,sourceId:a.sourceId,type:a.type,state:"active"}})),a.type){case"post-request":{e=yield this.getPostRequestTransformedDataForScript(i.windowId,a.script,r,o,e);break}}r!==k1.SUBSCRIPTION&&this.store.dispatch(new fu({windowId:i.windowId,entry:{source:a.source,sourceId:a.sourceId,type:a.type,state:"done"}}))}catch(l){throw this.store.dispatch(new fu({windowId:i.windowId,entry:{source:a.source,sourceId:a.sourceId,type:a.type,state:"error"}})),l}return e})}hydrateAllHydratables(e,i){let r=i.environment,o=this.environmentService.hydrate(e.query.url,{activeEnvironment:r}),s=this.environmentService.hydrate(e.query.subscriptionUrl,{activeEnvironment:r}),a=this.environmentService.hydrate((e.query.query??"").trim(),{activeEnvironment:r}),l=this.environmentService.hydrate(e.variables.variables,{activeEnvironment:r}),c=this.environmentService.hydrate(e.query.requestExtensions??"",{activeEnvironment:r}),u=this.environmentService.hydrate(e.query.subscriptionConnectionParams,{activeEnvironment:r}),h=this.environmentService.hydrate(e.query.requestHandlerAdditionalParams??"",{activeEnvironment:r}),p=this.environmentService.hydrateHeaders(i.combinedHeaders,{activeEnvironment:r});return{url:o,subscriptionUrl:s,query:a,variables:l,extensions:c,headers:p,subscriptionConnectionParams:u,requestHandlerAdditionalParams:h}}getRequestHandlerId(e,i){let r=e.query.requestHandlerId??uu;return i&&!e.query.subscriptionUseDefaultRequestHandler?e.query.subscriptionRequestHandlerId??wc:r}getRequestHandler(e,i){return G(this,null,function*(){let r=this.getRequestHandlerId(e,i);return this.requestHandlerRegistryService.getHandlerData(r).getHandler()})}getWindowParentCollections$(e){return this.store.pipe(ni(w7(e)))}getWindowParentCollections(e){return G(this,null,function*(){return ps(this.getWindowParentCollections$(e))})}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=oe({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Hh=(n,t=window.location.href)=>{try{let e=new URL(t),i=e.searchParams.get(n);return i?(e.searchParams.delete(n),window.history.replaceState({},"",e.href),i):void 0}catch(e){Ne.error("Error consuming query param",e)}};var T1=(()=>{class n{constructor(){this.apiService=R(Oc),this.accountService=R(al),this.windowService=R(Go),this.notifyService=R(ii)}checkForShareUrl(e=window.location.href){Ne.log("Checking for shared url",e);let i=this.getShareDetailsFromUrl(e);i&&this.handleShareDetails(i)}copyQueryShareUrl(e){Q_(this.apiService.getQueryShareUrl(e)),this.notifyService.info("Copied share url to clipboard")}sharePublicQueryAndCopyUrl(e){return G(this,null,function*(){try{let i=yield this.apiService.sharePublicQuery(e),r=`${Yn.urlConfig.docs}/shared?id=${i.shareId}`;Q_(r),this.notifyService.info(`Public share link copied to clipboard: ${r}`)}catch(i){Ne.error(i),this.notifyService.error("Could not create public share link")}})}getShareDetailsFromUrl(e){let i=Hh("q",e);if(i)return{type:"remote-query",queryId:i};let r=Hh("query",e);if(r)return{type:"window-data",query:r,variables:Hh("variables",e),endpoint:Hh("endpoint",e)}}handleShareDetails(e){return G(this,null,function*(){try{switch(e.type){case"window-data":{let{query:i,variables:r,endpoint:o}=e;return this.windowService.importWindowData(q(k({},this.windowService.getEmptyWindowState()),{query:i,variables:r??"{}",apiUrl:o??"",windowName:"From url"}))}case"remote-query":{if(!(yield this.accountService.getUser()))return;let r=yield this.apiService.getQuery(e.queryId);if(!r)throw new Error("Query not found");return this.windowService.loadQueryFromCollection(r.query,r.collectionId,r.query.id??e.queryId)}}}catch(i){Ne.error(i),this.notifyService.error("Error loading shared details")}})}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=oe({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Tw=(()=>{class n{constructor(){this.windowService=R(Go),this.collectionService=R(cl),this.gqlService=R(ll),this.environmentService=R(na),this.notifyService=R(ii)}handleImportedFile(e){return G(this,null,function*(){let i=yield Lf(e);try{let r=this.parseAsJson(i);switch(r.type){case"window":if(r.version===1)return this.windowService.importWindowData(r,{fixedTitle:!0});throw new Error("Invalid Altair window file.");case"collection":if(r.version===1)return this.collectionService.importCollectionData(r);throw new Error("Invalid Altair collection file.");case"environment":if(r.version===1)return this.environmentService.importEnvironmentData(r);throw new Error("Invalid Altair environment file.");default:throw new Error("Invalid Altair file.")}}catch(r){if((yield this.trySdlImport(i))||(yield this.tryQueryImport(i)))return;throw Ne.log("Invalid Altair window file.",r),this.notifyService.error("Invalid Altair file."),r}})}parseAsJson(e){try{return JSON.parse(e)}catch{return JSON.parse(decodeURIComponent(e))}}trySdlImport(e){return G(this,null,function*(){try{let i=this.gqlService.sdlToSchema(e);return yield this.windowService.importWindowData(q(k({},this.windowService.getEmptyWindowState()),{gqlSchema:i})),this.notifyService.success("Successfully imported GraphQL schema. Open the docs section to view it."),!0}catch{return!1}})}tryQueryImport(e){return G(this,null,function*(){let i=this.gqlService.getOperations(e);return i&&i.length?(yield this.windowService.importWindowData(q(k({},this.windowService.getEmptyWindowState()),{query:e})),!0):!1})}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=oe({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Ow=(()=>{class n{constructor(){this.banners={},this.bannersSubject=new an([])}getBanners(){return this.bannersSubject.asObservable()}addBanner(e,i){this.banners[e]=q(k({},i),{id:e,enabled:!0}),this.updateBanners()}removeBanner(e){this.banners[e]?.onDismiss?.(),delete this.banners[e],this.updateBanners()}clearBanners(){this.banners={},this.updateBanners()}enableBanner(e){this.updateBannerStatus(e,!0)}disableBanner(e){this.updateBannerStatus(e,!1)}updateBannerStatus(e,i){let r=this.banners[e];r&&(r.enabled=i,this.updateBanners())}updateBanners(){this.bannersSubject.next(Object.values(this.banners))}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=oe({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Ew=(()=>{class n{constructor(){this.windowService=R(Go)}connect(){let e=window.browser||window.chrome;id&&(e.runtime.onMessage.addListener((i,r,o)=>{switch(Ne.log("Message received in webextension service",i),i.type){case"import-window":{this.windowService.importWindowData(i.window);return}case"ping":{sH({type:"pong"});return}default:{Ne.log("Unknown message type received",i);return}}}),sH({type:"ready"}))}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=oe({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Xft=Bv;function Kft(n){return!!n[Xft]}function PX(n){return typeof n=="function"}var Jft=Symbol("__destroy"),bwe=Symbol("__decoratorApplied");function Swe(n){return typeof n=="string"?Symbol(`__destroy__${n}`):Jft}function e0t(n){n.prototype[bwe]=!0}function t0t(n){if(n0t(n.constructor))throw new Error("untilDestroyed operator cannot be used inside directives or components or providers that are not decorated with UntilDestroy decorator")}function xwe(n,t){n[t]||(n[t]=new fe)}function kwe(n,t){n[t]&&(n[t].next(),n[t].complete(),n[t]=null)}function n0t(n){return!(bwe in n.prototype)}function Twe(n){n&&PX(n.unsubscribe)&&n.unsubscribe()}function i0t(n){Array.isArray(n)&&n.forEach(Twe)}function Owe(n,t){return function(){var e;if(n&&n.call(this),kwe(this,Swe()),t.arrayName)return i0t(this[t.arrayName]);if(t.checkProperties)for(let i in this)!((e=t.blackList)===null||e===void 0)&&e.includes(i)||Twe(this[i])}}function r0t(n,t){n.prototype.ngOnDestroy=Owe(n.prototype.ngOnDestroy,t)}function o0t(n,t){let e=n.\u0275pipe;e.onDestroy=Owe(e.onDestroy,t)}function D0(n={}){return t=>{Kft(t)?o0t(t,n):r0t(t,n),e0t(t)}}function s0t(n,t,e){let i=n[t];if(PX(i)===!1)throw new Error(`${n.constructor.name} is using untilDestroyed but doesn't implement ${t}`);xwe(n,e),n[t]=function(){PX(i)&&i.apply(this,arguments),kwe(this,e),n[t]=i}}function Fc(n,t){return e=>{let i=Swe(t);return typeof t=="string"?s0t(n,t,i):(t0t(n),xwe(n,i)),e.pipe(se(n[i]))}}var a0t=["*"];var Ewe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]];var Mwe=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z",key:"c3ski4"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]];var Dwe=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]];var Iwe=[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"M11 4h4",key:"6d7r33"}],["path",{d:"M11 8h7",key:"djye34"}],["path",{d:"M11 12h10",key:"1438ji"}]];var zwe=[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"M11 4h10",key:"1w87gc"}],["path",{d:"M11 8h7",key:"djye34"}],["path",{d:"M11 12h4",key:"q8tih4"}]];var Awe=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]];var Pwe=[["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["path",{d:"M10 21V8a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-5a1 1 0 0 0-1-1H3",key:"1fpvtg"}]];var Rwe=[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20",key:"t4utmx"}]];var Nwe=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]];var Lwe=[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]];var Fwe=[["rect",{width:"20",height:"14",x:"2",y:"7",rx:"2",ry:"2",key:"eto64e"}],["path",{d:"M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"zwj3tp"}]];var Vwe=[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]];var Bwe=[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]];var Hwe=[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]];var jwe=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]];var $we=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]];var qwe=[["path",{d:"M10.1 2.18a9.93 9.93 0 0 1 3.8 0",key:"1qdqn0"}],["path",{d:"M17.6 3.71a9.95 9.95 0 0 1 2.69 2.7",key:"1bq7p6"}],["path",{d:"M21.82 10.1a9.93 9.93 0 0 1 0 3.8",key:"1rlaqf"}],["path",{d:"M20.29 17.6a9.95 9.95 0 0 1-2.7 2.69",key:"1xk03u"}],["path",{d:"M13.9 21.82a9.94 9.94 0 0 1-3.8 0",key:"l7re25"}],["path",{d:"M6.4 20.29a9.95 9.95 0 0 1-2.69-2.7",key:"1v18p6"}],["path",{d:"M2.18 13.9a9.93 9.93 0 0 1 0-3.8",key:"xdo6bj"}],["path",{d:"M3.71 6.4a9.95 9.95 0 0 1 2.7-2.69",key:"1jjmaz"}]];var Uwe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]];var Qwe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]];var Wwe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]];var Ywe=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]];var Gwe=[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]];var Zwe=[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]];var Xwe=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]];var Kwe=[["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"9",y:"9",width:"6",height:"6",key:"o3kz5p"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]];var Jwe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]];var ebe=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]];var tbe=[["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}],["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["line",{x1:"10",x2:"21",y1:"14",y2:"3",key:"18c3s4"}]],nbe=[["path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24",key:"1jxqfv"}],["path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",key:"9wicm4"}],["path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61",key:"1jreej"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]],ibe=[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]];var rbe=[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["path",{d:"M12 18v-6",key:"17g6i2"}],["path",{d:"m9 15 3 3 3-3",key:"1npd3o"}]];var obe=[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["line",{x1:"12",x2:"12",y1:"18",y2:"12",key:"1tsf04"}],["line",{x1:"9",x2:"15",y1:"15",y2:"15",key:"110plj"}]];var sbe=[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}]];var abe=[["path",{d:"M10 2v7.527a2 2 0 0 1-.211.896L4.72 20.55a1 1 0 0 0 .9 1.45h12.76a1 1 0 0 0 .9-1.45l-5.069-10.127A2 2 0 0 1 14 9.527V2",key:"pzvekw"}],["path",{d:"M8.5 2h7",key:"csnxdl"}],["path",{d:"M7 16h10",key:"wp8him"}]];var lbe=[["path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z",key:"1fr9dc"}],["circle",{cx:"12",cy:"13",r:"1",key:"49l61u"}]];var cbe=[["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]];var ube=[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]];var dbe=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]];var hbe=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]];var pbe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]];var fbe=[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]];var mbe=[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]];var gbe=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],ybe=[["path",{d:"m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"y5dka4"}],["polyline",{points:"9 22 9 12 15 12 15 22",key:"e2us08"}]];var vbe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]];var _be=[["line",{x1:"8",x2:"21",y1:"6",y2:"6",key:"7ey8pc"}],["line",{x1:"8",x2:"21",y1:"12",y2:"12",key:"rjfblc"}],["line",{x1:"8",x2:"21",y1:"18",y2:"18",key:"c3b1m8"}],["line",{x1:"3",x2:"3.01",y1:"6",y2:"6",key:"1g7gq3"}],["line",{x1:"3",x2:"3.01",y1:"12",y2:"12",key:"1pjlvk"}],["line",{x1:"3",x2:"3.01",y1:"18",y2:"18",key:"28t2mc"}]];var Cbe=[["line",{x1:"12",x2:"12",y1:"2",y2:"6",key:"gza1u7"}],["line",{x1:"12",x2:"12",y1:"18",y2:"22",key:"1qhbu9"}],["line",{x1:"4.93",x2:"7.76",y1:"4.93",y2:"7.76",key:"xae44r"}],["line",{x1:"16.24",x2:"19.07",y1:"16.24",y2:"19.07",key:"bxnmvf"}],["line",{x1:"2",x2:"6",y1:"12",y2:"12",key:"89khin"}],["line",{x1:"18",x2:"22",y1:"12",y2:"12",key:"pb8tfm"}],["line",{x1:"4.93",x2:"7.76",y1:"19.07",y2:"16.24",key:"1uxjnu"}],["line",{x1:"16.24",x2:"19.07",y1:"7.76",y2:"4.93",key:"6duxfx"}]];var wbe=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],bbe=[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]],Sbe=[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]];var xbe=[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]];var kbe=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],Tbe=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]];var Obe=[["path",{d:"M18.37 2.63 14 7l-1.59-1.59a2 2 0 0 0-2.82 0L8 7l9 9 1.59-1.59a2 2 0 0 0 0-2.82L17 10l4.37-4.37a2.12 2.12 0 1 0-3-3Z",key:"m6k5sh"}],["path",{d:"M9 8c-2 3-4 3.5-7 4l8 10c2-1 6-5 6-7",key:"arzq70"}],["path",{d:"M14.5 17.5 4.5 15",key:"s7fvrz"}]];var Ebe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["line",{x1:"9",x2:"9",y1:"3",y2:"21",key:"13tij5"}]];var Mbe=[["path",{d:"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48",key:"1u3ebp"}]];var Dbe=[["path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1qinfi"}],["path",{d:"M18.5 2.5a2.12 2.12 0 0 1 3 3L12 15l-4 1 1-4Z",key:"w2jsv5"}]];var Ibe=[["path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z",key:"5qss01"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]];var zbe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]],Abe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]];var Pbe=[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]];var Rbe=[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}]];var Nbe=[["path",{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z",key:"1owoqh"}],["polyline",{points:"17 21 17 13 7 13 7 21",key:"1md35c"}],["polyline",{points:"7 3 7 8 15 8",key:"8nz8an"}]];var Lbe=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]];var Fbe=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]];var Vbe=[["path",{d:"m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z",key:"17u4zn"}],["path",{d:"M5 3v4",key:"bklmnn"}],["path",{d:"M19 17v4",key:"iiml17"}],["path",{d:"M3 5h4",key:"nem4j1"}],["path",{d:"M17 19h4",key:"lbex7p"}]];var Bbe=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]];var Hbe=[["path",{d:"M12 2H2v10l9.29 9.29c.94.94 2.48.94 3.42 0l6.58-6.58c.94-.94.94-2.48 0-3.42L12 2Z",key:"14b2ls"}],["path",{d:"M7 7h.01",key:"7u93v4"}]];var jbe=[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]];var $be=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]];var qbe=[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]];var Ube=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["polyline",{points:"16 11 18 13 22 9",key:"1pwet4"}]];var Qbe=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]];var Wbe=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]];var Ybe=[["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["polyline",{points:"12 10 12 12 13 13",key:"19dquz"}],["path",{d:"m16.13 7.66-.81-4.05a2 2 0 0 0-2-1.61h-2.68a2 2 0 0 0-2 1.61l-.78 4.05",key:"18k57s"}],["path",{d:"m7.88 16.36.8 4a2 2 0 0 0 2 1.61h2.72a2 2 0 0 0 2-1.61l.81-4.05",key:"16ny36"}]];var Gbe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]];var Zbe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],Xbe=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]];var Kbe=[["polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2",key:"45s27k"}]];var Mw={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"},RX=new Re("LucideIcons",{factory:()=>new Dw({})}),Dw=class{constructor(t){this.icons=t}getIcon(t){return this.hasIcon(t)?this.icons[t]:null}hasIcon(t){return typeof this.icons=="object"&&t in this.icons}},l0t=(()=>{class n{constructor(){this.color=Mw.stroke,this.size=Mw.width,this.strokeWidth=Mw["stroke-width"],this.absoluteStrokeWidth=!1}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=oe({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function c0t(n,t=3){return parseFloat(n.toFixed(t)).toString(10)}var Jbe=(()=>{class n{constructor(e,i,r,o,s){this.elem=e,this.renderer=i,this.changeDetector=r,this.iconProviders=o,this.iconConfig=s,this.absoluteStrokeWidth=!1,this.defaultSize=Mw.height}set img(e){this.name=e}get size(){return this._size??this.iconConfig.size}set size(e){e?this._size=this.parseNumber(e):delete this._size}get strokeWidth(){return this._strokeWidth??this.iconConfig.strokeWidth}set strokeWidth(e){e?this._strokeWidth=this.parseNumber(e):delete this._strokeWidth}ngOnChanges(e){if(this.color=this.color??this.iconConfig.color,this.size=this.parseNumber(this.size??this.iconConfig.size),this.strokeWidth=this.parseNumber(this.strokeWidth??this.iconConfig.strokeWidth),this.absoluteStrokeWidth=this.absoluteStrokeWidth??this.iconConfig.absoluteStrokeWidth,e.name||e.img){let i=e.img?.currentValue??e.name?.currentValue;if(typeof i=="string"){let r=this.getIcon(this.toPascalCase(i));if(r)this.replaceElement(r);else throw new Error(`The "${i}" icon has not been provided by any available icon providers.`)}else if(Array.isArray(i))this.replaceElement(i);else throw new Error("No icon name or image has been provided.")}this.changeDetector.markForCheck()}replaceElement(e){let i=q(k({},Mw),{width:this.size,height:this.size,stroke:this.color??this.iconConfig.color,"stroke-width":this.absoluteStrokeWidth?c0t(this.strokeWidth/(this.size/this.defaultSize)):this.strokeWidth.toString(10)}),r=this.createElement(["svg",i,e]);r.classList.add("lucide"),typeof this.name=="string"&&r.classList.add(`lucide-${this.name.replace("_","-")}`),this.class&&r.classList.add(...this.class.split(/ /).map(s=>s.trim()).filter(s=>s.length>0));let o=this.elem.nativeElement.childNodes;for(let s of o)this.renderer.removeChild(this.elem.nativeElement,s);this.renderer.appendChild(this.elem.nativeElement,r)}toPascalCase(e){return e.replace(/(\w)([a-z0-9]*)(_|-|\s*)/g,(i,r,o)=>r.toUpperCase()+o.toLowerCase())}parseNumber(e){if(typeof e=="string"){let i=parseInt(e,10);if(isNaN(i))throw new Error(`${e} is not numeric.`);return i}return e}getIcon(e){for(let i of Array.isArray(this.iconProviders)?this.iconProviders:[this.iconProviders])if(i.hasIcon(e))return i.getIcon(e);return null}createElement([e,i,r=[]]){let o=this.renderer.createElement(e,"http://www.w3.org/2000/svg");return Object.keys(i).forEach(s=>{let a=typeof i[s]=="string"?i[s]:i[s].toString(10);this.renderer.setAttribute(o,s,a)}),r.length&&r.forEach(s=>{let a=this.createElement(s);this.renderer.appendChild(o,a)}),o}}return n.\u0275fac=function(e){return new(e||n)(I(tt),I(on),I(Tt),I(RX),I(l0t))},n.\u0275cmp=re({type:n,selectors:[["lucide-angular"],["lucide-icon"],["i-lucide"],["span-lucide"]],inputs:{class:"class",name:"name",color:"color",absoluteStrokeWidth:"absoluteStrokeWidth",img:"img",size:"size",strokeWidth:"strokeWidth"},standalone:!1,features:[ft],ngContentSelectors:a0t,decls:1,vars:0,template:function(e,i){e&1&&(Gt(),At(0))},encapsulation:2}),n})(),NX=class{constructor(t){this.icons=t}},u0t=n=>new Dw(n??{}),LX=(()=>{class n{static pick(e){return{ngModule:n,providers:[{provide:RX,multi:!0,useValue:new Dw(e)},{provide:RX,multi:!0,useFactory:u0t,deps:[[new Gc,NX]]}]}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=He({type:n}),n.\u0275inj=Be({imports:[[]]}),n})();function h0t(n,t){if(n&1&&(d(0,`
309
309
  `),j(1,"span",0),d(2,`
310
310
  `)),n&2){let e=C();g(),S("innerHTML",e.svg(),Ml)("ngStyle",e.styles)}}function p0t(n,t){if(n&1&&(d(0,`
311
311
  `),j(1,"i-lucide",1),d(2,`
@@ -2998,4 +2998,4 @@ ${t}
2998
2998
  `],encapsulation:2,changeDetection:0})}return n})(),d9=(()=>{class n{_platform=R(vb);_containerElement;_document=R(Xt);_styleLoader=R(RA);constructor(){}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._loadStyles(),this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let e="cdk-overlay-container";if(this._platform.isBrowser||Bie()){let r=this._document.querySelectorAll(`.${e}[platform="server"], .${e}[platform="test"]`);for(let o=0;o<r.length;o++)r[o].remove()}let i=this._document.createElement("div");i.classList.add(e),Bie()?i.setAttribute("platform","test"):this._platform.isBrowser||i.setAttribute("platform","server"),this._document.body.appendChild(i),this._containerElement=i}_loadStyles(){this._styleLoader.load(APt)}static \u0275fac=function(i){return new(i||n)};static \u0275prov=oe({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var qRe=(()=>{class n extends d9{_createContainer(){let e=document.createElement("div");e.classList.add("cdk-overlay-container"),e.classList.add("app-overlay-container");let i=document.querySelector(".app-wrapper");i&&(i.appendChild(e),this._containerElement=e)}static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=so(n)))(r||n)}})()}static{this.\u0275prov=oe({token:n,factory:n.\u0275fac})}}return n})();var kR=(()=>{class n{constructor(){this.altairConfig=R(Hs),this.storageService=R(os),this.electronAppService=R(sl),this.notifyService=R(ii)}bootstrap(){return G(this,null,function*(){if(this.altairConfig.options.preserveState){let e=yield ME({updateFromLocalStorage:!0});this.initialState=e;let i=yield this.electronAppService.getSettingsFromFile();if(i){let r=bc.safeParse(k(k({},this.initialState?.settings),i));this.initialState=q(k({},this.initialState),{settings:r.success?r.data:this.initialState?.settings})}this.initialState||(yield this.electronAppService.importAutobackupData())&&this.notifyService.warning("Your application state has been automatically recovered.","Recovered data"),yield this.cleanSelectedFilesStorage()}})}cleanSelectedFilesStorage(){return G(this,null,function*(){this.initialState&&(yield this.storageService.selectedFiles.where("windowId").noneOf(this.initialState.windowsMeta?.windowIds||[]).delete())})}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=oe({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var URe=(()=>{class n{constructor(){this.actions$=R(js),this.store=R(mn),this.accountService=R(al),this.notifyService=R(ii),this.sharingService=R(T1),this.checkAccountLoginStatus$=Kt(()=>this.actions$.pipe(Zt(Yp),Ae(()=>sr.serverReady?this.accountService.observeUser().pipe(Ct(1)):ut),Ae(e=>{let i=Hh("show_login");return e?(this.store.dispatch(new _7({email:e?.email??"",firstName:e?.firstName??e?.email??"",lastName:"",picture:e.picture??"",isNewUser:e.isNewUser})),ut):(i==="true"&&this.store.dispatch(new qf({value:!0})),ut)}),Ae(()=>(this.store.dispatch(new pE),ut))),{dispatch:!1}),this.handleSubmitLogin$=Kt(()=>this.actions$.pipe(Zt(Xq),An(this.store,(e,i)=>({state:i,action:e})),Ae(({action:e})=>this.accountService.accountLogin$(e.payload?.provider).pipe(Ct(1))),Ae(e=>e?(this.notifyService.success(`You're logged in. Welcome back, ${e.firstName||e.email}`),this.store.dispatch(new _7({email:e.email??"",firstName:e.firstName??e.email??"",lastName:"",picture:e.picture??"",isNewUser:e.isNewUser})),this.store.dispatch(new qf({value:!1})),ut):(this.notifyService.error("Sorry, we could not log you in. Please check that your credentials are correct."),ut)),Bn(e=>bo(uo(e)).pipe(Ae(i=>(Ne.error(i),this.notifyService.errorWithError(i,"Sorry, we could not log you in. Please check that your username and password are correct"),ut)))),Oo()),{dispatch:!1}),this.logout$=Kt(()=>this.actions$.pipe(Zt(Kq),An(this.store,(e,i)=>({state:i,action:e})),Ae(({action:e})=>kn(this.accountService.logout())),Ae(()=>(this.notifyService.success("You're logged out"),this.store.dispatch(new mE),this.store.dispatch(new qf({value:!1})),this.store.dispatch(new ws),ut)),Bn(e=>bo(uo(e)).pipe(Ae(i=>(Ne.error(i),this.notifyService.errorWithError(i,"Sorry, we could not log you out. Please try again."),ut)))),Oo()),{dispatch:!1}),this.onLoggedIn$=Kt(()=>this.actions$.pipe(Zt(Xp),Ae(()=>(this.store.dispatch(new k8),this.store.dispatch(new _E),ut)),Bn(e=>bo(uo(e)).pipe(Ae(i=>(Ne.error(i),this.notifyService.errorWithError(e,"Could not load teams"),ut)))),Oo()),{dispatch:!1}),this.loadTeams$=Kt(()=>this.actions$.pipe(Zt(eU),Ae(e=>this.accountService.getTeams()),ze(e=>new gE({teams:e.map(i=>({id:i.id,name:i.name,description:i.description?i.description:void 0}))})),Bn(e=>bo(uo(e)).pipe(Ae(i=>(Ne.error(i),this.notifyService.errorWithError(e,"Could not load teams"),ut)))),Oo())),this.loadUserDataOnLoggedIn$=Kt(()=>this.actions$.pipe(Zt(Xp),Ae(e=>Hu([bo(this.accountService.getStats()),bo(this.accountService.getPlan()),bo(this.accountService.getPlanInfos()),bo(this.accountService.getAvailableCredits()),rt(e.payload)])),ze(([e,i,r,o,s])=>{i.canUpgradePro&&(Hh("plan_select")==="pro"?(this.store.dispatch(new Sc({value:!0})),this.accountService.getUpgradeProUrl().then(({url:l})=>{_c(l)})):s.isNewUser&&this.store.dispatch(new Sc({value:!0}))),this.store.dispatch(new yE({stats:{queriesCount:e.queries.own,queryCollectionsCount:e.collections.own,teamsCount:e.teams.own},plan:i,planInfos:r,availableCredits:o}))}),Bn(e=>bo(uo(e)).pipe(Ae(i=>(Ne.error(i),this.notifyService.errorWithError(e,"Could not load user data"),ut)))),Oo()),{dispatch:!1})}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=oe({token:n,factory:n.\u0275fac})}}return n})();var QRe=(()=>{class n{constructor(){this.actions$=R(js),this.store=R(mn),this.storageService=R(os),this.accountService=R(al),this.loadWorkspaces$=Kt(()=>this.actions$.pipe(Zt(iU),Ae(()=>this.accountService.getWorkspaces()),Ae(e=>(this.store.dispatch(new CE(e.map(i=>({id:i.id,name:i.name,teamId:i.teamId??void 0})))),ut))),{dispatch:!1})}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=oe({token:n,factory:n.\u0275fac})}}return n})();var WRe=(()=>{class n{constructor(){this.actions$=R(js),this.store=R(mn),this.electronAppService=R(sl),this.updateSettingsOnFile$=Kt(()=>this.actions$.pipe(Zt(d7,u7),An(this.store,(e,i)=>({state:i})),In(({state:e})=>rt(this.electronAppService.updateSettingsOnFile(e.settings)))),{dispatch:!1})}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=oe({token:n,factory:n.\u0275fac})}}return n})();Iue($Re);function PPt(n){return()=>n.bootstrap()}var RPt=[Oc,ll,Ec,Go,ii,B2,sl,Mg,os,cl,na,Ig,b1,xw,S1,ww,kw,al,T1,Tw,x1,Ew,nz,kR,{provide:Gx,useClass:VRe,multi:!0},{provide:qo,useClass:jRe},{provide:d9,useClass:qRe},wx(()=>PPt(R(kR))()),dB(hB()),Bde({loader:MRe({prefix:"./assets/i18n/",suffix:".json"}),fallbackLang:"en",lang:"en"})],YRe=(()=>{class n{constructor(){let e=R(w5),i=R(mn),r=R(kR);e.donePromise.then(()=>i.dispatch(new DO({initialState:r.initialState})))}static forRoot(){return{ngModule:n,providers:[{provide:PE,useValue:vU()},{provide:c3,useFactory:e=>e.cspNonce,deps:[Hs]}]}}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=He({type:n,bootstrap:[av]})}static{this.\u0275inj=Be({providers:RPt,imports:[Km,Zke,io,Tg,pm.forRoot(),xR,FRe,SR,_R,Ede.forRoot(PE,{metaReducers:Pge,runtimeChecks:{strictStateImmutability:!1,strictActionImmutability:!1}}),P2e.forRoot([IRe,zRe,ARe,PRe,RRe,NRe,URe,QRe,WRe]),sr.production?[]:ERe.instrument(),Upe.forRoot({newestOnTop:!1,closeButton:!0,positionClass:"toast-bottom-right",enableHtml:!0,countDuplicates:!0,preventDuplicates:!0,resetTimeoutOnDuplicate:!0}),tT]})}}return n})();var GRe=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=He({type:n,bootstrap:[rRe]})}static{this.\u0275inj=Be({imports:[Nt,Km,YRe.forRoot()]})}}return n})();var NPt=(n,t,e)=>{document.body.addEventListener(n,function(i){i.target&&i.target.matches(t)&&e.apply(i.target,[i])})},ZRe=()=>{NPt("click","a",function(n){let t=this.href||"";if(!t.replace(/#.*$/,""))return;n.preventDefault();let e=window.open(t,"_blank");e&&e.focus()})};var LPt=["__ALTAIR_ENDPOINT_URL__","__ALTAIR_SUBSCRIPTIONS_ENDPOINT__","__ALTAIR_INITIAL_QUERY__","__ALTAIR_INITIAL_VARIABLES__","__ALTAIR_INITIAL_HEADERS__","__ALTAIR_INITIAL_PRE_REQUEST_SCRIPT__","__ALTAIR_INSTANCE_STORAGE_NAMESPACE__"],XRe=n=>{console.warn("DEPRECATION NOTICE: Configuring altair using global variables is deprecated, and will be removed in a future version."),console.warn(`You set [window.${n}], which is deprecated.`),console.warn("Use 'AltairGraphQL.init(opts)' instead.")},KRe=()=>{LPt.forEach(n=>{window[n]&&XRe(n),Object.defineProperty(window,n,{get(){return window[n]},set(t){XRe(n),window[n]=t}})})};var JRe=!1;window.AltairGraphQL={init(n={}){if(JRe)return;let t=new Hs(n);Qme(t),sr.production&&void 0,oB([{provide:Hs,useValue:t}]).bootstrapModule(GRe,{preserveWhitespaces:!0}).then(e=>{let r=e.injector.get(Co).components[0];r&&Jue(r)}).catch(e=>Ne.log("Error bootstrapping application:",e)),ZRe(),KRe(),JRe=!0},plugins:{}};
2999
2999
  //# sourceMappingURL=main.js.map
3000
3000
 
3001
- //# debugId=c052d081-fca0-5b01-9e73-b94a6b4501e4
3001
+ //# debugId=289af014-1cd4-5e61-80a0-19635891d1e5
@@ -0,0 +1,11 @@
1
+
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="1ff63067-2bad-5a0c-a899-d98f304bd6dd")}catch(e){}}();
3
+ import{a as b,b as $}from"./chunk-FW4363Y4.js";var R=b((q,_)=>{"use strict";(function(r,t){"use strict";typeof _=="object"&&typeof _.exports=="object"?_.exports=t():typeof define=="function"&&define.amd?define([],t):r.objectPath=t()})(q,function(){"use strict";var r=Object.prototype.toString;function t(s,u){return s==null?!1:Object.prototype.hasOwnProperty.call(s,u)}function o(s){if(!s||p(s)&&s.length===0)return!0;if(typeof s!="string"){for(var u in s)if(t(s,u))return!1;return!0}return!1}function l(s){return r.call(s)}function f(s){return typeof s=="object"&&l(s)==="[object Object]"}var p=Array.isArray||function(s){return r.call(s)==="[object Array]"};function d(s){return typeof s=="boolean"||l(s)==="[object Boolean]"}function y(s){var u=parseInt(s);return u.toString()===s?u:s}function x(s){s=s||{};var u=function(i){return Object.keys(u).reduce(function(e,n){return n==="create"||typeof u[n]=="function"&&(e[n]=u[n].bind(u,i)),e},{})},g;s.includeInheritedProps?g=function(){return!0}:g=function(i,e){return typeof e=="number"&&Array.isArray(i)||t(i,e)};function T(i,e){if(g(i,e))return i[e]}function h(i,e,n,c){if(typeof e=="number"&&(e=[e]),!e||e.length===0)return i;if(typeof e=="string")return h(i,e.split(".").map(y),n,c);var a=e[0],v=T(i,a);if(s.includeInheritedProps&&(a==="__proto__"||a==="constructor"&&typeof v=="function"))throw new Error("For security reasons, object's magic properties cannot be set");return e.length===1?((v===void 0||!c)&&(i[a]=n),v):(v===void 0&&(typeof e[1]=="number"?i[a]=[]:i[a]={}),h(i[a],e.slice(1),n,c))}return u.has=function(i,e){if(typeof e=="number"?e=[e]:typeof e=="string"&&(e=e.split(".")),!e||e.length===0)return!!i;for(var n=0;n<e.length;n++){var c=y(e[n]);if(typeof c=="number"&&p(i)&&c<i.length||(s.includeInheritedProps?c in Object(i):t(i,c)))i=i[c];else return!1}return!0},u.ensureExists=function(i,e,n){return h(i,e,n,!0)},u.set=function(i,e,n,c){return h(i,e,n,c)},u.insert=function(i,e,n,c){var a=u.get(i,e);c=~~c,p(a)||(a=[],u.set(i,e,a)),a.splice(c,0,n)},u.empty=function(i,e){if(!o(e)&&i!=null){var n,c;if(n=u.get(i,e)){if(typeof n=="string")return u.set(i,e,"");if(d(n))return u.set(i,e,!1);if(typeof n=="number")return u.set(i,e,0);if(p(n))n.length=0;else if(f(n))for(c in n)g(n,c)&&delete n[c];else return u.set(i,e,null)}}},u.push=function(i,e){var n=u.get(i,e);p(n)||(n=[],u.set(i,e,n)),n.push.apply(n,Array.prototype.slice.call(arguments,2))},u.coalesce=function(i,e,n){for(var c,a=0,v=e.length;a<v;a++)if((c=u.get(i,e[a]))!==void 0)return c;return n},u.get=function(i,e,n){if(typeof e=="number"&&(e=[e]),!e||e.length===0)return i;if(i==null)return n;if(typeof e=="string")return u.get(i,e.split("."),n);var c=y(e[0]),a=T(i,c);return a===void 0?n:e.length===1?a:u.get(i[c],e.slice(1),n)},u.del=function(e,n){if(typeof n=="number"&&(n=[n]),e==null||o(n))return e;if(typeof n=="string")return u.del(e,n.split("."));var c=y(n[0]);if(!g(e,c))return e;if(n.length===1)p(e)?e.splice(c,1):delete e[c];else return u.del(e[c],n.slice(1));return e},u}var E=x();return E.create=x,E.withInheritedProps=x({includeInheritedProps:!0}),E})});var U="init_execute";var S;(function(r){r.INTROSPECTION="introspection",r.QUERY="query",r.SUBSCRIPTION="subscription"})(S||(S={}));var I=class{};var m=[];for(let r=0;r<256;++r)m.push((r+256).toString(16).slice(1));function A(r,t=0){return(m[r[t+0]]+m[r[t+1]]+m[r[t+2]]+m[r[t+3]]+"-"+m[r[t+4]]+m[r[t+5]]+"-"+m[r[t+6]]+m[r[t+7]]+"-"+m[r[t+8]]+m[r[t+9]]+"-"+m[r[t+10]]+m[r[t+11]]+m[r[t+12]]+m[r[t+13]]+m[r[t+14]]+m[r[t+15]]).toLowerCase()}var L=new Uint8Array(16);function P(){return crypto.getRandomValues(L)}function N(r,t,o){return!t&&!r&&crypto.randomUUID?crypto.randomUUID():J(r,t,o)}function J(r,t,o){r=r||{};let l=r.random??r.rng?.()??P();if(l.length<16)throw new Error("Random bytes length must be >= 16");if(l[6]=l[6]&15|64,l[8]=l[8]&63|128,t){if(o=o||0,o<0||o+16>t.length)throw new RangeError(`UUID byte range ${o}:${o+15} is out of buffer bounds`);for(let f=0;f<16;++f)t[o+f]=l[f];return t}return A(l)}var k=N;var w=$(R()),B={atob:{async exec(){return(await import("./chunk-CAVWCVAX.js")).atob}},btoa:{async exec(){return(await import("./chunk-CAVWCVAX.js")).btoa}},"crypto-js":{async exec(){return(await import("./chunk-MIKJ46VC.js")).default}}},H=r=>{if(r.response)return{body:r.response.body,requestType:r.requestType??S.QUERY,responseTime:r.response.responseTime,statusCode:r.response.status,headers:r.response.headers}},X=async r=>{let t=B[r];if(!t)throw new Error(`No request script module found matching "${r}"`);return t.exec()},M=(r,t)=>({data:r,helpers:{getEnvironment:o=>(0,w.get)(r.environment,o),setEnvironment:(o,l,f=!1)=>{(0,w.set)(r.environment,o,l),f&&(r.__toSetActiveEnvironment=r.__toSetActiveEnvironment??{},(0,w.set)(r.__toSetActiveEnvironment,o,l))},getCookie:o=>r.__cookieJar?.[o]??"",setCookie:(o,l,f)=>{t.setCookie(o,l,f)},request:async(o,l,f)=>t.request(o,l,f)},storage:{get:o=>t.getStorageItem(o),set:(o,l)=>t.setStorageItem(o,l)},importModule:o=>X(o),response:H(r),log:o=>{r.requestScriptLogs=r.requestScriptLogs??[],r.requestScriptLogs.push({id:crypto.randomUUID(),time:Date.now(),text:JSON.stringify(o,null,2),source:"Request script"})}});var G=["setCookie","request","getStorageItem","setStorageItem"],C=class{constructor(t){this.worker=t}start(){this.worker.onMessage(async t=>{switch(t.type){case U:try{await this.initExecute(t.payload)}catch(o){await this.makeCall("scriptError",o)}break}})}async initExecute(t){let[o,l]=t,f=await new Promise((p,d)=>{this.worker.onError(s=>{d(s)});let y=JSON.parse(JSON.stringify(l)),x=G.reduce((s,u)=>(s[u]=((...g)=>this.makeCall(u,...g)),s),{}),E={altair:M(y,x),alert:s=>this.makeCall("alert",s)};return this.evalWithContext(o,E).then(s=>p(s)).catch(s=>{d(s)})});f.__toSetActiveEnvironment&&this.makeCall("updateActiveEnvironment",f.__toSetActiveEnvironment),this.makeCall("executeComplete",f)}makeCall(t,...o){return new Promise((l,f)=>{let p=k();this.worker.onMessage(d=>{switch(d.type){case`${t}_response`:return d.payload.id!==p?void 0:l(d.payload.response);case`${t}_error`:return d.payload.id!==p?void 0:f(d.payload.error)}}),this.worker.send(t,{id:p,args:o})})}async evalWithContext(t,o){let l=Object.entries(o);return(0,eval)(`
4
+ async (${l.map(p=>p[0]).join(",")}) => {
5
+ ${t};
6
+ return altair.data;
7
+ }
8
+ `)(...l.map(p=>p[1]))}};var D=["chrome-extension://flnheeellpciglgpaodhkhmapeljopja","chrome-extension://aiopipphfnlndegenpkclffgaiillbdd","moz-extension://567d7e27-43b8-994e-ab50-e770fa7eab4b","http://localhost:4200","https://dash.altairgraphql.dev","https://web.altairgraphql.dev","altair://-"];var O=class extends I{onMessage(t){self.addEventListener("message",o=>{o.origin&&!D.includes(o.origin)||t(o.data)})}send(t,o){self.postMessage({type:t,payload:o})}onError(t){self.addEventListener("error",t),self.addEventListener("unhandledrejection",o=>{o.preventDefault(),t(o.reason)})}};new C(new O).start();
9
+ //# sourceMappingURL=worker-2ZPX3FTR.js.map
10
+
11
+ //# debugId=1ff63067-2bad-5a0c-a899-d98f304bd6dd
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "altair-static",
3
3
  "description": "Static package for altair graphql client",
4
- "version": "8.5.6-alpha.cddec71.0",
4
+ "version": "8.5.6",
5
5
  "author": "Samuel Imolorhe <altair@sirmuel.design> (https://sirmuel.design)",
6
6
  "bugs": "https://github.com/altair-graphql/altair/issues",
7
7
  "devDependencies": {
@@ -12,8 +12,8 @@
12
12
  "tsdown": "^0.21.10",
13
13
  "typescript": "5.9.3",
14
14
  "vitest": "4.1.5",
15
- "altair-graphql-core": "8.5.6-alpha.cddec71.0",
16
- "@altairgraphql/app": "8.5.6-alpha.cddec71.0"
15
+ "@altairgraphql/app": "8.5.6",
16
+ "altair-graphql-core": "8.5.6"
17
17
  },
18
18
  "dependencies": {
19
19
  "zod": "4.1.13"
@@ -1,6 +0,0 @@
1
- (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))l(c);new MutationObserver(c=>{for(const f of c)if(f.type==="childList")for(const d of f.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&l(d)}).observe(document,{childList:!0,subtree:!0});function n(c){const f={};return c.integrity&&(f.integrity=c.integrity),c.referrerPolicy&&(f.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?f.credentials="include":c.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function l(c){if(c.ep)return;c.ep=!0;const f=n(c);fetch(c.href,f)}})();const y=[];for(let r=0;r<256;++r)y.push((r+256).toString(16).slice(1));function A(r,t=0){return(y[r[t+0]]+y[r[t+1]]+y[r[t+2]]+y[r[t+3]]+"-"+y[r[t+4]]+y[r[t+5]]+"-"+y[r[t+6]]+y[r[t+7]]+"-"+y[r[t+8]]+y[r[t+9]]+"-"+y[r[t+10]]+y[r[t+11]]+y[r[t+12]]+y[r[t+13]]+y[r[t+14]]+y[r[t+15]]).toLowerCase()}const L=new Uint8Array(16);function U(){return crypto.getRandomValues(L)}function k(r,t,n){return crypto.randomUUID?crypto.randomUUID():N(r)}function N(r,t,n){r=r||{};const l=r.random??r.rng?.()??U();if(l.length<16)throw new Error("Random bytes length must be >= 16");return l[6]=l[6]&15|64,l[8]=l[8]&63|128,A(l)}const T="init_execute",q="modulepreload",R=function(r){return"/"+r},b={},x=function(t,n,l){let c=Promise.resolve();if(n&&n.length>0){let h=function(p){return Promise.all(p.map(s=>Promise.resolve(s).then(u=>({status:"fulfilled",value:u}),u=>({status:"rejected",reason:u}))))};var d=h;document.getElementsByTagName("link");const w=document.querySelector("meta[property=csp-nonce]"),g=w?.nonce||w?.getAttribute("nonce");c=h(n.map(p=>{if(p=R(p),p in b)return;b[p]=!0;const s=p.endsWith(".css"),u=s?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${u}`))return;const v=document.createElement("link");if(v.rel=s?"stylesheet":q,s||(v.as="script"),v.crossOrigin="",v.href=p,g&&v.setAttribute("nonce",g),document.head.appendChild(v),s)return new Promise((P,E)=>{v.addEventListener("load",P),v.addEventListener("error",()=>E(new Error(`Unable to preload CSS for ${p}`)))})}))}function f(w){const g=new Event("vite:preloadError",{cancelable:!0});if(g.payload=w,window.dispatchEvent(g),!g.defaultPrevented)throw w}return c.then(w=>{for(const g of w||[])g.status==="rejected"&&f(g.reason);return t().catch(f)})};var I;(function(r){r.INTROSPECTION="introspection",r.QUERY="query",r.SUBSCRIPTION="subscription"})(I||(I={}));class M{}var S={exports:{}},D=S.exports,C;function $(){return C||(C=1,(function(r){(function(t,n){r.exports=n()})(D,function(){var t=Object.prototype.toString;function n(s,u){return s==null?!1:Object.prototype.hasOwnProperty.call(s,u)}function l(s){if(!s||d(s)&&s.length===0)return!0;if(typeof s!="string"){for(var u in s)if(n(s,u))return!1;return!0}return!1}function c(s){return t.call(s)}function f(s){return typeof s=="object"&&c(s)==="[object Object]"}var d=Array.isArray||function(s){return t.call(s)==="[object Array]"};function w(s){return typeof s=="boolean"||c(s)==="[object Boolean]"}function g(s){var u=parseInt(s);return u.toString()===s?u:s}function h(s){s=s||{};var u=function(i){return Object.keys(u).reduce(function(e,o){return o==="create"||typeof u[o]=="function"&&(e[o]=u[o].bind(u,i)),e},{})},v;s.includeInheritedProps?v=function(){return!0}:v=function(i,e){return typeof e=="number"&&Array.isArray(i)||n(i,e)};function P(i,e){if(v(i,e))return i[e]}function E(i,e,o,a){if(typeof e=="number"&&(e=[e]),!e||e.length===0)return i;if(typeof e=="string")return E(i,e.split(".").map(g),o,a);var m=e[0],_=P(i,m);if(s.includeInheritedProps&&(m==="__proto__"||m==="constructor"&&typeof _=="function"))throw new Error("For security reasons, object's magic properties cannot be set");return e.length===1?((_===void 0||!a)&&(i[m]=o),_):(_===void 0&&(typeof e[1]=="number"?i[m]=[]:i[m]={}),E(i[m],e.slice(1),o,a))}return u.has=function(i,e){if(typeof e=="number"?e=[e]:typeof e=="string"&&(e=e.split(".")),!e||e.length===0)return!!i;for(var o=0;o<e.length;o++){var a=g(e[o]);if(typeof a=="number"&&d(i)&&a<i.length||(s.includeInheritedProps?a in Object(i):n(i,a)))i=i[a];else return!1}return!0},u.ensureExists=function(i,e,o){return E(i,e,o,!0)},u.set=function(i,e,o,a){return E(i,e,o,a)},u.insert=function(i,e,o,a){var m=u.get(i,e);a=~~a,d(m)||(m=[],u.set(i,e,m)),m.splice(a,0,o)},u.empty=function(i,e){if(!l(e)&&i!=null){var o,a;if(o=u.get(i,e)){if(typeof o=="string")return u.set(i,e,"");if(w(o))return u.set(i,e,!1);if(typeof o=="number")return u.set(i,e,0);if(d(o))o.length=0;else if(f(o))for(a in o)v(o,a)&&delete o[a];else return u.set(i,e,null)}}},u.push=function(i,e){var o=u.get(i,e);d(o)||(o=[],u.set(i,e,o)),o.push.apply(o,Array.prototype.slice.call(arguments,2))},u.coalesce=function(i,e,o){for(var a,m=0,_=e.length;m<_;m++)if((a=u.get(i,e[m]))!==void 0)return a;return o},u.get=function(i,e,o){if(typeof e=="number"&&(e=[e]),!e||e.length===0)return i;if(i==null)return o;if(typeof e=="string")return u.get(i,e.split("."),o);var a=g(e[0]),m=P(i,a);return m===void 0?o:e.length===1?m:u.get(i[a],e.slice(1),o)},u.del=function(e,o){if(typeof o=="number"&&(o=[o]),e==null||l(o))return e;if(typeof o=="string")return u.del(e,o.split("."));var a=g(o[0]);if(!v(e,a))return e;if(o.length===1)d(e)?e.splice(a,1):delete e[a];else return u.del(e[a],o.slice(1));return e},u}var p=h();return p.create=h,p.withInheritedProps=h({includeInheritedProps:!0}),p})})(S)),S.exports}var O=$();const B={atob:{async exec(){return(await x(async()=>{const{atob:r}=await import("./index-D_C6pEAs.js").then(t=>t.i);return{atob:r}},[])).atob}},btoa:{async exec(){return(await x(async()=>{const{btoa:r}=await import("./index-D_C6pEAs.js").then(t=>t.i);return{btoa:r}},[])).btoa}},"crypto-js":{async exec(){return(await x(async()=>{const{default:r}=await import("./index-CT51TZmB.js").then(t=>t.i);return{default:r}},[])).default}}},J=r=>{if(r.response)return{body:r.response.body,requestType:r.requestType??I.QUERY,responseTime:r.response.responseTime,statusCode:r.response.status,headers:r.response.headers}},W=async r=>{const t=B[r];if(!t)throw new Error(`No request script module found matching "${r}"`);return t.exec()},F=(r,t)=>({data:r,helpers:{getEnvironment:n=>O.get(r.environment,n),setEnvironment:(n,l,c=!1)=>{O.set(r.environment,n,l),c&&(r.__toSetActiveEnvironment=r.__toSetActiveEnvironment??{},O.set(r.__toSetActiveEnvironment,n,l))},getCookie:n=>r.__cookieJar?.[n]??"",setCookie:(n,l,c)=>{t.setCookie(n,l,c)},request:async(n,l,c)=>t.request(n,l,c)},storage:{get:n=>t.getStorageItem(n),set:(n,l)=>t.setStorageItem(n,l)},importModule:n=>W(n),response:J(r),log:n=>{r.requestScriptLogs=r.requestScriptLogs??[],r.requestScriptLogs.push({id:crypto.randomUUID(),time:Date.now(),text:JSON.stringify(n,null,2),source:"Request script"})}}),H=["setCookie","request","getStorageItem","setStorageItem"];class K{constructor(t){this.worker=t}start(){this.worker.onMessage(async t=>{switch(t.type){case T:try{await this.initExecute(t.payload)}catch(n){await this.makeCall("scriptError",n)}break}})}async initExecute(t){const[n,l]=t,c=await new Promise((f,d)=>{this.worker.onError(s=>{d(s)});const w=JSON.parse(JSON.stringify(l)),g=H.reduce((s,u)=>(s[u]=((...v)=>this.makeCall(u,...v)),s),{}),h={altair:F(w,g),alert:s=>this.makeCall("alert",s)},p=Object.entries(h);try{const s=(function(){return(0,eval)(`
2
- (async(${p.map(u=>u[0]).join(",")}) => {
3
- ${n};
4
- return altair.data;
5
- })(...this.__ctxE.map(e => e[1]));
6
- `)}).call({__ctxE:p});return f(s)}catch(s){return d(s)}});c.__toSetActiveEnvironment&&this.makeCall("updateActiveEnvironment",c.__toSetActiveEnvironment),this.makeCall("executeComplete",c)}makeCall(t,...n){return new Promise((l,c)=>{const f=k();this.worker.onMessage(d=>{switch(d.type){case`${t}_response`:return d.payload.id!==f?void 0:l(d.payload.response);case`${t}_error`:return d.payload.id!==f?void 0:c(d.payload.error)}}),this.worker.send(t,{id:f,args:n})})}}class Q extends M{origin;constructor(){super();const n=new URLSearchParams(window.location.search).get("sc");if(!n)throw new Error("Invalid source provided!");this.origin=n}onMessage(t){window.addEventListener("message",n=>{n.origin===this.origin&&t(n.data)})}send(t,n){window.parent.postMessage({type:t,payload:n},this.origin)}onError(t){window.addEventListener("error",t),window.addEventListener("unhandledrejection",n=>{n.preventDefault(),t(n.reason)})}}const V=r=>new Promise((t,n)=>{const l=document.getElementsByTagName("head")[0];if(!l)return n(new Error("No head found!"));const c=document.createElement("script");c.type="text/javascript",c.src=r,c.onload=()=>t(null),c.onerror=f=>n(f),l.appendChild(c)}),Y=r=>new Promise((t,n)=>{const l=document.getElementsByTagName("head")[0];if(!l)return n(new Error("No head found!"));const c=document.createElement("link");c.type="text/css",c.rel="stylesheet",c.href=r,c.onload=()=>t(null),c.onerror=f=>n(f),l.appendChild(c)}),G=async()=>{const t=new URLSearchParams(window.location.search).get("plugin_sandbox_opts"),n=t?JSON.parse(t):void 0;if(!n)throw new Error("Invalid plugin options provided!");if(n.type!=="scripts")throw new Error("Invalid plugin option type provided!");if(document.querySelectorAll('style,link[rel="stylesheet"]').forEach(l=>l.remove()),n.styleUrls)for(const l of n.styleUrls)await Y(l);if(n.scriptUrls)for(const l of n.scriptUrls)await V(l)},X=new URLSearchParams(window.location.search),z=X.get("sandbox_type");z==="plugin"?G():new K(new Q).start();
@@ -1,11 +0,0 @@
1
-
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b9fd8111-f091-5385-8286-0e212a6a0c98")}catch(e){}}();
3
- import{a as b,b as $}from"./chunk-FW4363Y4.js";var R=b((q,C)=>{"use strict";(function(r,t){"use strict";typeof C=="object"&&typeof C.exports=="object"?C.exports=t():typeof define=="function"&&define.amd?define([],t):r.objectPath=t()})(q,function(){"use strict";var r=Object.prototype.toString;function t(u,s){return u==null?!1:Object.prototype.hasOwnProperty.call(u,s)}function o(u){if(!u||p(u)&&u.length===0)return!0;if(typeof u!="string"){for(var s in u)if(t(u,s))return!1;return!0}return!1}function l(u){return r.call(u)}function a(u){return typeof u=="object"&&l(u)==="[object Object]"}var p=Array.isArray||function(u){return r.call(u)==="[object Array]"};function d(u){return typeof u=="boolean"||l(u)==="[object Boolean]"}function y(u){var s=parseInt(u);return s.toString()===u?s:u}function x(u){u=u||{};var s=function(i){return Object.keys(s).reduce(function(e,n){return n==="create"||typeof s[n]=="function"&&(e[n]=s[n].bind(s,i)),e},{})},g;u.includeInheritedProps?g=function(){return!0}:g=function(i,e){return typeof e=="number"&&Array.isArray(i)||t(i,e)};function S(i,e){if(g(i,e))return i[e]}function h(i,e,n,c){if(typeof e=="number"&&(e=[e]),!e||e.length===0)return i;if(typeof e=="string")return h(i,e.split(".").map(y),n,c);var f=e[0],v=S(i,f);if(u.includeInheritedProps&&(f==="__proto__"||f==="constructor"&&typeof v=="function"))throw new Error("For security reasons, object's magic properties cannot be set");return e.length===1?((v===void 0||!c)&&(i[f]=n),v):(v===void 0&&(typeof e[1]=="number"?i[f]=[]:i[f]={}),h(i[f],e.slice(1),n,c))}return s.has=function(i,e){if(typeof e=="number"?e=[e]:typeof e=="string"&&(e=e.split(".")),!e||e.length===0)return!!i;for(var n=0;n<e.length;n++){var c=y(e[n]);if(typeof c=="number"&&p(i)&&c<i.length||(u.includeInheritedProps?c in Object(i):t(i,c)))i=i[c];else return!1}return!0},s.ensureExists=function(i,e,n){return h(i,e,n,!0)},s.set=function(i,e,n,c){return h(i,e,n,c)},s.insert=function(i,e,n,c){var f=s.get(i,e);c=~~c,p(f)||(f=[],s.set(i,e,f)),f.splice(c,0,n)},s.empty=function(i,e){if(!o(e)&&i!=null){var n,c;if(n=s.get(i,e)){if(typeof n=="string")return s.set(i,e,"");if(d(n))return s.set(i,e,!1);if(typeof n=="number")return s.set(i,e,0);if(p(n))n.length=0;else if(a(n))for(c in n)g(n,c)&&delete n[c];else return s.set(i,e,null)}}},s.push=function(i,e){var n=s.get(i,e);p(n)||(n=[],s.set(i,e,n)),n.push.apply(n,Array.prototype.slice.call(arguments,2))},s.coalesce=function(i,e,n){for(var c,f=0,v=e.length;f<v;f++)if((c=s.get(i,e[f]))!==void 0)return c;return n},s.get=function(i,e,n){if(typeof e=="number"&&(e=[e]),!e||e.length===0)return i;if(i==null)return n;if(typeof e=="string")return s.get(i,e.split("."),n);var c=y(e[0]),f=S(i,c);return f===void 0?n:e.length===1?f:s.get(i[c],e.slice(1),n)},s.del=function(e,n){if(typeof n=="number"&&(n=[n]),e==null||o(n))return e;if(typeof n=="string")return s.del(e,n.split("."));var c=y(n[0]);if(!g(e,c))return e;if(n.length===1)p(e)?e.splice(c,1):delete e[c];else return s.del(e[c],n.slice(1));return e},s}var E=x();return E.create=x,E.withInheritedProps=x({includeInheritedProps:!0}),E})});var U="init_execute";var _;(function(r){r.INTROSPECTION="introspection",r.QUERY="query",r.SUBSCRIPTION="subscription"})(_||(_={}));var I=class{};var m=[];for(let r=0;r<256;++r)m.push((r+256).toString(16).slice(1));function A(r,t=0){return(m[r[t+0]]+m[r[t+1]]+m[r[t+2]]+m[r[t+3]]+"-"+m[r[t+4]]+m[r[t+5]]+"-"+m[r[t+6]]+m[r[t+7]]+"-"+m[r[t+8]]+m[r[t+9]]+"-"+m[r[t+10]]+m[r[t+11]]+m[r[t+12]]+m[r[t+13]]+m[r[t+14]]+m[r[t+15]]).toLowerCase()}var L=new Uint8Array(16);function k(){return crypto.getRandomValues(L)}function N(r,t,o){return!t&&!r&&crypto.randomUUID?crypto.randomUUID():J(r,t,o)}function J(r,t,o){r=r||{};let l=r.random??r.rng?.()??k();if(l.length<16)throw new Error("Random bytes length must be >= 16");if(l[6]=l[6]&15|64,l[8]=l[8]&63|128,t){if(o=o||0,o<0||o+16>t.length)throw new RangeError(`UUID byte range ${o}:${o+15} is out of buffer bounds`);for(let a=0;a<16;++a)t[o+a]=l[a];return t}return A(l)}var O=N;var w=$(R()),B={atob:{async exec(){return(await import("./chunk-CAVWCVAX.js")).atob}},btoa:{async exec(){return(await import("./chunk-CAVWCVAX.js")).btoa}},"crypto-js":{async exec(){return(await import("./chunk-MIKJ46VC.js")).default}}},H=r=>{if(r.response)return{body:r.response.body,requestType:r.requestType??_.QUERY,responseTime:r.response.responseTime,statusCode:r.response.status,headers:r.response.headers}},X=async r=>{let t=B[r];if(!t)throw new Error(`No request script module found matching "${r}"`);return t.exec()},M=(r,t)=>({data:r,helpers:{getEnvironment:o=>(0,w.get)(r.environment,o),setEnvironment:(o,l,a=!1)=>{(0,w.set)(r.environment,o,l),a&&(r.__toSetActiveEnvironment=r.__toSetActiveEnvironment??{},(0,w.set)(r.__toSetActiveEnvironment,o,l))},getCookie:o=>r.__cookieJar?.[o]??"",setCookie:(o,l,a)=>{t.setCookie(o,l,a)},request:async(o,l,a)=>t.request(o,l,a)},storage:{get:o=>t.getStorageItem(o),set:(o,l)=>t.setStorageItem(o,l)},importModule:o=>X(o),response:H(r),log:o=>{r.requestScriptLogs=r.requestScriptLogs??[],r.requestScriptLogs.push({id:crypto.randomUUID(),time:Date.now(),text:JSON.stringify(o,null,2),source:"Request script"})}});var G=["setCookie","request","getStorageItem","setStorageItem"],P=class{constructor(t){this.worker=t}start(){this.worker.onMessage(async t=>{switch(t.type){case U:try{await this.initExecute(t.payload)}catch(o){await this.makeCall("scriptError",o)}break}})}async initExecute(t){let[o,l]=t,a=await new Promise((p,d)=>{this.worker.onError(s=>{d(s)});let y=JSON.parse(JSON.stringify(l)),x=G.reduce((s,g)=>(s[g]=((...S)=>this.makeCall(g,...S)),s),{}),E={altair:M(y,x),alert:s=>this.makeCall("alert",s)},u=Object.entries(E);try{let s=function(){return(0,eval)(`
4
- (async(${u.map(g=>g[0]).join(",")}) => {
5
- ${o};
6
- return altair.data;
7
- })(...this.__ctxE.map(e => e[1]));
8
- `)}.call({__ctxE:u});return p(s)}catch(s){return d(s)}});a.__toSetActiveEnvironment&&this.makeCall("updateActiveEnvironment",a.__toSetActiveEnvironment),this.makeCall("executeComplete",a)}makeCall(t,...o){return new Promise((l,a)=>{let p=O();this.worker.onMessage(d=>{switch(d.type){case`${t}_response`:return d.payload.id!==p?void 0:l(d.payload.response);case`${t}_error`:return d.payload.id!==p?void 0:a(d.payload.error)}}),this.worker.send(t,{id:p,args:o})})}};var D=["chrome-extension://flnheeellpciglgpaodhkhmapeljopja","chrome-extension://aiopipphfnlndegenpkclffgaiillbdd","moz-extension://567d7e27-43b8-994e-ab50-e770fa7eab4b","http://localhost:4200","https://dash.altairgraphql.dev","https://web.altairgraphql.dev","altair://-"];var T=class extends I{onMessage(t){self.addEventListener("message",o=>{o.origin&&!D.includes(o.origin)||t(o.data)})}send(t,o){self.postMessage({type:t,payload:o})}onError(t){self.addEventListener("error",t),self.addEventListener("unhandledrejection",o=>{o.preventDefault(),t(o.reason)})}};new P(new T).start();
9
- //# sourceMappingURL=worker-JHIJ5B6A.js.map
10
-
11
- //# debugId=b9fd8111-f091-5385-8286-0e212a6a0c98