UNPKG

@peculiar/fortify-webcomponents

Version:

Web-components for creating CSR or Certificate and viewing certificates list using Fortify

63 lines (59 loc) 143 kB
var __extends=this&&this.__extends||function(){var r=function(t,n){r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,t){r.__proto__=t}||function(r,t){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n))r[n]=t[n]};return r(t,n)};return function(t,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");r(t,n);function e(){this.constructor=t}t.prototype=n===null?Object.create(n):(e.prototype=n.prototype,new e)}}();var __assign=this&&this.__assign||function(){__assign=Object.assign||function(r){for(var t,n=1,e=arguments.length;n<e;n++){t=arguments[n];for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i))r[i]=t[i]}return r};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(r,t,n,e){function i(r){return r instanceof n?r:new n((function(t){t(r)}))}return new(n||(n=Promise))((function(n,a){function u(r){try{s(e.next(r))}catch(r){a(r)}}function o(r){try{s(e["throw"](r))}catch(r){a(r)}}function s(r){r.done?n(r.value):i(r.value).then(u,o)}s((e=e.apply(r,t||[])).next())}))};var __generator=this&&this.__generator||function(r,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},e,i,a,u;return u={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function o(r){return function(t){return s([r,t])}}function s(o){if(e)throw new TypeError("Generator is already executing.");while(u&&(u=0,o[0]&&(n=0)),n)try{if(e=1,i&&(a=o[0]&2?i["return"]:o[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,o[1])).done)return a;if(i=0,a)o=[o[0]&2,a.value];switch(o[0]){case 0:case 1:a=o;break;case 4:n.label++;return{value:o[1],done:false};case 5:n.label++;i=o[1];o=[0];continue;case 7:o=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){n.label=o[1];break}if(o[0]===6&&n.label<a[1]){n.label=a[1];a=o;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(o);break}if(a[2])n.ops.pop();n.trys.pop();continue}o=t.call(r,n)}catch(r){o=[6,r];i=0}finally{e=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(r,t,n){if(n||arguments.length===2)for(var e=0,i=t.length,a;e<i;e++){if(a||!(e in t)){if(!a)a=Array.prototype.slice.call(t,0,e);a[e]=t[e]}}return r.concat(a||Array.prototype.slice.call(t))}; /*! * © Peculiar Ventures https://peculiarventures.com/ - BSD 3-Clause License */System.register(["./p-920e4680.system.js","./p-1567eb81.system.js","./p-0e5b5fce.system.js","./p-2f264b96.system.js","./p-f40583a2.system.js"],(function(r,t){"use strict";var n,e,i,a,u,o,s,c,f,v,h,l,d,p,w,m,y,g,_,b,z,A,S,E,k,C,M,P,x,H,O,j,T,R,I,N,K,D,V,U,W,B,F,Z,L,G,q,$,X,Y,Q,J,rr,tr,nr,er,ir,ar,ur,or,sr,cr,fr,vr,hr,lr,dr,pr,wr,mr,yr,gr,_r,br,zr,Ar,Sr,Er,kr,Cr,Mr,Pr,xr,Hr,Or,jr,Tr,Rr,Ir,Nr,Kr,Dr,Vr,Ur,Wr,Br,Fr,Zr,Lr,Gr;return{setters:[function(r){n=r.bj;e=r.bk;i=r.a9;a=r.a5;u=r.ah;o=r.ap;s=r.aB;c=r.a3;f=r.ax;v=r.ab;h=r.a1;l=r.J;d=r.M;p=r.bl;w=r.bm;m=r.bn;y=r.bo;g=r.bp;_=r.i;b=r.A;z=r.g;A=r.bq;S=r.br;E=r.bs;k=r.bt;C=r.bu;M=r.bv;P=r.bw;x=r.bx;H=r.by;O=r.bz;j=r.bA;T=r.bB;R=r.h;I=r.bC;N=r.bD;K=r.bE;D=r.bF;V=r.bG;U=r.bH;W=r.bI;B=r.bJ;F=r.bK;Z=r.bL;L=r.bM;G=r.bN;q=r.C;$=r.bO;X=r.a4;Y=r.bP;Q=r.bQ;J=r.a6;rr=r.ai;tr=r.aq;nr=r.aC;er=r.ay;ir=r.aa;ar=r.bR;ur=r.bS;or=r.bT;sr=r.bU;cr=r.ac;fr=r.a2;vr=r.bV;hr=r.bW;lr=r.bX;dr=r.bY;pr=r.bZ;wr=r.K;mr=r.b_;yr=r.a0;gr=r.b$;_r=r.c0;br=r.c1;zr=r.c2;Ar=r.c3;Sr=r.O;Er=r.c4;kr=r.c5;Cr=r.c6;Mr=r.c7;Pr=r.c8;xr=r.c9;Hr=r.ca;Or=r.R;jr=r.o;Tr=r.cb;Rr=r.Y;Ir=r.cc;Nr=r.cd;Kr=r.c;Dr=r.ce;Vr=r.cf;Ur=r.p;Wr=r.aD;Br=r.aE},function(r){Fr=r.a},function(r){Zr=r.h},function(r){Lr=r.g},function(r){Gr=r.T}],execute:function(){var qr;var $r=this; /** * @license * Copyright (c) Peculiar Ventures, LLC. * * This source code is licensed under the BSD 3-Clause license found in the * LICENSE file in the root directory of this source tree. */if(!Uint8Array.prototype.slice){Object.defineProperty(Uint8Array.prototype,"slice",{value:function(r,t){return new Uint8Array(Array.prototype.slice.call(this,r,t))}})}var Xr=function(){return _t($r,void 0,void 0,(function(){return __generator(this,(function(r){switch(r.label){case 0:if(!!window["protobuf"])return[3,2];return[4,t.import("./p-c4975dcc.system.js").then((function(r){return r.p}))];case 1:r.sent();r.label=2;case 2:if(!!window["WebcryptoSocket"])return[3,4];return[4,t.import("./p-e3d43531.system.js")];case 3:r.sent();r.label=4;case 4:return[2]}}))}))};var Yr=/iPhone/i;var Qr=/iPod/i;var Jr=/iPad/i;var rt=/\biOS-universal(?:.+)Mac\b/i;var tt=/\bAndroid(?:.+)Mobile\b/i;var nt=/Android/i;var et=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i;var it=/Silk/i;var at=/Windows Phone/i;var ut=/\bWindows(?:.+)ARM\b/i;var ot=/BlackBerry/i;var st=/BB10/i;var ct=/Opera Mini/i;var ft=/\b(CriOS|Chrome)(?:.+)Mobile/i;var vt=/Mobile(?:.+)Firefox\b/i;var ht=function(r){return typeof r!=="undefined"&&r.platform==="MacIntel"&&typeof r.maxTouchPoints==="number"&&r.maxTouchPoints>1&&typeof MSStream==="undefined"};function lt(r){return function(t){return t.test(r)}}function dt(r){var t={userAgent:"",platform:"",maxTouchPoints:0};if(!r&&typeof navigator!=="undefined"){t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}}else if(typeof r==="string"){t.userAgent=r}else if(r&&r.userAgent){t={userAgent:r.userAgent,platform:r.platform,maxTouchPoints:r.maxTouchPoints||0}}var n=t.userAgent;var e=n.split("[FBAN");if(typeof e[1]!=="undefined"){n=e[0]}e=n.split("Twitter");if(typeof e[1]!=="undefined"){n=e[0]}var i=lt(n);var a={apple:{phone:i(Yr)&&!i(at),ipod:i(Qr),tablet:!i(Yr)&&(i(Jr)||ht(t))&&!i(at),universal:i(rt),device:(i(Yr)||i(Qr)||i(Jr)||i(rt)||ht(t))&&!i(at)},amazon:{phone:i(et),tablet:!i(et)&&i(it),device:i(et)||i(it)},android:{phone:!i(at)&&i(et)||!i(at)&&i(tt),tablet:!i(at)&&!i(et)&&!i(tt)&&(i(it)||i(nt)),device:!i(at)&&(i(et)||i(it)||i(tt)||i(nt))||i(/\bokhttp\b/i)},windows:{phone:i(at),tablet:i(ut),device:i(at)||i(ut)},other:{blackberry:i(ot),blackberry10:i(st),opera:i(ct),firefox:i(vt),chrome:i(ft),device:i(ot)||i(st)||i(ct)||i(vt)||i(ft)},any:false,phone:false,tablet:false};a.any=a.apple.device||a.android.device||a.windows.device||a.other.device;a.phone=a.apple.phone||a.android.phone||a.windows.phone;a.tablet=a.apple.tablet||a.android.tablet||a.windows.tablet;return a} /*! ***************************************************************************** Copyright (C) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */var pt;(function(r){(function(t){var e=typeof globalThis==="object"?globalThis:typeof n==="object"?n:typeof self==="object"?self:typeof this==="object"?this:s();var i=a(r);if(typeof e.Reflect!=="undefined"){i=a(e.Reflect,i)}t(i,e);if(typeof e.Reflect==="undefined"){e.Reflect=r}function a(r,t){return function(n,e){Object.defineProperty(r,n,{configurable:true,writable:true,value:e});if(t)t(n,e)}}function u(){try{return Function("return this;")()}catch(r){}}function o(){try{return(0,eval)("(function() { return this; })()")}catch(r){}}function s(){return u()||o()}})((function(r,t){var n=Object.prototype.hasOwnProperty;var e=typeof Symbol==="function";var i=e&&typeof Symbol.toPrimitive!=="undefined"?Symbol.toPrimitive:"@@toPrimitive";var a=e&&typeof Symbol.iterator!=="undefined"?Symbol.iterator:"@@iterator";var u=typeof Object.create==="function";var o={__proto__:[]}instanceof Array;var s=!u&&!o;var c={create:u?function(){return vr(Object.create(null))}:o?function(){return vr({__proto__:null})}:function(){return vr({})},has:s?function(r,t){return n.call(r,t)}:function(r,t){return t in r},get:s?function(r,t){return n.call(r,t)?r[t]:undefined}:function(r,t){return r[t]}};var f=Object.getPrototypeOf(Function);var v=typeof Map==="function"&&typeof Map.prototype.entries==="function"?Map:sr();var h=typeof Set==="function"&&typeof Set.prototype.entries==="function"?Set:cr();var l=typeof WeakMap==="function"?WeakMap:fr();var d=e?Symbol.for("@reflect-metadata:registry"):undefined;var p=ir();var w=ar(p);function m(r,t,n,e){if(!N(n)){if(!L(r))throw new TypeError;if(!V(t))throw new TypeError;if(!V(e)&&!N(e)&&!K(e))throw new TypeError;if(K(e))e=undefined;n=Z(n);return M(r,t,n,e)}else{if(!L(r))throw new TypeError;if(!q(t))throw new TypeError;return C(r,t)}}r("decorate",m);function y(r,t){function n(n,e){if(!V(n))throw new TypeError;if(!N(e)&&!$(e))throw new TypeError;j(r,t,n,e)}return n}r("metadata",y);function g(r,t,n,e){if(!V(n))throw new TypeError;if(!N(e))e=Z(e);return j(r,t,n,e)}r("defineMetadata",g);function _(r,t,n){if(!V(t))throw new TypeError;if(!N(n))n=Z(n);return P(r,t,n)}r("hasMetadata",_);function b(r,t,n){if(!V(t))throw new TypeError;if(!N(n))n=Z(n);return x(r,t,n)}r("hasOwnMetadata",b);function z(r,t,n){if(!V(t))throw new TypeError;if(!N(n))n=Z(n);return H(r,t,n)}r("getMetadata",z);function A(r,t,n){if(!V(t))throw new TypeError;if(!N(n))n=Z(n);return O(r,t,n)}r("getOwnMetadata",A);function S(r,t){if(!V(r))throw new TypeError;if(!N(t))t=Z(t);return T(r,t)}r("getMetadataKeys",S);function E(r,t){if(!V(r))throw new TypeError;if(!N(t))t=Z(t);return R(r,t)}r("getOwnMetadataKeys",E);function k(r,t,n){if(!V(t))throw new TypeError;if(!N(n))n=Z(n);if(!V(t))throw new TypeError;if(!N(n))n=Z(n);var e=or(t,n,false);if(N(e))return false;return e.OrdinaryDeleteMetadata(r,t,n)}r("deleteMetadata",k);function C(r,t){for(var n=r.length-1;n>=0;--n){var e=r[n];var i=e(t);if(!N(i)&&!K(i)){if(!q(i))throw new TypeError;t=i}}return t}function M(r,t,n,e){for(var i=r.length-1;i>=0;--i){var a=r[i];var u=a(t,n,e);if(!N(u)&&!K(u)){if(!V(u))throw new TypeError;e=u}}return e}function P(r,t,n){var e=x(r,t,n);if(e)return true;var i=nr(t);if(!K(i))return P(r,i,n);return false}function x(r,t,n){var e=or(t,n,false);if(N(e))return false;return B(e.OrdinaryHasOwnMetadata(r,t,n))}function H(r,t,n){var e=x(r,t,n);if(e)return O(r,t,n);var i=nr(t);if(!K(i))return H(r,i,n);return undefined}function O(r,t,n){var e=or(t,n,false);if(N(e))return;return e.OrdinaryGetOwnMetadata(r,t,n)}function j(r,t,n,e){var i=or(n,e,true);i.OrdinaryDefineOwnMetadata(r,t,n,e)}function T(r,t){var n=R(r,t);var e=nr(r);if(e===null)return n;var i=T(e,t);if(i.length<=0)return n;if(n.length<=0)return i;var a=new h;var u=[];for(var o=0,s=n;o<s.length;o++){var c=s[o];var f=a.has(c);if(!f){a.add(c);u.push(c)}}for(var v=0,l=i;v<l.length;v++){var c=l[v];var f=a.has(c);if(!f){a.add(c);u.push(c)}}return u}function R(r,t){var n=or(r,t,false);if(!n){return[]}return n.OrdinaryOwnMetadataKeys(r,t)}function I(r){if(r===null)return 1;switch(typeof r){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return r===null?1:6;default:return 6}}function N(r){return r===undefined}function K(r){return r===null}function D(r){return typeof r==="symbol"}function V(r){return typeof r==="object"?r!==null:typeof r==="function"}function U(r,t){switch(I(r)){case 0:return r;case 1:return r;case 2:return r;case 3:return r;case 4:return r;case 5:return r}var n=t===3?"string":t===5?"number":"default";var e=Y(r,i);if(e!==undefined){var a=e.call(r,n);if(V(a))throw new TypeError;return a}return W(r,n==="default"?"number":n)}function W(r,t){if(t==="string"){var n=r.toString;if(G(n)){var e=n.call(r);if(!V(e))return e}var i=r.valueOf;if(G(i)){var e=i.call(r);if(!V(e))return e}}else{var i=r.valueOf;if(G(i)){var e=i.call(r);if(!V(e))return e}var a=r.toString;if(G(a)){var e=a.call(r);if(!V(e))return e}}throw new TypeError}function B(r){return!!r}function F(r){return""+r}function Z(r){var t=U(r,3);if(D(t))return t;return F(t)}function L(r){return Array.isArray?Array.isArray(r):r instanceof Object?r instanceof Array:Object.prototype.toString.call(r)==="[object Array]"}function G(r){return typeof r==="function"}function q(r){return typeof r==="function"}function $(r){switch(I(r)){case 3:return true;case 4:return true;default:return false}}function X(r,t){return r===t||r!==r&&t!==t}function Y(r,t){var n=r[t];if(n===undefined||n===null)return undefined;if(!G(n))throw new TypeError;return n}function Q(r){var t=Y(r,a);if(!G(t))throw new TypeError;var n=t.call(r);if(!V(n))throw new TypeError;return n}function J(r){return r.value}function rr(r){var t=r.next();return t.done?false:t}function tr(r){var t=r["return"];if(t)t.call(r)}function nr(r){var t=Object.getPrototypeOf(r);if(typeof r!=="function"||r===f)return t;if(t!==f)return t;var n=r.prototype;var e=n&&Object.getPrototypeOf(n);if(e==null||e===Object.prototype)return t;var i=e.constructor;if(typeof i!=="function")return t;if(i===r)return t;return i}function er(){var r;if(!N(d)&&typeof t.Reflect!=="undefined"&&!(d in t.Reflect)&&typeof t.Reflect.defineMetadata==="function"){r=ur(t.Reflect)}var n;var e;var i;var a=new l;var u={registerProvider:o,getProvider:c,setProvider:p};return u;function o(t){if(!Object.isExtensible(u)){throw new Error("Cannot add provider to a frozen registry.")}switch(true){case r===t:break;case N(n):n=t;break;case n===t:break;case N(e):e=t;break;case e===t:break;default:if(i===undefined)i=new h;i.add(t);break}}function s(t,a){if(!N(n)){if(n.isProviderFor(t,a))return n;if(!N(e)){if(e.isProviderFor(t,a))return n;if(!N(i)){var u=Q(i);while(true){var o=rr(u);if(!o){return undefined}var s=J(o);if(s.isProviderFor(t,a)){tr(u);return s}}}}}if(!N(r)&&r.isProviderFor(t,a)){return r}return undefined}function c(r,t){var n=a.get(r);var e;if(!N(n)){e=n.get(t)}if(!N(e)){return e}e=s(r,t);if(!N(e)){if(N(n)){n=new v;a.set(r,n)}n.set(t,e)}return e}function f(r){if(N(r))throw new TypeError;return n===r||e===r||!N(i)&&i.has(r)}function p(r,t,n){if(!f(n)){throw new Error("Metadata provider not registered.")}var e=c(r,t);if(e!==n){if(!N(e)){return false}var i=a.get(r);if(N(i)){i=new v;a.set(r,i)}i.set(t,n)}return true}}function ir(){var r;if(!N(d)&&V(t.Reflect)&&Object.isExtensible(t.Reflect)){r=t.Reflect[d]}if(N(r)){r=er()}if(!N(d)&&V(t.Reflect)&&Object.isExtensible(t.Reflect)){Object.defineProperty(t.Reflect,d,{enumerable:false,configurable:false,writable:false,value:r})}return r}function ar(r){var t=new l;var n={isProviderFor:function(r,n){var e=t.get(r);if(N(e))return false;return e.has(n)},OrdinaryDefineOwnMetadata:u,OrdinaryHasOwnMetadata:i,OrdinaryGetOwnMetadata:a,OrdinaryOwnMetadataKeys:o,OrdinaryDeleteMetadata:s};p.registerProvider(n);return n;function e(e,i,a){var u=t.get(e);var o=false;if(N(u)){if(!a)return undefined;u=new v;t.set(e,u);o=true}var s=u.get(i);if(N(s)){if(!a)return undefined;s=new v;u.set(i,s);if(!r.setProvider(e,i,n)){u.delete(i);if(o){t.delete(e)}throw new Error("Wrong provider for target.")}}return s}function i(r,t,n){var i=e(t,n,false);if(N(i))return false;return B(i.has(r))}function a(r,t,n){var i=e(t,n,false);if(N(i))return undefined;return i.get(r)}function u(r,t,n,i){var a=e(n,i,true);a.set(r,t)}function o(r,t){var n=[];var i=e(r,t,false);if(N(i))return n;var a=i.keys();var u=Q(a);var o=0;while(true){var s=rr(u);if(!s){n.length=o;return n}var c=J(s);try{n[o]=c}catch(r){try{tr(u)}finally{throw r}}o++}}function s(r,n,i){var a=e(n,i,false);if(N(a))return false;if(!a.delete(r))return false;if(a.size===0){var u=t.get(n);if(!N(u)){u.delete(i);if(u.size===0){t.delete(u)}}}return true}}function ur(r){var t=r.defineMetadata,n=r.hasOwnMetadata,e=r.getOwnMetadata,i=r.getOwnMetadataKeys,a=r.deleteMetadata;var u=new l;var o={isProviderFor:function(r,t){var n=u.get(r);if(!N(n)&&n.has(t)){return true}if(i(r,t).length){if(N(n)){n=new h;u.set(r,n)}n.add(t);return true}return false},OrdinaryDefineOwnMetadata:t,OrdinaryHasOwnMetadata:n,OrdinaryGetOwnMetadata:e,OrdinaryOwnMetadataKeys:i,OrdinaryDeleteMetadata:a};return o}function or(r,t,n){var e=p.getProvider(r,t);if(!N(e)){return e}if(n){if(p.setProvider(r,t,w)){return w}throw new Error("Illegal state.")}return undefined}function sr(){var r={};var t=[];var n=function(){function r(r,t,n){this._index=0;this._keys=r;this._values=t;this._selector=n}r.prototype["@@iterator"]=function(){return this};r.prototype[a]=function(){return this};r.prototype.next=function(){var r=this._index;if(r>=0&&r<this._keys.length){var n=this._selector(this._keys[r],this._values[r]);if(r+1>=this._keys.length){this._index=-1;this._keys=t;this._values=t}else{this._index++}return{value:n,done:false}}return{value:undefined,done:true}};r.prototype.throw=function(r){if(this._index>=0){this._index=-1;this._keys=t;this._values=t}throw r};r.prototype.return=function(r){if(this._index>=0){this._index=-1;this._keys=t;this._values=t}return{value:r,done:true}};return r}();var e=function(){function t(){this._keys=[];this._values=[];this._cacheKey=r;this._cacheIndex=-2}Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:true,configurable:true});t.prototype.has=function(r){return this._find(r,false)>=0};t.prototype.get=function(r){var t=this._find(r,false);return t>=0?this._values[t]:undefined};t.prototype.set=function(r,t){var n=this._find(r,true);this._values[n]=t;return this};t.prototype.delete=function(t){var n=this._find(t,false);if(n>=0){var e=this._keys.length;for(var i=n+1;i<e;i++){this._keys[i-1]=this._keys[i];this._values[i-1]=this._values[i]}this._keys.length--;this._values.length--;if(X(t,this._cacheKey)){this._cacheKey=r;this._cacheIndex=-2}return true}return false};t.prototype.clear=function(){this._keys.length=0;this._values.length=0;this._cacheKey=r;this._cacheIndex=-2};t.prototype.keys=function(){return new n(this._keys,this._values,i)};t.prototype.values=function(){return new n(this._keys,this._values,u)};t.prototype.entries=function(){return new n(this._keys,this._values,o)};t.prototype["@@iterator"]=function(){return this.entries()};t.prototype[a]=function(){return this.entries()};t.prototype._find=function(r,t){if(!X(this._cacheKey,r)){this._cacheIndex=-1;for(var n=0;n<this._keys.length;n++){if(X(this._keys[n],r)){this._cacheIndex=n;break}}}if(this._cacheIndex<0&&t){this._cacheIndex=this._keys.length;this._keys.push(r);this._values.push(undefined)}return this._cacheIndex};return t}();return e;function i(r,t){return r}function u(r,t){return t}function o(r,t){return[r,t]}}function cr(){var r=function(){function r(){this._map=new v}Object.defineProperty(r.prototype,"size",{get:function(){return this._map.size},enumerable:true,configurable:true});r.prototype.has=function(r){return this._map.has(r)};r.prototype.add=function(r){return this._map.set(r,r),this};r.prototype.delete=function(r){return this._map.delete(r)};r.prototype.clear=function(){this._map.clear()};r.prototype.keys=function(){return this._map.keys()};r.prototype.values=function(){return this._map.keys()};r.prototype.entries=function(){return this._map.entries()};r.prototype["@@iterator"]=function(){return this.keys()};r.prototype[a]=function(){return this.keys()};return r}();return r}function fr(){var r=16;var t=c.create();var e=i();return function(){function r(){this._key=i()}r.prototype.has=function(r){var t=a(r,false);return t!==undefined?c.has(t,this._key):false};r.prototype.get=function(r){var t=a(r,false);return t!==undefined?c.get(t,this._key):undefined};r.prototype.set=function(r,t){var n=a(r,true);n[this._key]=t;return this};r.prototype.delete=function(r){var t=a(r,false);return t!==undefined?delete t[this._key]:false};r.prototype.clear=function(){this._key=i()};return r}();function i(){var r;do{r="@@WeakMap@@"+s()}while(c.has(t,r));t[r]=true;return r}function a(r,t){if(!n.call(r,e)){if(!t)return undefined;Object.defineProperty(r,e,{value:c.create()})}return r[e]}function u(r,t){for(var n=0;n<t;++n)r[n]=Math.random()*255|0;return r}function o(r){if(typeof Uint8Array==="function"){var t=new Uint8Array(r);if(typeof crypto!=="undefined"){crypto.getRandomValues(t)}else if(typeof msCrypto!=="undefined"){msCrypto.getRandomValues(t)}else{u(t,r)}return t}return u(new Array(r),r)}function s(){var t=o(r);t[6]=t[6]&79|64;t[8]=t[8]&191|128;var n="";for(var e=0;e<r;++e){var i=t[e];if(e===4||e===6||e===8)n+="-";if(i<16)n+="0";n+=i.toString(16).toLowerCase()}return n}}function vr(r){r.__=undefined;delete r.__;return r}}))})(pt||(pt={}));var wt;(function(r){r[r["Transient"]=0]="Transient";r[r["Singleton"]=1]="Singleton";r[r["ResolutionScoped"]=2]="ResolutionScoped";r[r["ContainerScoped"]=3]="ContainerScoped"})(wt||(wt={}));var mt=wt;var yt="injectionTokens";function gt(r){var t=Reflect.getMetadata("design:paramtypes",r)||[];var n=Reflect.getOwnMetadata(yt,r)||{};Object.keys(n).forEach((function(r){t[+r]=n[r]}));return t} /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */function _t(r,t,n,e){function i(r){return r instanceof n?r:new n((function(t){t(r)}))}return new(n||(n=Promise))((function(n,a){function u(r){try{s(e.next(r))}catch(r){a(r)}}function o(r){try{s(e["throw"](r))}catch(r){a(r)}}function s(r){r.done?n(r.value):i(r.value).then(u,o)}s((e=e.apply(r,t||[])).next())}))}function bt(r){return!!r.useClass}function zt(r){return!!r.useFactory}var At=function(){function r(r){this.wrap=r;this.reflectMethods=["get","getPrototypeOf","setPrototypeOf","getOwnPropertyDescriptor","defineProperty","has","set","deleteProperty","apply","construct","ownKeys"]}r.prototype.createProxy=function(r){var t=this;var n={};var e=false;var i;var a=function(){if(!e){i=r(t.wrap());e=true}return i};return new Proxy(n,this.createHandler(a))};r.prototype.createHandler=function(r){var t={};var n=function(n){t[n]=function(){var t=[];for(var e=0;e<arguments.length;e++){t[e]=arguments[e]}t[0]=r();var i=Reflect[n];return i.apply(void 0,t)}};this.reflectMethods.forEach(n);return t};return r}();function St(r){return typeof r==="string"||typeof r==="symbol"}function Et(r){return typeof r==="object"&&"token"in r&&"multiple"in r}function kt(r){return typeof r==="object"&&"token"in r&&"transform"in r}function Ct(r){return typeof r==="function"||r instanceof At}function Mt(r){return!!r.useToken}function Pt(r){return r.useValue!=undefined}function xt(r){return bt(r)||Pt(r)||Mt(r)||zt(r)}var Ht=function(){function r(){this._registryMap=new Map}r.prototype.entries=function(){return this._registryMap.entries()};r.prototype.getAll=function(r){this.ensure(r);return this._registryMap.get(r)};r.prototype.get=function(r){this.ensure(r);var t=this._registryMap.get(r);return t[t.length-1]||null};r.prototype.set=function(r,t){this.ensure(r);this._registryMap.get(r).push(t)};r.prototype.setAll=function(r,t){this._registryMap.set(r,t)};r.prototype.has=function(r){this.ensure(r);return this._registryMap.get(r).length>0};r.prototype.clear=function(){this._registryMap.clear()};r.prototype.ensure=function(r){if(!this._registryMap.has(r)){this._registryMap.set(r,[])}};return r}();var Ot=function(r){__extends(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t}(Ht);var jt=function(){function r(){this.scopedResolutions=new Map}return r}();function Tt(r,t){if(r===null){return"at position #".concat(t)}var n=r.split(",")[t].trim();return'"'.concat(n,'" at position #').concat(t)}function Rt(r,t,n){if(n===void 0){n=" "}return __spreadArray([r],t.message.split("\n").map((function(r){return n+r})),true).join("\n")}function It(r,t,n){var e=r.toString().match(/constructor\(([\w, ]+)\)/)||[],i=e[1],a=i===void 0?null:i;var u=Tt(a,t);return Rt("Cannot inject the dependency ".concat(u,' of "').concat(r.name,'" constructor. Reason:'),n)}function Nt(r){if(typeof r.dispose!=="function")return false;var t=r.dispose;if(t.length>0){return false}return true}var Kt=function(r){__extends(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t}(Ht);var Dt=function(r){__extends(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t}(Ht);var Vt=function(){function r(){this.preResolution=new Kt;this.postResolution=new Dt}return r}();var Ut=new Map;var Wt=function(){function r(r){this.parent=r;this._registry=new Ot;this.interceptors=new Vt;this.disposed=false;this.disposables=new Set}r.prototype.register=function(r,t,n){if(n===void 0){n={lifecycle:mt.Transient}}this.ensureNotDisposed();var e;if(!xt(t)){e={useClass:t}}else{e=t}if(Mt(e)){var i=[r];var a=e;while(a!=null){var u=a.useToken;if(i.includes(u)){throw new Error("Token registration cycle detected! ".concat(__spreadArray(__spreadArray([],i,true),[u],false).join(" -> ")))}i.push(u);var o=this._registry.get(u);if(o&&Mt(o.provider)){a=o.provider}else{a=null}}}if(n.lifecycle===mt.Singleton||n.lifecycle==mt.ContainerScoped||n.lifecycle==mt.ResolutionScoped){if(Pt(e)||zt(e)){throw new Error('Cannot use lifecycle "'.concat(mt[n.lifecycle],'" with ValueProviders or FactoryProviders'))}}this._registry.set(r,{provider:e,options:n});return this};r.prototype.registerType=function(r,t){this.ensureNotDisposed();if(St(t)){return this.register(r,{useToken:t})}return this.register(r,{useClass:t})};r.prototype.registerInstance=function(r,t){this.ensureNotDisposed();return this.register(r,{useValue:t})};r.prototype.registerSingleton=function(r,t){this.ensureNotDisposed();if(St(r)){if(St(t)){return this.register(r,{useToken:t},{lifecycle:mt.Singleton})}else if(t){return this.register(r,{useClass:t},{lifecycle:mt.Singleton})}throw new Error('Cannot register a type name as a singleton without a "to" token')}var n=r;if(t&&!St(t)){n=t}return this.register(r,{useClass:n},{lifecycle:mt.Singleton})};r.prototype.resolve=function(r,t){if(t===void 0){t=new jt}this.ensureNotDisposed();var n=this.getRegistration(r);if(!n&&St(r)){throw new Error('Attempted to resolve unregistered dependency token: "'.concat(r.toString(),'"'))}this.executePreResolutionInterceptor(r,"Single");if(n){var e=this.resolveRegistration(n,t);this.executePostResolutionInterceptor(r,e,"Single");return e}if(Ct(r)){var e=this.construct(r,t);this.executePostResolutionInterceptor(r,e,"Single");return e}throw new Error("Attempted to construct an undefined constructor. Could mean a circular dependency problem. Try using `delay` function.")};r.prototype.executePreResolutionInterceptor=function(r,t){if(this.interceptors.preResolution.has(r)){var n=[];for(var e=0,i=this.interceptors.preResolution.getAll(r);e<i.length;e++){var a=i[e];if(a.options.frequency!="Once"){n.push(a)}a.callback(r,t)}this.interceptors.preResolution.setAll(r,n)}};r.prototype.executePostResolutionInterceptor=function(r,t,n){if(this.interceptors.postResolution.has(r)){var e=[];for(var i=0,a=this.interceptors.postResolution.getAll(r);i<a.length;i++){var u=a[i];if(u.options.frequency!="Once"){e.push(u)}u.callback(r,t,n)}this.interceptors.postResolution.setAll(r,e)}};r.prototype.resolveRegistration=function(r,t){this.ensureNotDisposed();if(r.options.lifecycle===mt.ResolutionScoped&&t.scopedResolutions.has(r)){return t.scopedResolutions.get(r)}var n=r.options.lifecycle===mt.Singleton;var e=r.options.lifecycle===mt.ContainerScoped;var i=n||e;var a;if(Pt(r.provider)){a=r.provider.useValue}else if(Mt(r.provider)){a=i?r.instance||(r.instance=this.resolve(r.provider.useToken,t)):this.resolve(r.provider.useToken,t)}else if(bt(r.provider)){a=i?r.instance||(r.instance=this.construct(r.provider.useClass,t)):this.construct(r.provider.useClass,t)}else if(zt(r.provider)){a=r.provider.useFactory(this)}else{a=this.construct(r.provider,t)}if(r.options.lifecycle===mt.ResolutionScoped){t.scopedResolutions.set(r,a)}return a};r.prototype.resolveAll=function(r,t){var n=this;if(t===void 0){t=new jt}this.ensureNotDisposed();var e=this.getAllRegistrations(r);if(!e&&St(r)){throw new Error('Attempted to resolve unregistered dependency token: "'.concat(r.toString(),'"'))}this.executePreResolutionInterceptor(r,"All");if(e){var i=e.map((function(r){return n.resolveRegistration(r,t)}));this.executePostResolutionInterceptor(r,i,"All");return i}var a=[this.construct(r,t)];this.executePostResolutionInterceptor(r,a,"All");return a};r.prototype.isRegistered=function(r,t){if(t===void 0){t=false}this.ensureNotDisposed();return this._registry.has(r)||t&&(this.parent||false)&&this.parent.isRegistered(r,true)};r.prototype.reset=function(){this.ensureNotDisposed();this._registry.clear();this.interceptors.preResolution.clear();this.interceptors.postResolution.clear()};r.prototype.clearInstances=function(){this.ensureNotDisposed();for(var r=0,t=this._registry.entries();r<t.length;r++){var n=t[r],e=n[0],i=n[1];this._registry.setAll(e,i.filter((function(r){return!Pt(r.provider)})).map((function(r){r.instance=undefined;return r})))}};r.prototype.createChildContainer=function(){this.ensureNotDisposed();var t=new r(this);for(var n=0,e=this._registry.entries();n<e.length;n++){var i=e[n],a=i[0],u=i[1];if(u.some((function(r){var t=r.options;return t.lifecycle===mt.ContainerScoped}))){t._registry.setAll(a,u.map((function(r){if(r.options.lifecycle===mt.ContainerScoped){return{provider:r.provider,options:r.options}}return r})))}}return t};r.prototype.beforeResolution=function(r,t,n){if(n===void 0){n={frequency:"Always"}}this.interceptors.preResolution.set(r,{callback:t,options:n})};r.prototype.afterResolution=function(r,t,n){if(n===void 0){n={frequency:"Always"}}this.interceptors.postResolution.set(r,{callback:t,options:n})};r.prototype.dispose=function(){return _t(this,void 0,void 0,(function(){var r;return __generator(this,(function(t){switch(t.label){case 0:this.disposed=true;r=[];this.disposables.forEach((function(t){var n=t.dispose();if(n){r.push(n)}}));return[4,Promise.all(r)];case 1:t.sent();return[2]}}))}))};r.prototype.getRegistration=function(r){if(this.isRegistered(r)){return this._registry.get(r)}if(this.parent){return this.parent.getRegistration(r)}return null};r.prototype.getAllRegistrations=function(r){if(this.isRegistered(r)){return this._registry.getAll(r)}if(this.parent){return this.parent.getAllRegistrations(r)}return null};r.prototype.construct=function(r,t){var n=this;if(r instanceof At){return r.createProxy((function(r){return n.resolve(r,t)}))}var e=function(){var e=Ut.get(r);if(!e||e.length===0){if(r.length===0){return new r}else{throw new Error('TypeInfo not known for "'.concat(r.name,'"'))}}var i=e.map(n.resolveParams(t,r));return new(r.bind.apply(r,__spreadArray([void 0],i,false)))}();if(Nt(e)){this.disposables.add(e)}return e};r.prototype.resolveParams=function(r,t){var n=this;return function(e,i){var a,u,o;try{if(Et(e)){if(kt(e)){return e.multiple?(a=n.resolve(e.transform)).transform.apply(a,__spreadArray([n.resolveAll(e.token)],e.transformArgs,false)):(u=n.resolve(e.transform)).transform.apply(u,__spreadArray([n.resolve(e.token,r)],e.transformArgs,false))}else{return e.multiple?n.resolveAll(e.token):n.resolve(e.token,r)}}else if(kt(e)){return(o=n.resolve(e.transform,r)).transform.apply(o,__spreadArray([n.resolve(e.token,r)],e.transformArgs,false))}return n.resolve(e,r)}catch(r){throw new Error(It(t,i,r))}}};r.prototype.ensureNotDisposed=function(){if(this.disposed){throw new Error("This container has been disposed, you cannot interact with a disposed container")}};return r}();var Bt=new Wt;function Ft(){return function(r){Ut.set(r,gt(r))}}if(typeof Reflect==="undefined"||!Reflect.getMetadata){throw new Error("tsyringe requires a reflect polyfill. Please add 'import \"reflect-metadata\"' to the top of your entry point.")} /*! * MIT License * * Copyright (c) Peculiar Ventures. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * */var Zt="crypto.algorithm";var Lt=function(){function r(){}r.prototype.getAlgorithms=function(){return Bt.resolveAll(Zt)};r.prototype.toAsnAlgorithm=function(r){for(var t=0,n=this.getAlgorithms();t<n.length;t++){var e=n[t];var i=e.toAsnAlgorithm(r);if(i){return i}}if(/^[0-9.]+$/.test(r.name)){var i=new p({algorithm:r.name});if("parameters"in r){var a=r;i.parameters=a.parameters}return i}throw new Error("Cannot convert WebCrypto algorithm to ASN.1 algorithm")};r.prototype.toWebAlgorithm=function(r){for(var t=0,n=this.getAlgorithms();t<n.length;t++){var e=n[t];var i=e.toWebAlgorithm(r);if(i){return i}}var a={name:r.algorithm,parameters:r.parameters};return a};return r}();var Gt="crypto.algorithmProvider";Bt.registerSingleton(Gt,Lt);var qt;var $t="1.3.36.3.3.2.8.1.1";var Xt="".concat($t,".1");var Yt="".concat($t,".2");var Qt="".concat($t,".3");var Jt="".concat($t,".4");var rn="".concat($t,".5");var tn="".concat($t,".6");var nn="".concat($t,".7");var en="".concat($t,".8");var an="".concat($t,".9");var un="".concat($t,".10");var on="".concat($t,".11");var sn="".concat($t,".12");var cn="".concat($t,".13");var fn="".concat($t,".14");var vn="brainpoolP160r1";var hn="brainpoolP160t1";var ln="brainpoolP192r1";var dn="brainpoolP192t1";var pn="brainpoolP224r1";var wn="brainpoolP224t1";var mn="brainpoolP256r1";var yn="brainpoolP256t1";var gn="brainpoolP320r1";var _n="brainpoolP320t1";var bn="brainpoolP384r1";var zn="brainpoolP384t1";var An="brainpoolP512r1";var Sn="brainpoolP512t1";var En="ECDSA";var kn=qt=function(){function r(){}r.prototype.toAsnAlgorithm=function(r){switch(r.name.toLowerCase()){case En.toLowerCase():if("hash"in r){var t=typeof r.hash==="string"?r.hash:r.hash.name;switch(t.toLowerCase()){case"sha-1":return g;case"sha-256":return y;case"sha-384":return m;case"sha-512":return w}}else if("namedCurve"in r){var n="";switch(r.namedCurve){case"P-256":n=E;break;case"K-256":n=qt.SECP256K1;break;case"P-384":n=S;break;case"P-521":n=A;break;case vn:n=Xt;break;case hn:n=Yt;break;case ln:n=Qt;break;case dn:n=Jt;break;case pn:n=rn;break;case wn:n=tn;break;case mn:n=nn;break;case yn:n=en;break;case gn:n=an;break;case _n:n=un;break;case bn:n=on;break;case zn:n=sn;break;case An:n=cn;break;case Sn:n=fn;break}if(n){return new p({algorithm:_,parameters:b.serialize(new z({namedCurve:n}))})}}}return null};r.prototype.toWebAlgorithm=function(r){switch(r.algorithm){case P:return{name:En,hash:{name:"SHA-1"}};case M:return{name:En,hash:{name:"SHA-256"}};case C:return{name:En,hash:{name:"SHA-384"}};case k:return{name:En,hash:{name:"SHA-512"}};case _:{if(!r.parameters){throw new TypeError("Cannot get required parameters from EC algorithm")}var t=b.parse(r.parameters,z);switch(t.namedCurve){case E:return{name:En,namedCurve:"P-256"};case qt.SECP256K1:return{name:En,namedCurve:"K-256"};case S:return{name:En,namedCurve:"P-384"};case A:return{name:En,namedCurve:"P-521"};case Xt:return{name:En,namedCurve:vn};case Yt:return{name:En,namedCurve:hn};case Qt:return{name:En,namedCurve:ln};case Jt:return{name:En,namedCurve:dn};case rn:return{name:En,namedCurve:pn};case tn:return{name:En,namedCurve:wn};case nn:return{name:En,namedCurve:mn};case en:return{name:En,namedCurve:yn};case an:return{name:En,namedCurve:gn};case un:return{name:En,namedCurve:_n};case on:return{name:En,namedCurve:bn};case sn:return{name:En,namedCurve:zn};case cn:return{name:En,namedCurve:An};case fn:return{name:En,namedCurve:Sn}}}}return null};return r}();kn.SECP256K1="1.3.132.0.10";kn=qt=e([Ft()],kn);Bt.registerSingleton(Zt,kn);var Cn=Symbol("name");var Mn=Symbol("value");var Pn=function(){function r(r,t,n){if(t===void 0){t={}}if(n===void 0){n=""}this[Cn]=r;this[Mn]=n;for(var e in t){this[e]=t[e]}}return r}();Pn.NAME=Cn;Pn.VALUE=Mn;var xn=function(){function r(){}r.toTextObject=function(r){var t=new Pn("Algorithm Identifier",{},Hn.toString(r.algorithm));if(r.parameters){switch(r.algorithm){case _:{var n=(new kn).toWebAlgorithm(r);if(n&&"namedCurve"in n){t["Named Curve"]=n.namedCurve}else{t["Parameters"]=r.parameters}break}default:t["Parameters"]=r.parameters}}return t};return r}();var Hn=function(){function r(){}r.toString=function(r){var t=this.items[r];if(t){return t}return r};return r}();Hn.items=(qr={},qr[x]="sha1",qr[H]="sha224",qr[O]="sha256",qr[j]="sha384",qr[T]="sha512",qr[R]="rsaEncryption",qr[I]="sha1WithRSAEncryption",qr[N]="sha224WithRSAEncryption",qr[K]="sha256WithRSAEncryption",qr[D]="sha384WithRSAEncryption",qr[V]="sha512WithRSAEncryption",qr[_]="ecPublicKey",qr[P]="ecdsaWithSHA1",qr[U]="ecdsaWithSHA224",qr[M]="ecdsaWithSHA256",qr[C]="ecdsaWithSHA384",qr[k]="ecdsaWithSHA512",qr[W]="TLS WWW server authentication",qr[B]="TLS WWW client authentication",qr[F]="Code Signing",qr[Z]="E-mail Protection",qr[L]="Time Stamping",qr[G]="OCSP Signing",qr[Fr]="Signed Data",qr);var On=function(){function r(){}r.serialize=function(r){return this.serializeObj(r).join("\n")};r.pad=function(r){if(r===void 0){r=0}return"".padStart(2*r," ")};r.serializeObj=function(r,t){if(t===void 0){t=0}var n=[];var e=this.pad(t++);var i="";var a=r[Pn.VALUE];if(a){i=" ".concat(a)}n.push("".concat(e).concat(r[Pn.NAME],":").concat(i));e=this.pad(t);for(var u in r){if(typeof u==="symbol"){continue}var o=r[u];var s=u?"".concat(u,": "):"";if(typeof o==="string"||typeof o==="number"||typeof o==="boolean"){n.push("".concat(e).concat(s).concat(o))}else if(o instanceof Date){n.push("".concat(e).concat(s).concat(o.toUTCString()))}else if(Array.isArray(o)){for(var c=0,f=o;c<f.length;c++){var v=f[c];v[Pn.NAME]=u;n.push.apply(n,this.serializeObj(v,t))}}else if(o instanceof Pn){o[Pn.NAME]=u;n.push.apply(n,this.serializeObj(o,t))}else if($.isBufferSource(o)){if(u){n.push("".concat(e).concat(s));n.push.apply(n,this.serializeBufferSource(o,t+1))}else{n.push.apply(n,this.serializeBufferSource(o,t))}}else if("toTextObject"in o){var h=o.toTextObject();h[Pn.NAME]=u;n.push.apply(n,this.serializeObj(h,t))}else{throw new TypeError("Cannot serialize data in text format. Unsupported type.")}}return n};r.serializeBufferSource=function(r,t){if(t===void 0){t=0}var n=this.pad(t);var e=$.toUint8Array(r);var i=[];for(var a=0;a<e.length;){var u=[];for(var o=0;o<16&&a<e.length;o++){if(o===8){u.push("")}var s=e[a++].toString(16).padStart(2,"0");u.push(s)}i.push("".concat(n).concat(u.join(" ")))}return i};r.serializeAlgorithm=function(r){return this.algorithmSerializer.toTextObject(r)};return r}();On.oidSerializer=Hn;On.algorithmSerializer=xn;var jn=function(){function r(){var r=[];for(var t=0;t<arguments.length;t++){r[t]=arguments[t]}if(r.length===1){var n=r[0];this.rawData=b.serialize(n);this.onInit(n)}else{var n=b.parse(r[0],r[1]);this.rawData=$.toArrayBuffer(r[0]);this.onInit(n)}}r.prototype.equal=function(t){if(t instanceof r){return Tr(t.rawData,this.rawData)}return false};r.prototype.toString=function(r){if(r===void 0){r="text"}switch(r){case"asn":return b.toString(this.rawData);case"text":return On.serialize(this.toTextObject());case"hex":return q.ToHex(this.rawData);case"base64":return q.ToBase64(this.rawData);case"base64url":return q.ToBase64Url(this.rawData);default:throw TypeError("Argument 'format' is unsupported value")}};r.prototype.getTextName=function(){var r=this.constructor;return r.NAME};r.prototype.toTextObject=function(){var r=this.toTextObjectEmpty();r[""]=this.rawData;return r};r.prototype.toTextObjectEmpty=function(r){return new Pn(this.getTextName(),{},r)};return r}();jn.NAME="ASN";var Tn=function(r){__extends(t,r);function t(){var t=[];for(var n=0;n<arguments.length;n++){t[n]=arguments[n]}var e;if($.isBufferSource(t[0])){e=$.toArrayBuffer(t[0])}else{e=b.serialize(new yr({extnID:t[0],critical:t[1],extnValue:new Sr($.toArrayBuffer(t[2]))}))}return r.call(this,e,yr)||this}t.prototype.onInit=function(r){this.type=r.extnID;this.critical=r.critical;this.value=r.extnValue.buffer};t.prototype.toTextObject=function(){var r=this.toTextObjectWithoutValue();r[""]=this.value;return r};t.prototype.toTextObjectWithoutValue=function(){var r=this.toTextObjectEmpty(this.critical?"critical":undefined);if(r[Pn.NAME]===t.NAME){r[Pn.NAME]=Hn.toString(this.type)}return r};return t}(jn);var Rn;var In=function(){function r(){this.items=new Map;this[Rn]="CryptoProvider";if(typeof self!=="undefined"&&typeof crypto!=="undefined"){this.set(r.DEFAULT,crypto)}else if(typeof global!=="undefined"&&global.crypto&&global.crypto.subtle){this.set(r.DEFAULT,global.crypto)}}r.isCryptoKeyPair=function(r){return r&&r.privateKey&&r.publicKey};r.isCryptoKey=function(r){return r&&r.usages&&r.type&&r.algorithm&&r.extractable!==undefined};r.prototype.clear=function(){this.items.clear()};r.prototype.delete=function(r){return this.items.delete(r)};r.prototype.forEach=function(r,t){return this.items.forEach(r,t)};r.prototype.has=function(r){return this.items.has(r)};Object.defineProperty(r.prototype,"size",{get:function(){return this.items.size},enumerable:false,configurable:true});r.prototype.entries=function(){return this.items.entries()};r.prototype.keys=function(){return this.items.keys()};r.prototype.values=function(){return this.items.values()};r.prototype[Symbol.iterator]=function(){return this.items[Symbol.iterator]()};r.prototype.get=function(t){if(t===void 0){t=r.DEFAULT}var n=this.items.get(t.toLowerCase());if(!n){throw new Error("Cannot get Crypto by name '".concat(t,"'"))}return n};r.prototype.set=function(t,n){if(typeof t==="string"){if(!n){throw new TypeError("Argument 'value' is required")}this.items.set(t.toLowerCase(),n)}else{this.items.set(r.DEFAULT,t)}return this};return r}();Rn=Symbol.toStringTag;In.DEFAULT="default";var Nn=new In;var Kn=/^[0-2](?:\.[1-9][0-9]*)+$/;function Dn(r){return new RegExp(Kn).test(r)}var Vn=function(){function r(r){if(r===void 0){r={}}this.items={};for(var t in r){this.register(t,r[t])}}r.prototype.get=function(r){return this.items[r]||null};r.prototype.findId=function(r){if(!Dn(r)){return this.get(r)}return r};r.prototype.register=function(r,t){this.items[r]=t;this.items[t]=r};return r}();var Un=new Vn;Un.register("CN","2.5.4.3");Un.register("L","2.5.4.7");Un.register("ST","2.5.4.8");Un.register("O","2.5.4.10");Un.register("OU","2.5.4.11");Un.register("C","2.5.4.6");Un.register("DC","0.9.2342.19200300.100.1.25");Un.register("E","1.2.840.113549.1.9.1");Un.register("G","2.5.4.42");Un.register("I","2.5.4.43");Un.register("SN","2.5.4.4");Un.register("T","2.5.4.12");function Wn(r,t){return"\\".concat(q.ToHex(q.FromUtf8String(t)).toUpperCase())}function Bn(r){return r.replace(/([,+"\\<>;])/g,"\\$1").replace(/^([ #])/,"\\$1").replace(/([ ]$)/,"\\$1").replace(/([\r\n\t])/,Wn)}var Fn=function(){function r(r,t){if(t===void 0){t={}}this.extraNames=new Vn;this.asn=new Er;for(var n in t){if(Object.prototype.hasOwnProperty.call(t,n)){var e=t[n];this.extraNames.register(n,e)}}if(typeof r==="string"){this.asn=this.fromString(r)}else if(r instanceof Er){this.asn=r}else if($.isBufferSource(r)){this.asn=b.parse(r,Er)}else{this.asn=this.fromJSON(r)}}r.isASCII=function(r){for(var t=0;t<r.length;t++){var n=r.charCodeAt(t);if(n>255){return false}}return true};r.isPrintableString=function(r){return/^[A-Za-z0-9 '()+,-./:=?]*$/g.test(r)};r.prototype.getField=function(r){var t=this.extraNames.findId(r)||Un.findId(r);var n=[];for(var e=0,i=this.asn;e<i.length;e++){var a=i[e];for(var u=0,o=a;u<o.length;u++){var s=o[u];if(s.type===t){n.push(s.value.toString())}}}return n};r.prototype.getName=function(r){return this.extraNames.get(r)||Un.get(r)};r.prototype.toString=function(){var r=this;return this.asn.map((function(t){return t.map((function(t){var n=r.getName(t.type)||t.type;var e=t.value.anyValue?"#".concat(q.ToHex(t.value.anyValue)):Bn(t.value.toString());return"".concat(n,"=").concat(e)})).join("+")})).join(", ")};r.prototype.toJSON=function(){var r;var t=[];for(var n=0,e=this.asn;n<e.length;n++){var i=e[n];var a={};for(var u=0,o=i;u<o.length;u++){var s=o[u];var c=this.getName(s.type)||s.type;(r=a[c])!==null&&r!==void 0?r:a[c]=[];a[c].push(s.value.anyValue?"#".concat(q.ToHex(s.value.anyValue)):s.value.toString())}t.push(a)}return t};r.prototype.fromString=function(r){var t=new Er;var n=/(\d\.[\d.]*\d|[A-Za-z]+)=((?:"")|(?:".*?[^\\]")|(?:[^,+].*?(?:[^\\][,+]))|(?:))([,+])?/g;var e=null;var i=",";while(e=n.exec("".concat(r,","))){var a=e[1],u=e[2];var o=u[u.length-1];if(o===","||o==="+"){u=u.slice(0,u.length-1);e[3]=o}var s=e[3];a=this.getTypeOid(a);var c=this.createAttribute(a,u);if(i==="+"){t[t.length-1].push(c)}else{t.push(new kr([c]))}i=s}return t};r.prototype.fromJSON=function(r){var t=new Er;for(var n=0,e=r;n<e.length;n++){var i=e[n];var a=new kr;for(var u in i){var o=this.getTypeOid(u);var s=i[u];for(var c=0,f=s;c<f.length;c++){var v=f[c];var h=this.createAttribute(o,v);a.push(h)}}t.push(a)}return t};r.prototype.getTypeOid=function(r){if(!/[\d.]+/.test(r)){r=this.getName(r)||""}if(!r){throw new Error("Cannot get OID for name type '".concat(r,"'"))}return r};r.prototype.createAttribute=function(t,n){var e=new Cr({type:t});if(typeof n==="object"){for(var i in n){switch(i){case"ia5String":e.value.ia5String=n[i];break;case"utf8String":e.value.utf8String=n[i];break;case"universalString":e.value.universalString=n[i];break;case"bmpString":e.value.bmpString=n[i];break;case"printableString":e.value.printableString=n[i];break}}}else if(n[0]==="#"){e.value.anyValue=q.FromHex(n.slice(1))}else{var a=this.processStringValue(n);if(t===this.getName("E")||t===this.getName("DC")){e.value.ia5String=a}else{if(r.isPrintableString(a)){e.value.printableString=a}else{e.value.utf8String=a}}}return e};r.prototype.processStringValue=function(r){var t=/"(.*?[^\\])?"/.exec(r);if(t){r=t[1]}return r.replace(/\\0a/gi,"\n").replace(/\\0d/gi,"\r").replace(/\\0g/gi,"\t").replace(/\\(.)/g,"$1")};r.prototype.toArrayBuffer=function(){return b.serialize(this.asn)};r.prototype.getThumbprint=function(){var r=[];for(var t=0;t<arguments.length;t++){r[t]=arguments[t]}return _t(this,void 0,void 0,(function(){var t,n,e;return __generator(this,(function(i){switch(i.label){case 0:e="SHA-1";if(r.length>=1&&!((t=r[0])===null||t===void 0?void 0:t.subtle)){e=r[0]||e;n=r[1]||Nn.get()}else{n=r[0]||Nn.get()}return[4,n.subtle.digest(e,this.toArrayBuffer())];case 1:return[2,i.sent()]}}))}))};return r}();r("N",Fn);var Zn="Cannot initialize GeneralName from ASN.1 data.";var Ln="".concat(Zn," Unsupported string format in use.");var Gn="".concat(Zn," Value doesn't match to GUID regular expression.");var qn=/^([0-9a-f]{8})-?([0-9a-f]{4})-?([0-9a-f]{4})-?([0-9a-f]{4})-?([0-9a-f]{12})$/i;var $n="1.3.6.1.4.1.311.25.1";var Xn="1.3.6.1.4.1.311.20.2.3";var Yn="dns";var Qn="dn";var Jn="email";var re="ip";var te="url";var ne="guid";var ee="upn";var ie="id";var ae=function(r){__extends(t,r);function t(){var t=[];for(var n=0;n<arguments.length;n++){t[n]=arguments[n]}var e;if(t.length===2){switch(t[0]){case Qn:{var i=new Fn(t[1]).toArrayBuffer();var a=b.parse(i,Er);e=new sr({directoryName:a});break}case Yn:e=new sr({dNSName:t[1]});break;case Jn:e=new sr({rfc822Name:t[1]});break;case ne:{var u=new RegExp(qn,"i").exec(t[1]);if(!u){throw new Error("Cannot parse GUID value. Value doesn't match to regular expression")}var o=u.slice(1).map((function(r,t){if(t<3){return q.ToHex(new Uint8Array(q.FromHex(r)).reverse())}return r})).join("");e=new sr({otherName:new Mr({typeId:$n,value:b.serialize(new Sr(q.FromHex(o)))})});break}case re:e=new sr({iPAddress:t[1]});break;case ie:e=new sr({registeredID:t[1]});break;case ee:{e=new sr({otherName:new Mr({typeId:Xn,value:b.serialize(Pr.toASN(t[1]))})});break}case te:e=new sr({uniformResourceIdentifier:t[1]});break;default:throw new Error("Cannot create GeneralName. Unsupported type of the n