altair-static 5.2.6 → 5.2.8
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.
- package/build/dist/114.js +5 -0
- package/build/dist/{244.js → 176.js} +5 -1
- package/build/dist/38.js +5 -0
- package/build/dist/{679.js → 404.js} +5 -1
- package/build/dist/414.js +5 -0
- package/build/dist/425.js +5 -1
- package/build/dist/485.js +5 -0
- package/build/dist/494.js +5 -0
- package/build/dist/{751.js → 579.js} +5 -1
- package/build/dist/614.js +5 -1
- package/build/dist/629.js +5 -1
- package/build/dist/{201.js → 670.js} +5 -1
- package/build/dist/{104.js → 788.js} +5 -1
- package/build/dist/881.js +5 -0
- package/build/dist/913.js +5 -0
- package/build/dist/common.js +5 -1
- package/build/dist/main.js +6 -2
- package/build/dist/polyfills.js +5 -1
- package/build/dist/runtime.js +5 -1
- package/build/dist/styles.css +2 -0
- package/package.json +4 -4
- package/build/dist/232.js +0 -1
- package/build/dist/257.js +0 -1
- package/build/dist/521.js +0 -1
- package/build/dist/625.js +0 -1
- package/build/dist/777.js +0 -1
- package/build/dist/789.js +0 -1
- package/build/dist/829.js +0 -1
package/build/dist/425.js
CHANGED
|
@@ -1 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="d94c76d7-8e60-5ae2-8068-186f31638d6c")}catch(e){}}();
|
|
3
|
+
(()=>{"use strict";var __webpack_modules__={72425:(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{var _home_runner_work_altair_altair_node_modules_angular_devkit_build_angular_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(26642),uuid__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(88141),_events__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(31313),_helpers__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(69659);onmessage=function(){var e=(0,_home_runner_work_altair_altair_node_modules_angular_devkit_build_angular_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__.Z)(function*(t){if(t.data.type===_events__WEBPACK_IMPORTED_MODULE_2__.Jk)try{yield initExecute(t.data.payload)}catch(_){makeCall("scriptError",_)}});return function(_){return e.apply(this,arguments)}}();const workerHandlerNames=["setCookie","request","getStorageItem","setStorageItem"],initExecute=function(){var _ref2=(0,_home_runner_work_altair_altair_node_modules_angular_devkit_build_angular_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__.Z)(function*(payload){const[script,data]=payload,res=yield new Promise((resolve,reject)=>{self.addEventListener("unhandledrejection",e=>(e.preventDefault(),reject(e.reason)));const clonedMutableData=JSON.parse(JSON.stringify(data)),handlers=workerHandlerNames.reduce((e,t)=>(e[t]=(..._)=>makeCall(t,..._),e),{}),context={altair:(0,_helpers__WEBPACK_IMPORTED_MODULE_0__.IL)(clonedMutableData,handlers),alert},contextEntries=Object.entries(context);try{const res=function(){return eval(`\n (async(${contextEntries.map(e=>e[0]).join(",")}) => {\n ${script};\n return altair.data;\n })(...this.__ctxE.map(e => e[1]));\n `)}.call({__ctxE:contextEntries});return resolve(res)}catch(e){return reject(e)}});res.__toSetActiveEnvironment&&makeCall("updateActiveEnvironment",res.__toSetActiveEnvironment),makeCall("executeComplete",res)});return function e(t){return _ref2.apply(this,arguments)}}(),alert=e=>makeCall("alert",e),makeCall=(e,...t)=>new Promise((_,r)=>{const n=(0,uuid__WEBPACK_IMPORTED_MODULE_3__.Z)(),i={type:e,payload:{id:n,args:t}};addEventListener("message",c=>{switch(c.data.type){case`${e}_response`:return c.data.payload.id!==n?void 0:_(c.data.payload.response);case`${e}_error`:return c.data.payload.id!==n?void 0:r(c.data.payload.error)}}),self.postMessage(i)})},31313:(e,t,_)=>{_.d(t,{Jk:()=>r});const r="init_execute"},69659:(e,t,_)=>{_.d(t,{IL:()=>u});var r=_(26642),n=(()=>{return(a=n||(n={})).INTROSPECTION="introspection",a.QUERY="query",a.SUBSCRIPTION="subscription",n;var a})();const i={atob:{exec:()=>(0,r.Z)(function*(){return(yield _.e(114).then(_.t.bind(_,27114,23))).atob})()},btoa:{exec:()=>(0,r.Z)(function*(){return(yield _.e(114).then(_.t.bind(_,27114,23))).btoa})()},"crypto-js":{exec:()=>(0,r.Z)(function*(){return(yield _.e(38).then(_.t.bind(_,61110,23))).default})()}},c=a=>{if(a.response)return{body:a.response.response.body,requestType:a.requestType||n.QUERY,responseTime:a.response.meta.responseTime,statusCode:a.response.response.status,headers:a.response.meta.headers}},o=function(){var a=(0,r.Z)(function*(l){const s=i[l];if(!s)throw new Error(`No request script module found matching "${l}"`);return s.exec()});return function(s){return a.apply(this,arguments)}}(),u=(a,l)=>{return{data:a,helpers:{getEnvironment:s=>a.environment[s],setEnvironment:(s,p,d=!1)=>{a.environment[s]=p,d&&(a.__toSetActiveEnvironment=a.__toSetActiveEnvironment??{},a.__toSetActiveEnvironment[s]=p)},getCookie:s=>a.__cookieJar?.[s]??"",setCookie:(s,p,d)=>{l.setCookie(s,p,d)},request:(s=(0,r.Z)(function*(p,d,b){return l.request(p,d,b)}),function(d,b,m){return s.apply(this,arguments)})},storage:{get:s=>l.getStorageItem(s),set:(s,p)=>l.setStorageItem(s,p)},importModule:s=>o(s),response:c(a),log:s=>{a.requestScriptLogs=a.requestScriptLogs??[],a.requestScriptLogs.push({time:Date.now(),text:JSON.stringify(s,null,2),source:"Request script"})}};var s}},19993:(e,t,_)=>{_.d(t,{Z:()=>n});const n={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)}},13190:(e,t,_)=>{let r;_.d(t,{Z:()=>i});const n=new Uint8Array(16);function i(){if(!r&&(r=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!r))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(n)}},70197:(e,t,_)=>{_.d(t,{S:()=>n});const r=[];for(let o=0;o<256;++o)r.push((o+256).toString(16).slice(1));function n(o,u=0){return r[o[u+0]]+r[o[u+1]]+r[o[u+2]]+r[o[u+3]]+"-"+r[o[u+4]]+r[o[u+5]]+"-"+r[o[u+6]]+r[o[u+7]]+"-"+r[o[u+8]]+r[o[u+9]]+"-"+r[o[u+10]]+r[o[u+11]]+r[o[u+12]]+r[o[u+13]]+r[o[u+14]]+r[o[u+15]]}},88141:(e,t,_)=>{_.d(t,{Z:()=>o});var r=_(19993),n=_(13190),i=_(70197);const o=function c(u,a,l){if(r.Z.randomUUID&&!a&&!u)return r.Z.randomUUID();const s=(u=u||{}).random||(u.rng||n.Z)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,a){l=l||0;for(let p=0;p<16;++p)a[l+p]=s[p];return a}return(0,i.S)(s)}}},__webpack_module_cache__={},e;function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var _=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(_.exports,_,_.exports,__webpack_require__),_.exports}__webpack_require__.m=__webpack_modules__,__webpack_require__.x=()=>{var e=__webpack_require__.O(void 0,[592],()=>__webpack_require__(72425));return __webpack_require__.O(e)},e=[],__webpack_require__.O=(t,_,r,n)=>{if(!_){var c=1/0;for(i=0;i<e.length;i++){for(var[_,r,n]=e[i],o=!0,u=0;u<_.length;u++)(!1&n||c>=n)&&Object.keys(__webpack_require__.O).every(b=>__webpack_require__.O[b](_[u]))?_.splice(u--,1):(o=!1,n<c&&(c=n));if(o){e.splice(i--,1);var a=r();void 0!==a&&(t=a)}}return t}n=n||0;for(var i=e.length;i>0&&e[i-1][2]>n;i--)e[i]=e[i-1];e[i]=[_,r,n]},(()=>{var t,e=Object.getPrototypeOf?_=>Object.getPrototypeOf(_):_=>_.__proto__;__webpack_require__.t=function(_,r){if(1&r&&(_=this(_)),8&r||"object"==typeof _&&_&&(4&r&&_.__esModule||16&r&&"function"==typeof _.then))return _;var n=Object.create(null);__webpack_require__.r(n);var i={};t=t||[null,e({}),e([]),e(e)];for(var c=2&r&&_;"object"==typeof c&&!~t.indexOf(c);c=e(c))Object.getOwnPropertyNames(c).forEach(o=>i[o]=()=>_[o]);return i.default=()=>_,__webpack_require__.d(n,i),n}})(),__webpack_require__.d=(e,t)=>{for(var _ in t)__webpack_require__.o(t,_)&&!__webpack_require__.o(e,_)&&Object.defineProperty(e,_,{enumerable:!0,get:t[_]})},__webpack_require__.f={},__webpack_require__.e=e=>Promise.all(Object.keys(__webpack_require__.f).reduce((t,_)=>(__webpack_require__.f[_](e,t),t),[])),__webpack_require__.u=e=>(592===e?"common":e)+".js",__webpack_require__.miniCssF=e=>{},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;__webpack_require__.tt=()=>(void 0===e&&(e={createScriptURL:t=>t},typeof trustedTypes<"u"&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("angular#bundler",e))),e)})(),__webpack_require__.tu=e=>__webpack_require__.tt().createScriptURL(e),__webpack_require__.p="",(()=>{var e={425:1};__webpack_require__.f.i=(n,i)=>{e[n]||importScripts(__webpack_require__.tu(__webpack_require__.p+__webpack_require__.u(n)))};var _=self.webpackChunkaltair=self.webpackChunkaltair||[],r=_.push.bind(_);_.push=n=>{var[i,c,o]=n;for(var u in c)__webpack_require__.o(c,u)&&(__webpack_require__.m[u]=c[u]);for(o&&o(__webpack_require__);i.length;)e[i.pop()]=1;r(n)}})(),(()=>{var e=__webpack_require__.x;__webpack_require__.x=()=>__webpack_require__.e(592).then(e)})();var __webpack_exports__=__webpack_require__.x()})();
|
|
4
|
+
//# sourceMappingURL=425.js.map
|
|
5
|
+
//# debugId=d94c76d7-8e60-5ae2-8068-186f31638d6c
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="4fffc1a2-01d3-541c-a1cd-04d420c650f2")}catch(e){}}();
|
|
3
|
+
(self.webpackChunkaltair=self.webpackChunkaltair||[]).push([[485],{5485:(pe,j,I)=>{I.r(j),I.d(j,{GraphQLWsSubscriptionProvider:()=>ae});var g=I(26642),Y=I(82410),_=I(3881);const R=Object.prototype.hasOwnProperty;function x(e){return"object"==typeof e&&null!==e}function O(e,n){return R.call(e,n)}function W(e,n){return R.call(e,n)&&x(e[n])}function w(e,n){return R.call(e,n)&&"string"==typeof e[n]}function H(e,n){return e.length<124?e:n}const ne="graphql-transport-ws";var p=(()=>{return(e=p||(p={}))[e.InternalServerError=4500]="InternalServerError",e[e.InternalClientError=4005]="InternalClientError",e[e.BadRequest=4400]="BadRequest",e[e.BadResponse=4004]="BadResponse",e[e.Unauthorized=4401]="Unauthorized",e[e.Forbidden=4403]="Forbidden",e[e.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",e[e.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",e[e.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",e[e.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",e[e.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests",p;var e})(),c=(()=>{return(e=c||(c={})).ConnectionInit="connection_init",e.ConnectionAck="connection_ack",e.Ping="ping",e.Pong="pong",e.Subscribe="subscribe",e.Next="next",e.Error="error",e.Complete="complete",c;var e})();function v(e){if(x(e)){if(!w(e,"type"))return!1;switch(e.type){case c.ConnectionInit:case c.ConnectionAck:case c.Ping:case c.Pong:return!O(e,"payload")||void 0===e.payload||x(e.payload);case c.Subscribe:return w(e,"id")&&W(e,"payload")&&(!O(e.payload,"operationName")||null==e.payload.operationName||"string"==typeof e.payload.operationName)&&w(e.payload,"query")&&(!O(e.payload,"variables")||null==e.payload.variables||W(e.payload,"variables"))&&(!O(e.payload,"extensions")||null==e.payload.extensions||W(e.payload,"extensions"));case c.Next:return w(e,"id")&&W(e,"payload");case c.Error:return w(e,"id")&&function ee(e){return Array.isArray(e)&&e.length>0&&e.every(n=>"message"in n)}(e.payload);case c.Complete:return w(e,"id");default:return!1}}return!1}function N(e,n){if(!v(e))throw new Error("Cannot stringify invalid message");return JSON.stringify(e,n)}function L(e){return x(e)&&"code"in e&&"reason"in e}class ae extends Y.q{createClient(){this.client=function re(e){const{url:n,connectionParams:y,lazy:A=!0,onNonLazyError:z=console.error,lazyCloseTimeout:B=0,keepAlive:M=0,disablePong:se,connectionAckWaitTimeout:F=0,retryAttempts:J=5,retryWait:ce=function(){var t=(0,g.Z)(function*(s){let o=1e3;for(let a=0;a<s;a++)o*=2;yield new Promise(a=>setTimeout(a,o+Math.floor(2700*Math.random()+300)))});return function l(s){return t.apply(this,arguments)}}(),shouldRetry:le=L,isFatalConnectionProblem:Z,on:r,webSocketImpl:C,generateID:ue=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,l=>{const s=16*Math.random()|0;return("x"==l?s:3&s|8).toString(16)})},jsonMessageReplacer:D,jsonMessageReviver:de}=e;let S;if(C){if(!function ie(e){return"function"==typeof e&&"constructor"in e&&"CLOSED"in e&&"CLOSING"in e&&"CONNECTING"in e&&"OPEN"in e}(C))throw new Error("Invalid WebSocket implementation provided");S=C}else typeof WebSocket<"u"?S=WebSocket:typeof global<"u"?S=global.WebSocket||global.MozWebSocket:typeof window<"u"&&(S=window.WebSocket||window.MozWebSocket);if(!S)throw new Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");const P=S,f=(()=>{const t=(()=>{const s={};return{on:(o,a)=>(s[o]=a,()=>{delete s[o]}),emit(o){var a;"id"in o&&(null===(a=s[o.id])||void 0===a||a.call(s,o))}}})(),l={connecting:r?.connecting?[r.connecting]:[],opened:r?.opened?[r.opened]:[],connected:r?.connected?[r.connected]:[],ping:r?.ping?[r.ping]:[],pong:r?.pong?[r.pong]:[],message:r?.message?[t.emit,r.message]:[t.emit],closed:r?.closed?[r.closed]:[],error:r?.error?[r.error]:[]};return{onMessage:t.on,on(s,o){const a=l[s];return a.push(o),()=>{a.splice(a.indexOf(o),1)}},emit(s,...o){for(const a of[...l[s]])a(...o)}}})();function $(t){const l=[f.on("error",s=>{l.forEach(o=>o()),t(s)}),f.on("closed",s=>{l.forEach(o=>o()),t(s)})]}let m,h=0,U=!1,G=0,K=!1;function V(){return Q.apply(this,arguments)}function Q(){return Q=(0,g.Z)(function*(){const[t,l]=yield m??(m=new Promise((a,b)=>(0,g.Z)(function*(){if(U){if(yield ce(G),!h)return m=void 0,b({code:1e3,reason:"All Subscriptions Gone"});G++}f.emit("connecting");const i=new P("function"==typeof n?yield n():n,ne);let E,T;function q(){isFinite(M)&&M>0&&(clearTimeout(T),T=setTimeout(()=>{i.readyState===P.OPEN&&(i.send(N({type:c.Ping})),f.emit("ping",!1,void 0))},M))}$(u=>{m=void 0,clearTimeout(E),clearTimeout(T),b(u),L(u)&&4499===u.code&&(i.close(4499,"Terminated"),i.onerror=null,i.onclose=null)}),i.onerror=u=>f.emit("error",u),i.onclose=u=>f.emit("closed",u),i.onopen=(0,g.Z)(function*(){try{f.emit("opened",i);const u="function"==typeof y?yield y():y;if(i.readyState!==P.OPEN)return;i.send(N(u?{type:c.ConnectionInit,payload:u}:{type:c.ConnectionInit},D)),isFinite(F)&&F>0&&(E=setTimeout(()=>{i.close(p.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},F)),q()}catch(u){f.emit("error",u),i.close(p.InternalClientError,H(u instanceof Error?u.message:new Error(u).message,"Internal client error"))}});let k=!1;i.onmessage=({data:u})=>{try{const d=function te(e,n){if(v(e))return e;if("string"!=typeof e)throw new Error("Message not parsable");const y=JSON.parse(e,n);if(!v(y))throw new Error("Invalid message");return y}(u,de);if(f.emit("message",d),"ping"===d.type||"pong"===d.type)return f.emit(d.type,!0,d.payload),void("pong"===d.type?q():se||(i.send(N(d.payload?{type:c.Pong,payload:d.payload}:{type:c.Pong})),f.emit("pong",!1,d.payload)));if(k)return;if(d.type!==c.ConnectionAck)throw new Error(`First message cannot be of type ${d.type}`);clearTimeout(E),k=!0,f.emit("connected",i,d.payload),U=!1,G=0,a([i,new Promise((be,fe)=>$(fe))])}catch(d){i.onmessage=null,f.emit("error",d),i.close(p.BadResponse,H(d instanceof Error?d.message:new Error(d).message,"Bad response"))}}})()));t.readyState===P.CLOSING&&(yield l);let s=()=>{};const o=new Promise(a=>s=a);return[t,s,Promise.race([o.then(()=>{if(!h){const a=()=>t.close(1e3,"Normal Closure");isFinite(B)&&B>0?setTimeout(()=>{!h&&t.readyState===P.OPEN&&a()},B):a()}}),l])]}),Q.apply(this,arguments)}function X(t){if(L(t)&&(function oe(e){return![1e3,1001,1006,1005,1012,1013,1013].includes(e)&&e>=1e3&&e<=1999}(t.code)||[p.InternalServerError,p.InternalClientError,p.BadRequest,p.BadResponse,p.Unauthorized,p.SubprotocolNotAcceptable,p.SubscriberAlreadyExists,p.TooManyInitialisationRequests].includes(t.code)))throw t;if(K)return!1;if(L(t)&&1e3===t.code)return h>0;if(!J||G>=J||!le(t)||Z?.(t))throw t;return U=!0}return A||(0,g.Z)(function*(){for(h++;;)try{const[,,t]=yield V();yield t}catch(t){try{if(!X(t))return}catch(l){return z?.(l)}}})(),{on:f.on,subscribe(t,l){const s=ue();let o=!1,a=!1,b=()=>{h--,o=!0};return(0,g.Z)(function*(){for(h++;;)try{const[i,E,T]=yield V();if(o)return E();const q=f.onMessage(s,k=>{switch(k.type){case c.Next:return void l.next(k.payload);case c.Error:return a=!0,o=!0,l.error(k.payload),void b();case c.Complete:return o=!0,void b()}});return i.send(N({id:s,type:c.Subscribe,payload:t},D)),b=()=>{!o&&i.readyState===P.OPEN&&i.send(N({id:s,type:c.Complete},D)),h--,o=!0,E()},void(yield T.finally(q))}catch(i){if(!X(i))return}})().then(()=>{a||l.complete()}).catch(i=>{l.error(i)}),()=>{o||b()}},dispose:()=>(0,g.Z)(function*(){if(K=!0,m){const[t]=yield m;t.close(1e3,"Normal Closure")}})(),terminate(){m&&f.emit("closed",{code:4499,reason:"Terminated",wasClean:!1})}}}({url:this.subscriptionUrl,connectionParams:this.connectionParams,lazy:!1,onNonLazyError:n=>{this.extraOptions?.onConnected?.(n,void 0)},on:{connected:()=>{this.extraOptions?.onConnected?.(void 0,void 0)},error:n=>{this.extraOptions?.onConnected?.(n,void 0)}}})}execute(n){if(this.createClient(),!this.client)throw new Error("Could not create subscription client!");return new _.y(y=>{this.cleanup=this.client.subscribe({query:n.query,variables:n.variables,operationName:n.operationName},{next:(...A)=>y.next(...A),error:(...A)=>y.error(...A),complete:()=>y.complete()})})}close(){var n=this;return(0,g.Z)(function*(){try{n.cleanup?.(),n.cleanup=void 0,yield n.client?.dispose(),n.client=void 0}catch(y){console.error(y)}})()}}}}]);
|
|
4
|
+
//# sourceMappingURL=485.js.map
|
|
5
|
+
//# debugId=4fffc1a2-01d3-541c-a1cd-04d420c650f2
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="cc420098-ad0d-57ed-9101-d6ced7edc063")}catch(e){}}();
|
|
3
|
+
(self.webpackChunkaltair=self.webpackChunkaltair||[]).push([[494],{78486:C=>{function u(r){this.ms=(r=r||{}).min||100,this.max=r.max||1e4,this.factor=r.factor||2,this.jitter=r.jitter>0&&r.jitter<=1?r.jitter:0,this.attempts=0}C.exports=u,u.prototype.duration=function(){var r=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var o=Math.random(),O=Math.floor(o*this.jitter*r);r=1&Math.floor(10*o)?r+O:r-O}return 0|Math.min(r,this.max)},u.prototype.reset=function(){this.attempts=0},u.prototype.setMin=function(r){this.ms=r},u.prototype.setMax=function(r){this.max=r},u.prototype.setJitter=function(r){this.jitter=r}},94769:function(C,u,r){"use strict";var o=this&&this.__assign||function(){return o=Object.assign||function(c){for(var t,e=1,n=arguments.length;e<n;e++)for(var s in t=arguments[e])Object.prototype.hasOwnProperty.call(t,s)&&(c[s]=t[s]);return c},o.apply(this,arguments)},O=this&&this.__awaiter||function(c,t,e,n){return new(e||(e=Promise))(function(i,v){function E(m){try{f(n.next(m))}catch(R){v(R)}}function N(m){try{f(n.throw(m))}catch(R){v(R)}}function f(m){m.done?i(m.value):function s(i){return i instanceof e?i:new e(function(v){v(i)})}(m.value).then(E,N)}f((n=n.apply(c,t||[])).next())})},A=this&&this.__generator||function(c,t){var n,s,i,v,e={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return v={next:E(0),throw:E(1),return:E(2)},"function"==typeof Symbol&&(v[Symbol.iterator]=function(){return this}),v;function E(f){return function(m){return function N(f){if(n)throw new TypeError("Generator is already executing.");for(;e;)try{if(n=1,s&&(i=2&f[0]?s.return:f[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,f[1])).done)return i;switch(s=0,i&&(f=[2&f[0],i.value]),f[0]){case 0:case 1:i=f;break;case 4:return e.label++,{value:f[1],done:!1};case 5:e.label++,s=f[1],f=[0];continue;case 7:f=e.ops.pop(),e.trys.pop();continue;default:if(!(i=(i=e.trys).length>0&&i[i.length-1])&&(6===f[0]||2===f[0])){e=0;continue}if(3===f[0]&&(!i||f[1]>i[0]&&f[1]<i[3])){e.label=f[1];break}if(6===f[0]&&e.label<i[1]){e.label=i[1],i=f;break}if(i&&e.label<i[2]){e.label=i[2],e.ops.push(f);break}i[2]&&e.ops.pop(),e.trys.pop();continue}f=t.call(c,e)}catch(m){f=[6,m],s=0}finally{n=i=0}if(5&f[0])throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}([f,m])}}},w=this&&this.__spreadArrays||function(){for(var c=0,t=0,e=arguments.length;t<e;t++)c+=arguments[t].length;var n=Array(c),s=0;for(t=0;t<e;t++)for(var i=arguments[t],v=0,E=i.length;v<E;v++,s++)n[s]=i[v];return n};Object.defineProperty(u,"__esModule",{value:!0}),u.SubscriptionClient=void 0;var y=typeof global<"u"?global:typeof window<"u"?window:{},d=y.WebSocket||y.MozWebSocket,a=r(78486),l=r(56282),p=r(63369),I=r(64164),g=r(48779),b=r(93643),M=r(13709),h=r(96145),S=r(7051),_=r(69219),T=function(){function c(t,e,n,s){var i=e||{},v=i.connectionCallback,E=void 0===v?void 0:v,N=i.connectionParams,f=void 0===N?{}:N,m=i.minTimeout,R=void 0===m?S.MIN_WS_TIMEOUT:m,P=i.timeout,U=void 0===P?S.WS_TIMEOUT:P,L=i.reconnect,j=void 0!==L&&L,k=i.reconnectionAttempts,W=void 0===k?1/0:k,x=i.lazy,B=void 0!==x&&x,G=i.inactivityTimeout,D=void 0===G?0:G,Q=i.wsOptionArguments,K=void 0===Q?[]:Q;if(this.wsImpl=n||d,!this.wsImpl)throw new Error("Unable to find native implementation, or alternative implementation for WebSocket!");this.wsProtocols=s||h.GRAPHQL_WS,this.connectionCallback=E,this.url=t,this.operations={},this.nextOperationId=0,this.minWsTimeout=R,this.wsTimeout=U,this.unsentMessagesQueue=[],this.reconnect=j,this.reconnecting=!1,this.reconnectionAttempts=W,this.lazy=!!B,this.inactivityTimeout=D,this.closedByUser=!1,this.backoff=new a({jitter:.5}),this.eventEmitter=new l.EventEmitter,this.middlewares=[],this.client=null,this.maxConnectTimeGenerator=this.createMaxConnectTimeGenerator(),this.connectionParams=this.getConnectionParams(f),this.wsOptionArguments=K,this.lazy||this.connect()}return Object.defineProperty(c.prototype,"status",{get:function(){return null===this.client?this.wsImpl.CLOSED:this.client.readyState},enumerable:!1,configurable:!0}),c.prototype.close=function(t,e){void 0===t&&(t=!0),void 0===e&&(e=!0),this.clearInactivityTimeout(),null!==this.client&&(this.closedByUser=e,t&&(this.clearCheckConnectionInterval(),this.clearMaxConnectTimeout(),this.clearTryReconnectTimeout(),this.unsubscribeAll(),this.sendMessage(void 0,_.default.GQL_CONNECTION_TERMINATE,null)),this.client.close(),this.client.onopen=null,this.client.onclose=null,this.client.onerror=null,this.client.onmessage=null,this.client=null,this.eventEmitter.emit("disconnected"),t||this.tryReconnect())},c.prototype.request=function(t){var e,v,n=this.getObserver.bind(this),s=this.executeOperation.bind(this),i=this.unsubscribe.bind(this);return this.clearInactivityTimeout(),(e={})[M.default]=function(){return this},e.subscribe=function(E,N,f){var m=n(E,N,f);return v=s(t,function(R,P){null===R&&null===P?m.complete&&m.complete():R?m.error&&m.error(R[0]):m.next&&m.next(P)}),{unsubscribe:function(){v&&(i(v),v=null)}}},e},c.prototype.on=function(t,e,n){var s=this.eventEmitter.on(t,e,n);return function(){s.off(t,e,n)}},c.prototype.onConnected=function(t,e){return this.on("connected",t,e)},c.prototype.onConnecting=function(t,e){return this.on("connecting",t,e)},c.prototype.onDisconnected=function(t,e){return this.on("disconnected",t,e)},c.prototype.onReconnected=function(t,e){return this.on("reconnected",t,e)},c.prototype.onReconnecting=function(t,e){return this.on("reconnecting",t,e)},c.prototype.onError=function(t,e){return this.on("error",t,e)},c.prototype.unsubscribeAll=function(){var t=this;Object.keys(this.operations).forEach(function(e){t.unsubscribe(e)})},c.prototype.applyMiddlewares=function(t){var e=this;return new Promise(function(n,s){var v,E,N;v=w(e.middlewares),E=e,(N=function(f){if(f)s(f);else if(v.length>0){var m=v.shift();m&&m.applyMiddleware.apply(E,[t,N])}else n(t)})()})},c.prototype.use=function(t){var e=this;return t.map(function(n){if("function"!=typeof n.applyMiddleware)throw new Error("Middleware must implement the applyMiddleware function.");e.middlewares.push(n)}),this},c.prototype.getConnectionParams=function(t){return function(){return new Promise(function(e,n){if("function"==typeof t)try{return e(t.call(null))}catch(s){return n(s)}e(t)})}},c.prototype.executeOperation=function(t,e){var n=this;null===this.client&&this.connect();var s=this.generateOperationId();return this.operations[s]={options:t,handler:e},this.applyMiddlewares(t).then(function(i){n.checkOperationOptions(i,e),n.operations[s]&&(n.operations[s]={options:i,handler:e},n.sendMessage(s,_.default.GQL_START,i))}).catch(function(i){n.unsubscribe(s),e(n.formatErrors(i))}),s},c.prototype.getObserver=function(t,e,n){return"function"==typeof t?{next:function(s){return t(s)},error:function(s){return e&&e(s)},complete:function(){return n&&n()}}:t},c.prototype.createMaxConnectTimeGenerator=function(){return new a({min:this.minWsTimeout,max:this.wsTimeout,factor:1.2})},c.prototype.clearCheckConnectionInterval=function(){this.checkConnectionIntervalId&&(clearInterval(this.checkConnectionIntervalId),this.checkConnectionIntervalId=null)},c.prototype.clearMaxConnectTimeout=function(){this.maxConnectTimeoutId&&(clearTimeout(this.maxConnectTimeoutId),this.maxConnectTimeoutId=null)},c.prototype.clearTryReconnectTimeout=function(){this.tryReconnectTimeoutId&&(clearTimeout(this.tryReconnectTimeoutId),this.tryReconnectTimeoutId=null)},c.prototype.clearInactivityTimeout=function(){this.inactivityTimeoutId&&(clearTimeout(this.inactivityTimeoutId),this.inactivityTimeoutId=null)},c.prototype.setInactivityTimeout=function(){var t=this;this.inactivityTimeout>0&&0===Object.keys(this.operations).length&&(this.inactivityTimeoutId=setTimeout(function(){0===Object.keys(t.operations).length&&t.close()},this.inactivityTimeout))},c.prototype.checkOperationOptions=function(t,e){var n=t.query,s=t.variables,i=t.operationName;if(!n)throw new Error("Must provide a query.");if(!e)throw new Error("Must provide an handler.");if(!p.default(n)&&!b.getOperationAST(n,i)||i&&!p.default(i)||s&&!I.default(s))throw new Error("Incorrect option types. query must be a string or a document,`operationName` must be a string, and `variables` must be an object.")},c.prototype.buildMessage=function(t,e,n){return{id:t,type:e,payload:n&&n.query?o(o({},n),{query:"string"==typeof n.query?n.query:g.print(n.query)}):n}},c.prototype.formatErrors=function(t){return Array.isArray(t)?t:t&&t.errors?this.formatErrors(t.errors):t&&t.message?[t]:[{name:"FormatedError",message:"Unknown error",originalError:t}]},c.prototype.sendMessage=function(t,e,n){this.sendMessageRaw(this.buildMessage(t,e,n))},c.prototype.sendMessageRaw=function(t){switch(this.status){case this.wsImpl.OPEN:var e=JSON.stringify(t);try{JSON.parse(e)}catch{this.eventEmitter.emit("error",new Error("Message must be JSON-serializable. Got: "+t))}this.client.send(e);break;case this.wsImpl.CONNECTING:this.unsentMessagesQueue.push(t);break;default:this.reconnecting||this.eventEmitter.emit("error",new Error("A message was not sent because socket is not connected, is closing or is already closed. Message was: "+JSON.stringify(t)))}},c.prototype.generateOperationId=function(){return String(++this.nextOperationId)},c.prototype.tryReconnect=function(){var t=this;if(this.reconnect&&!(this.backoff.attempts>=this.reconnectionAttempts)){this.reconnecting||(Object.keys(this.operations).forEach(function(n){t.unsentMessagesQueue.push(t.buildMessage(n,_.default.GQL_START,t.operations[n].options))}),this.reconnecting=!0),this.clearTryReconnectTimeout();var e=this.backoff.duration();this.tryReconnectTimeoutId=setTimeout(function(){t.connect()},e)}},c.prototype.flushUnsentMessagesQueue=function(){var t=this;this.unsentMessagesQueue.forEach(function(e){t.sendMessageRaw(e)}),this.unsentMessagesQueue=[]},c.prototype.checkConnection=function(){this.wasKeepAliveReceived?this.wasKeepAliveReceived=!1:this.reconnecting||this.close(!1,!0)},c.prototype.checkMaxConnectTimeout=function(){var t=this;this.clearMaxConnectTimeout(),this.maxConnectTimeoutId=setTimeout(function(){t.status!==t.wsImpl.OPEN&&(t.reconnecting=!0,t.close(!1,!0))},this.maxConnectTimeGenerator.duration())},c.prototype.connect=function(){var t,e=this;this.client=new((t=this.wsImpl).bind.apply(t,w([void 0,this.url,this.wsProtocols],this.wsOptionArguments))),this.checkMaxConnectTimeout(),this.client.onopen=function(){return O(e,void 0,void 0,function(){var n,s;return A(this,function(i){switch(i.label){case 0:if(this.status!==this.wsImpl.OPEN)return[3,4];this.clearMaxConnectTimeout(),this.closedByUser=!1,this.eventEmitter.emit(this.reconnecting?"reconnecting":"connecting"),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.connectionParams()];case 2:return n=i.sent(),this.sendMessage(void 0,_.default.GQL_CONNECTION_INIT,n),this.flushUnsentMessagesQueue(),[3,4];case 3:return s=i.sent(),this.sendMessage(void 0,_.default.GQL_CONNECTION_ERROR,s),this.flushUnsentMessagesQueue(),[3,4];case 4:return[2]}})})},this.client.onclose=function(){e.closedByUser||e.close(!1,!1)},this.client.onerror=function(n){e.eventEmitter.emit("error",n)},this.client.onmessage=function(n){e.processReceivedData(n.data)}},c.prototype.processReceivedData=function(t){var e,n;try{n=(e=JSON.parse(t)).id}catch{throw new Error("Message must be JSON-parseable. Got: "+t)}if(-1===[_.default.GQL_DATA,_.default.GQL_COMPLETE,_.default.GQL_ERROR].indexOf(e.type)||this.operations[n])switch(e.type){case _.default.GQL_CONNECTION_ERROR:this.connectionCallback&&this.connectionCallback(e.payload);break;case _.default.GQL_CONNECTION_ACK:this.eventEmitter.emit(this.reconnecting?"reconnected":"connected",e.payload),this.reconnecting=!1,this.backoff.reset(),this.maxConnectTimeGenerator.reset(),this.connectionCallback&&this.connectionCallback();break;case _.default.GQL_COMPLETE:var s=this.operations[n].handler;delete this.operations[n],s.call(this,null,null);break;case _.default.GQL_ERROR:this.operations[n].handler(this.formatErrors(e.payload),null),delete this.operations[n];break;case _.default.GQL_DATA:var i=e.payload.errors?o(o({},e.payload),{errors:this.formatErrors(e.payload.errors)}):e.payload;this.operations[n].handler(null,i);break;case _.default.GQL_CONNECTION_KEEP_ALIVE:var v=typeof this.wasKeepAliveReceived>"u";this.wasKeepAliveReceived=!0,v&&this.checkConnection(),this.checkConnectionIntervalId&&(clearInterval(this.checkConnectionIntervalId),this.checkConnection()),this.checkConnectionIntervalId=setInterval(this.checkConnection.bind(this),this.wsTimeout);break;default:throw new Error("Invalid message type!")}else this.unsubscribe(n)},c.prototype.unsubscribe=function(t){this.operations[t]&&(delete this.operations[t],this.setInactivityTimeout(),this.sendMessage(t,_.default.GQL_STOP,void 0))},c}();u.SubscriptionClient=T},7051:(C,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.WS_TIMEOUT=u.MIN_WS_TIMEOUT=void 0,u.MIN_WS_TIMEOUT=1e3,u.WS_TIMEOUT=3e4},69219:(C,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0});var r=function(){function o(){throw new Error("Static Class")}return o.GQL_CONNECTION_INIT="connection_init",o.GQL_CONNECTION_ACK="connection_ack",o.GQL_CONNECTION_ERROR="connection_error",o.GQL_CONNECTION_KEEP_ALIVE="ka",o.GQL_CONNECTION_TERMINATE="connection_terminate",o.GQL_START="start",o.GQL_DATA="data",o.GQL_ERROR="error",o.GQL_COMPLETE="complete",o.GQL_STOP="stop",o.SUBSCRIPTION_START="subscription_start",o.SUBSCRIPTION_DATA="subscription_data",o.SUBSCRIPTION_SUCCESS="subscription_success",o.SUBSCRIPTION_FAIL="subscription_fail",o.SUBSCRIPTION_END="subscription_end",o.INIT="init",o.INIT_SUCCESS="init_success",o.INIT_FAIL="init_fail",o.KEEP_ALIVE="keepalive",o}();u.default=r},96145:(C,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.GRAPHQL_SUBSCRIPTIONS=u.GRAPHQL_WS=void 0,u.GRAPHQL_WS="graphql-ws",u.GRAPHQL_SUBSCRIPTIONS="graphql-subscriptions"},64164:(C,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.default=function r(o){return null!==o&&"object"==typeof o}},63369:(C,u)=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.default=function r(o){return"string"==typeof o}},56282:C=>{"use strict";var u=Object.prototype.hasOwnProperty,r="~";function o(){}function O(d,a,l){this.fn=d,this.context=a,this.once=l||!1}function A(d,a,l,p,I){if("function"!=typeof l)throw new TypeError("The listener must be a function");var g=new O(l,p||d,I),b=r?r+a:a;return d._events[b]?d._events[b].fn?d._events[b]=[d._events[b],g]:d._events[b].push(g):(d._events[b]=g,d._eventsCount++),d}function w(d,a){0==--d._eventsCount?d._events=new o:delete d._events[a]}function y(){this._events=new o,this._eventsCount=0}Object.create&&(o.prototype=Object.create(null),(new o).__proto__||(r=!1)),y.prototype.eventNames=function(){var l,p,a=[];if(0===this._eventsCount)return a;for(p in l=this._events)u.call(l,p)&&a.push(r?p.slice(1):p);return Object.getOwnPropertySymbols?a.concat(Object.getOwnPropertySymbols(l)):a},y.prototype.listeners=function(a){var p=this._events[r?r+a:a];if(!p)return[];if(p.fn)return[p.fn];for(var I=0,g=p.length,b=new Array(g);I<g;I++)b[I]=p[I].fn;return b},y.prototype.listenerCount=function(a){var p=this._events[r?r+a:a];return p?p.fn?1:p.length:0},y.prototype.emit=function(a,l,p,I,g,b){var M=r?r+a:a;if(!this._events[M])return!1;var _,T,h=this._events[M],S=arguments.length;if(h.fn){switch(h.once&&this.removeListener(a,h.fn,void 0,!0),S){case 1:return h.fn.call(h.context),!0;case 2:return h.fn.call(h.context,l),!0;case 3:return h.fn.call(h.context,l,p),!0;case 4:return h.fn.call(h.context,l,p,I),!0;case 5:return h.fn.call(h.context,l,p,I,g),!0;case 6:return h.fn.call(h.context,l,p,I,g,b),!0}for(T=1,_=new Array(S-1);T<S;T++)_[T-1]=arguments[T];h.fn.apply(h.context,_)}else{var t,c=h.length;for(T=0;T<c;T++)switch(h[T].once&&this.removeListener(a,h[T].fn,void 0,!0),S){case 1:h[T].fn.call(h[T].context);break;case 2:h[T].fn.call(h[T].context,l);break;case 3:h[T].fn.call(h[T].context,l,p);break;case 4:h[T].fn.call(h[T].context,l,p,I);break;default:if(!_)for(t=1,_=new Array(S-1);t<S;t++)_[t-1]=arguments[t];h[T].fn.apply(h[T].context,_)}}return!0},y.prototype.on=function(a,l,p){return A(this,a,l,p,!1)},y.prototype.once=function(a,l,p){return A(this,a,l,p,!0)},y.prototype.removeListener=function(a,l,p,I){var g=r?r+a:a;if(!this._events[g])return this;if(!l)return w(this,g),this;var b=this._events[g];if(b.fn)b.fn===l&&(!I||b.once)&&(!p||b.context===p)&&w(this,g);else{for(var M=0,h=[],S=b.length;M<S;M++)(b[M].fn!==l||I&&!b[M].once||p&&b[M].context!==p)&&h.push(b[M]);h.length?this._events[g]=1===h.length?h[0]:h:w(this,g)}return this},y.prototype.removeAllListeners=function(a){var l;return a?this._events[l=r?r+a:a]&&w(this,l):(this._events=new o,this._eventsCount=0),this},y.prototype.off=y.prototype.removeListener,y.prototype.addListener=y.prototype.on,y.prefixed=r,y.EventEmitter=y,C.exports=y},13709:(C,u,r)=>{"use strict";r.r(u),r.d(u,{default:()=>w}),C=r.hmd(C);const w=function o(y){var d,a=y.Symbol;return"function"==typeof a?a.observable?d=a.observable:(d=a("observable"),a.observable=d):d="@@observable",d}(typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:C)},76494:(C,u,r)=>{"use strict";r.r(u),r.d(u,{WebsocketSubscriptionProvider:()=>y});var o=r(82410),O=r(94769),w=r(3881);class y extends o.q{createClient(){this.client=new O.SubscriptionClient(this.subscriptionUrl,{reconnect:!0,connectionParams:this.connectionParams,connectionCallback:this.extraOptions?.onConnected})}execute(a){if(this.createClient(),!this.client)throw new Error("Could not create subscription client!");return new w.y(l=>{const p=this.client.request({query:a.query,variables:a.variables,operationName:a.operationName}).subscribe({next:(...I)=>l.next(...I),error:(...I)=>l.error(...I),complete:()=>l.complete()});this.cleanup=p.unsubscribe})}close(){this.cleanup?.(),this.cleanup=void 0,this.client?.unsubscribeAll(),this.client?.close(),this.client=void 0}}}}]);
|
|
4
|
+
//# sourceMappingURL=494.js.map
|
|
5
|
+
//# debugId=cc420098-ad0d-57ed-9101-d6ced7edc063
|