(()=>{var bl=Object.create;var za=Object.defineProperty;var Sl=Object.getOwnPropertyDescriptor;var Tl=Object.getOwnPropertyNames;var wl=Object.getPrototypeOf,Il=Object.prototype.hasOwnProperty;var F=(e,t)=>()=>(e&&(t=e(e=0)),t);var j=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Al=(e,t)=>{for(var n in t)za(e,n,{get:t[n],enumerable:!0})},Bl=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Tl(t))!Il.call(e,a)&&a!==n&&za(e,a,{get:()=>t[a],enumerable:!(r=Sl(t,a))||r.enumerable});return e};var _l=(e,t,n)=>(n=e!=null?bl(wl(e)):{},Bl(t||!e||!e.__esModule?za(n,"default",{value:e,enumerable:!0}):n,e));function on(e,t){return function(){return e.apply(t,arguments)}}var ja=F(()=>{"use strict"});function Nl(e){return e!==null&&!un(e)&&e.constructor!==null&&!un(e.constructor)&&mt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}function kl(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&ro(e.buffer),t}function cn(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,a;if(typeof e!="object"&&(e=[e]),Nr(e))for(r=0,a=e.length;r0;)if(a=n[r],t===a.toLowerCase())return a;return null}function Qa(){let{caseless:e}=so(this)&&this||{},t={},n=(r,a)=>{let i=e&&ao(t,a)||a;zn(t[i])&&zn(r)?t[i]=Qa(t[i],r):zn(r)?t[i]=Qa({},r):Nr(r)?t[i]=r.slice():t[i]=r};for(let r=0,a=arguments.length;r{"use strict";ja();({toString:Rl}=Object.prototype),{getPrototypeOf:Xa}=Object,jn=(e=>t=>{let n=Rl.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Rt=e=>(e=e.toLowerCase(),t=>jn(t)===e),Yn=e=>t=>typeof t===e,{isArray:Nr}=Array,un=Yn("undefined");ro=Rt("ArrayBuffer");Ll=Yn("string"),mt=Yn("function"),no=Yn("number"),Qn=e=>e!==null&&typeof e=="object",Dl=e=>e===!0||e===!1,zn=e=>{if(jn(e)!=="object")return!1;let t=Xa(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Pl=Rt("Date"),Ul=Rt("File"),Ol=Rt("Blob"),Vl=Rt("FileList"),Fl=e=>Qn(e)&&mt(e.pipe),Ml=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||mt(e.append)&&((t=jn(e))==="formdata"||t==="object"&&mt(e.toString)&&e.toString()==="[object FormData]"))},Kl=Rt("URLSearchParams"),ql=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");io=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),so=e=>!un(e)&&e!==io;Hl=(e,t,n,{allOwnKeys:r}={})=>(cn(t,(a,i)=>{n&&mt(a)?e[i]=on(a,n):e[i]=a},{allOwnKeys:r}),e),Gl=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Wl=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},zl=(e,t,n,r)=>{let a,i,s,o={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),i=a.length;i-- >0;)s=a[i],(!r||r(s,e,t))&&!o[s]&&(t[s]=e[s],o[s]=!0);e=n!==!1&&Xa(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},jl=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;let r=e.indexOf(t,n);return r!==-1&&r===n},Yl=e=>{if(!e)return null;if(Nr(e))return e;let t=e.length;if(!no(t))return null;let n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Ql=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Xa(Uint8Array)),Xl=(e,t)=>{let r=(e&&e[Symbol.iterator]).call(e),a;for(;(a=r.next())&&!a.done;){let i=a.value;t.call(e,i[0],i[1])}},Zl=(e,t)=>{let n,r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Jl=Rt("HTMLFormElement"),$l=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,a){return r.toUpperCase()+a}),eo=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),ef=Rt("RegExp"),oo=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),r={};cn(n,(a,i)=>{let s;(s=t(a,i,e))!==!1&&(r[i]=s||a)}),Object.defineProperties(e,r)},tf=e=>{oo(e,(t,n)=>{if(mt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;let r=e[n];if(mt(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},rf=(e,t)=>{let n={},r=a=>{a.forEach(i=>{n[i]=!0})};return Nr(e)?r(e):r(String(e).split(t)),n},nf=()=>{},af=(e,t)=>(e=+e,Number.isFinite(e)?e:t),Ya="abcdefghijklmnopqrstuvwxyz",to="0123456789",uo={DIGIT:to,ALPHA:Ya,ALPHA_DIGIT:Ya+Ya.toUpperCase()+to},sf=(e=16,t=uo.ALPHA_DIGIT)=>{let n="",{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};uf=e=>{let t=new Array(10),n=(r,a)=>{if(Qn(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[a]=r;let i=Nr(r)?[]:{};return cn(r,(s,o)=>{let u=n(s,a+1);!un(u)&&(i[o]=u)}),t[a]=void 0,i}}return r};return n(e,0)},cf=Rt("AsyncFunction"),lf=e=>e&&(Qn(e)||mt(e))&&mt(e.then)&&mt(e.catch),I={isArray:Nr,isArrayBuffer:ro,isBuffer:Nl,isFormData:Ml,isArrayBufferView:kl,isString:Ll,isNumber:no,isBoolean:Dl,isObject:Qn,isPlainObject:zn,isUndefined:un,isDate:Pl,isFile:Ul,isBlob:Ol,isRegExp:ef,isFunction:mt,isStream:Fl,isURLSearchParams:Kl,isTypedArray:Ql,isFileList:Vl,forEach:cn,merge:Qa,extend:Hl,trim:ql,stripBOM:Gl,inherits:Wl,toFlatObject:zl,kindOf:jn,kindOfTest:Rt,endsWith:jl,toArray:Yl,forEachEntry:Xl,matchAll:Zl,isHTMLForm:Jl,hasOwnProperty:eo,hasOwnProp:eo,reduceDescriptors:oo,freezeMethods:tf,toObjectSet:rf,toCamelCase:$l,noop:nf,toFiniteNumber:af,findKey:ao,global:io,isContextDefined:so,ALPHABET:uo,generateString:sf,isSpecCompliantForm:of,toJSONObject:uf,isAsyncFn:cf,isThenable:lf}});function kr(e,t,n,r,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),a&&(this.response=a)}var co,lo,$,qt=F(()=>{"use strict";Ae();I.inherits(kr,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:I.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});co=kr.prototype,lo={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{lo[e]={value:e}});Object.defineProperties(kr,lo);Object.defineProperty(co,"isAxiosError",{value:!0});kr.from=(e,t,n,r,a,i)=>{let s=Object.create(co);return I.toFlatObject(e,s,function(u){return u!==Error.prototype},o=>o!=="isAxiosError"),kr.call(s,e.message,t,n,r,a),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};$=kr});var Xn,Za=F(()=>{Xn=null});function Ja(e){return I.isPlainObject(e)||I.isArray(e)}function po(e){return I.endsWith(e,"[]")?e.slice(0,-2):e}function fo(e,t,n){return e?e.concat(t).map(function(a,i){return a=po(a),!n&&i?"["+a+"]":a}).join(n?".":""):t}function ff(e){return I.isArray(e)&&!e.some(Ja)}function pf(e,t,n){if(!I.isObject(e))throw new TypeError("target must be an object");t=t||new(Xn||FormData),n=I.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,x){return!I.isUndefined(x[g])});let r=n.metaTokens,a=n.visitor||l,i=n.dots,s=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&I.isSpecCompliantForm(t);if(!I.isFunction(a))throw new TypeError("visitor must be a function");function c(p){if(p===null)return"";if(I.isDate(p))return p.toISOString();if(!u&&I.isBlob(p))throw new $("Blob is not supported. Use a Buffer instead.");return I.isArrayBuffer(p)||I.isTypedArray(p)?u&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function l(p,g,x){let b=p;if(p&&!x&&typeof p=="object"){if(I.endsWith(g,"{}"))g=r?g:g.slice(0,-2),p=JSON.stringify(p);else if(I.isArray(p)&&ff(p)||(I.isFileList(p)||I.endsWith(g,"[]"))&&(b=I.toArray(p)))return g=po(g),b.forEach(function(A,D){!(I.isUndefined(A)||A===null)&&t.append(s===!0?fo([g],D,i):s===null?g:g+"[]",c(A))}),!1}return Ja(p)?!0:(t.append(fo(x,g,i),c(p)),!1)}let f=[],d=Object.assign(df,{defaultVisitor:l,convertValue:c,isVisitable:Ja});function v(p,g){if(!I.isUndefined(p)){if(f.indexOf(p)!==-1)throw Error("Circular reference detected in "+g.join("."));f.push(p),I.forEach(p,function(b,w){(!(I.isUndefined(b)||b===null)&&a.call(t,b,I.isString(w)?w.trim():w,g,d))===!0&&v(b,g?g.concat(w):[w])}),f.pop()}}if(!I.isObject(e))throw new TypeError("data must be an object");return v(e),t}var df,er,ln=F(()=>{"use strict";Ae();qt();Za();df=I.toFlatObject(I,{},null,function(t){return/^is[A-Z]/.test(t)});er=pf});function ho(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function mo(e,t){this._pairs=[],e&&er(e,this,t)}var yo,Zn,$a=F(()=>{"use strict";ln();yo=mo.prototype;yo.append=function(t,n){this._pairs.push([t,n])};yo.toString=function(t){let n=t?function(r){return t.call(this,r,ho)}:ho;return this._pairs.map(function(a){return n(a[0])+"="+n(a[1])},"").join("&")};Zn=mo});function hf(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function fn(e,t,n){if(!t)return e;let r=n&&n.encode||hf,a=n&&n.serialize,i;if(a?i=a(t,n):i=I.isURLSearchParams(t)?t.toString():new Zn(t,n).toString(r),i){let s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}var ei=F(()=>{"use strict";Ae();$a()});var ti,ri,vo=F(()=>{"use strict";Ae();ti=class{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){I.forEach(this.handlers,function(r){r!==null&&t(r)})}},ri=ti});var Jn,ni=F(()=>{"use strict";Jn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}});var go,xo=F(()=>{"use strict";$a();go=typeof URLSearchParams<"u"?URLSearchParams:Zn});var Co,Eo=F(()=>{"use strict";Co=typeof FormData<"u"?FormData:null});var bo,So=F(()=>{"use strict";bo=typeof Blob<"u"?Blob:null});var To,wo=F(()=>{xo();Eo();So();To={isBrowser:!0,classes:{URLSearchParams:go,FormData:Co,Blob:bo},protocols:["http","https","file","blob","url","data"]}});var ai={};Al(ai,{hasBrowserEnv:()=>Io,hasStandardBrowserEnv:()=>mf,hasStandardBrowserWebWorkerEnv:()=>yf});var Io,mf,yf,Ao=F(()=>{Io=typeof window<"u"&&typeof document<"u",mf=(e=>Io&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),yf=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")()});var et,Lr=F(()=>{wo();Ao();et={...ai,...To}});function ii(e,t){return er(e,new et.classes.URLSearchParams,Object.assign({visitor:function(n,r,a,i){return et.isNode&&I.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}var Bo=F(()=>{"use strict";Ae();ln();Lr()});function vf(e){return I.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function gf(e){let t={},n=Object.keys(e),r,a=n.length,i;for(r=0;r=n.length;return s=!s&&I.isArray(a)?a.length:s,u?(I.hasOwnProp(a,s)?a[s]=[a[s],r]:a[s]=r,!o):((!a[s]||!I.isObject(a[s]))&&(a[s]=[]),t(n,r,a[s],i)&&I.isArray(a[s])&&(a[s]=gf(a[s])),!o)}if(I.isFormData(e)&&I.isFunction(e.entries)){let n={};return I.forEachEntry(e,(r,a)=>{t(vf(r),a,n,0)}),n}return null}var $n,si=F(()=>{"use strict";Ae();$n=xf});function Cf(e,t,n){if(I.isString(e))try{return(t||JSON.parse)(e),I.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}var oi,Dr,ea=F(()=>{"use strict";Ae();qt();ni();ln();Bo();Lr();si();oi={transitional:Jn,adapter:["xhr","http"],transformRequest:[function(t,n){let r=n.getContentType()||"",a=r.indexOf("application/json")>-1,i=I.isObject(t);if(i&&I.isHTMLForm(t)&&(t=new FormData(t)),I.isFormData(t))return a&&a?JSON.stringify($n(t)):t;if(I.isArrayBuffer(t)||I.isBuffer(t)||I.isStream(t)||I.isFile(t)||I.isBlob(t))return t;if(I.isArrayBufferView(t))return t.buffer;if(I.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return ii(t,this.formSerializer).toString();if((o=I.isFileList(t))||r.indexOf("multipart/form-data")>-1){let u=this.env&&this.env.FormData;return er(o?{"files[]":t}:t,u&&new u,this.formSerializer)}}return i||a?(n.setContentType("application/json",!1),Cf(t)):t}],transformResponse:[function(t){let n=this.transitional||oi.transitional,r=n&&n.forcedJSONParsing,a=this.responseType==="json";if(t&&I.isString(t)&&(r&&!this.responseType||a)){let s=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t)}catch(o){if(s)throw o.name==="SyntaxError"?$.from(o,$.ERR_BAD_RESPONSE,this,null,this.response):o}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:et.classes.FormData,Blob:et.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};I.forEach(["delete","get","head","post","put","patch"],e=>{oi.headers[e]={}});Dr=oi});var Ef,_o,Ro=F(()=>{"use strict";Ae();Ef=I.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),_o=e=>{let t={},n,r,a;return e&&e.split(` `).forEach(function(s){a=s.indexOf(":"),n=s.substring(0,a).trim().toLowerCase(),r=s.substring(a+1).trim(),!(!n||t[n]&&Ef[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t}});function dn(e){return e&&String(e).trim().toLowerCase()}function ta(e){return e===!1||e==null?e:I.isArray(e)?e.map(ta):String(e)}function bf(e){let t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}function ui(e,t,n,r,a){if(I.isFunction(r))return r.call(this,t,n);if(a&&(t=n),!!I.isString(t)){if(I.isString(r))return t.indexOf(r)!==-1;if(I.isRegExp(r))return r.test(t)}}function Tf(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function wf(e,t){let n=I.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(a,i,s){return this[r].call(this,t,a,i,s)},configurable:!0})})}var No,Sf,Pr,tt,xr=F(()=>{"use strict";Ae();Ro();No=Symbol("internals");Sf=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());Pr=class{constructor(t){t&&this.set(t)}set(t,n,r){let a=this;function i(o,u,c){let l=dn(u);if(!l)throw new Error("header name must be a non-empty string");let f=I.findKey(a,l);(!f||a[f]===void 0||c===!0||c===void 0&&a[f]!==!1)&&(a[f||u]=ta(o))}let s=(o,u)=>I.forEach(o,(c,l)=>i(c,l,u));return I.isPlainObject(t)||t instanceof this.constructor?s(t,n):I.isString(t)&&(t=t.trim())&&!Sf(t)?s(_o(t),n):t!=null&&i(n,t,r),this}get(t,n){if(t=dn(t),t){let r=I.findKey(this,t);if(r){let a=this[r];if(!n)return a;if(n===!0)return bf(a);if(I.isFunction(n))return n.call(this,a,r);if(I.isRegExp(n))return n.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=dn(t),t){let r=I.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||ui(this,this[r],r,n)))}return!1}delete(t,n){let r=this,a=!1;function i(s){if(s=dn(s),s){let o=I.findKey(r,s);o&&(!n||ui(r,r[o],o,n))&&(delete r[o],a=!0)}}return I.isArray(t)?t.forEach(i):i(t),a}clear(t){let n=Object.keys(this),r=n.length,a=!1;for(;r--;){let i=n[r];(!t||ui(this,this[i],i,t,!0))&&(delete this[i],a=!0)}return a}normalize(t){let n=this,r={};return I.forEach(this,(a,i)=>{let s=I.findKey(r,i);if(s){n[s]=ta(a),delete n[i];return}let o=t?Tf(i):String(i).trim();o!==i&&delete n[i],n[o]=ta(a),r[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){let n=Object.create(null);return I.forEach(this,(r,a)=>{r!=null&&r!==!1&&(n[a]=t&&I.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){let r=new this(t);return n.forEach(a=>r.set(a)),r}static accessor(t){let r=(this[No]=this[No]={accessors:{}}).accessors,a=this.prototype;function i(s){let o=dn(s);r[o]||(wf(a,s),r[o]=!0)}return I.isArray(t)?t.forEach(i):i(t),this}};Pr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);I.reduceDescriptors(Pr.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});I.freezeMethods(Pr);tt=Pr});function pn(e,t){let n=this||Dr,r=t||n,a=tt.from(r.headers),i=r.data;return I.forEach(e,function(o){i=o.call(n,i,a.normalize(),t?t.status:void 0)}),a.normalize(),i}var ko=F(()=>{"use strict";Ae();ea();xr()});function hn(e){return!!(e&&e.__CANCEL__)}var ci=F(()=>{"use strict"});function Lo(e,t,n){$.call(this,e??"canceled",$.ERR_CANCELED,t,n),this.name="CanceledError"}var tr,mn=F(()=>{"use strict";qt();Ae();I.inherits(Lo,$,{__CANCEL__:!0});tr=Lo});function li(e,t,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new $("Request failed with status code "+n.status,[$.ERR_BAD_REQUEST,$.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}var Do=F(()=>{"use strict";qt()});var Po,Uo=F(()=>{Ae();Lr();Po=et.hasStandardBrowserEnv?{write(e,t,n,r,a,i){let s=[e+"="+encodeURIComponent(t)];I.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),I.isString(r)&&s.push("path="+r),I.isString(a)&&s.push("domain="+a),i===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){let t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}}});function fi(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}var Oo=F(()=>{"use strict"});function di(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}var Vo=F(()=>{"use strict"});function yn(e,t){return e&&!fi(t)?di(e,t):t}var pi=F(()=>{"use strict";Oo();Vo()});var Fo,Mo=F(()=>{"use strict";Ae();Lr();Fo=et.hasStandardBrowserEnv?function(){let t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a"),r;function a(i){let s=i;return t&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=a(window.location.href),function(s){let o=I.isString(s)?a(s):s;return o.protocol===r.protocol&&o.host===r.host}}():function(){return function(){return!0}}()});function hi(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}var Ko=F(()=>{"use strict"});function If(e,t){e=e||10;let n=new Array(e),r=new Array(e),a=0,i=0,s;return t=t!==void 0?t:1e3,function(u){let c=Date.now(),l=r[i];s||(s=c),n[a]=u,r[a]=c;let f=i,d=0;for(;f!==a;)d+=n[f++],f=f%e;if(a=(a+1)%e,a===i&&(i=(i+1)%e),c-s{"use strict";qo=If});function Go(e,t){let n=0,r=qo(50,250);return a=>{let i=a.loaded,s=a.lengthComputable?a.total:void 0,o=i-n,u=r(o),c=i<=s;n=i;let l={loaded:i,total:s,progress:s?i/s:void 0,bytes:o,rate:u||void 0,estimated:u&&s&&c?(s-i)/u:void 0,event:a};l[t?"download":"upload"]=!0,e(l)}}var Af,Wo,zo=F(()=>{"use strict";Ae();Do();Uo();ei();pi();Mo();ni();qt();mn();Ko();Lr();xr();Ho();Af=typeof XMLHttpRequest<"u",Wo=Af&&function(e){return new Promise(function(n,r){let a=e.data,i=tt.from(e.headers).normalize(),{responseType:s,withXSRFToken:o}=e,u;function c(){e.cancelToken&&e.cancelToken.unsubscribe(u),e.signal&&e.signal.removeEventListener("abort",u)}let l;if(I.isFormData(a)){if(et.hasStandardBrowserEnv||et.hasStandardBrowserWebWorkerEnv)i.setContentType(!1);else if((l=i.getContentType())!==!1){let[g,...x]=l?l.split(";").map(b=>b.trim()).filter(Boolean):[];i.setContentType([g||"multipart/form-data",...x].join("; "))}}let f=new XMLHttpRequest;if(e.auth){let g=e.auth.username||"",x=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(g+":"+x))}let d=yn(e.baseURL,e.url);f.open(e.method.toUpperCase(),fn(d,e.params,e.paramsSerializer),!0),f.timeout=e.timeout;function v(){if(!f)return;let g=tt.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),b={data:!s||s==="text"||s==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:g,config:e,request:f};li(function(A){n(A),c()},function(A){r(A),c()},b),f=null}if("onloadend"in f?f.onloadend=v:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(v)},f.onabort=function(){f&&(r(new $("Request aborted",$.ECONNABORTED,e,f)),f=null)},f.onerror=function(){r(new $("Network Error",$.ERR_NETWORK,e,f)),f=null},f.ontimeout=function(){let x=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",b=e.transitional||Jn;e.timeoutErrorMessage&&(x=e.timeoutErrorMessage),r(new $(x,b.clarifyTimeoutError?$.ETIMEDOUT:$.ECONNABORTED,e,f)),f=null},et.hasStandardBrowserEnv&&(o&&I.isFunction(o)&&(o=o(e)),o||o!==!1&&Fo(d))){let g=e.xsrfHeaderName&&e.xsrfCookieName&&Po.read(e.xsrfCookieName);g&&i.set(e.xsrfHeaderName,g)}a===void 0&&i.setContentType(null),"setRequestHeader"in f&&I.forEach(i.toJSON(),function(x,b){f.setRequestHeader(b,x)}),I.isUndefined(e.withCredentials)||(f.withCredentials=!!e.withCredentials),s&&s!=="json"&&(f.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&f.addEventListener("progress",Go(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&f.upload&&f.upload.addEventListener("progress",Go(e.onUploadProgress)),(e.cancelToken||e.signal)&&(u=g=>{f&&(r(!g||g.type?new tr(null,e,f):g),f.abort(),f=null)},e.cancelToken&&e.cancelToken.subscribe(u),e.signal&&(e.signal.aborted?u():e.signal.addEventListener("abort",u)));let p=hi(d);if(p&&et.protocols.indexOf(p)===-1){r(new $("Unsupported protocol "+p+":",$.ERR_BAD_REQUEST,e));return}f.send(a||null)})}});var mi,jo,Bf,ra,yi=F(()=>{Ae();Za();zo();qt();mi={http:Xn,xhr:Wo};I.forEach(mi,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});jo=e=>`- ${e}`,Bf=e=>I.isFunction(e)||e===null||e===!1,ra={getAdapter:e=>{e=I.isArray(e)?e:[e];let{length:t}=e,n,r,a={};for(let i=0;i`adapter ${o} `+(u===!1?"is not supported by the environment":"is not available in the build")),s=t?i.length>1?`since : `+i.map(jo).join(` `):" "+jo(i[0]):"as no adapter specified";throw new $("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:mi}});function vi(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new tr(null,e)}function na(e){return vi(e),e.headers=tt.from(e.headers),e.data=pn.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ra.getAdapter(e.adapter||Dr.adapter)(e).then(function(r){return vi(e),r.data=pn.call(e,e.transformResponse,r),r.headers=tt.from(r.headers),r},function(r){return hn(r)||(vi(e),r&&r.response&&(r.response.data=pn.call(e,e.transformResponse,r.response),r.response.headers=tt.from(r.response.headers))),Promise.reject(r)})}var Yo=F(()=>{"use strict";ko();ci();ea();mn();xr();yi()});function Ht(e,t){t=t||{};let n={};function r(c,l,f){return I.isPlainObject(c)&&I.isPlainObject(l)?I.merge.call({caseless:f},c,l):I.isPlainObject(l)?I.merge({},l):I.isArray(l)?l.slice():l}function a(c,l,f){if(I.isUndefined(l)){if(!I.isUndefined(c))return r(void 0,c,f)}else return r(c,l,f)}function i(c,l){if(!I.isUndefined(l))return r(void 0,l)}function s(c,l){if(I.isUndefined(l)){if(!I.isUndefined(c))return r(void 0,c)}else return r(void 0,l)}function o(c,l,f){if(f in t)return r(c,l);if(f in e)return r(void 0,c)}let u={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:o,headers:(c,l)=>a(Qo(c),Qo(l),!0)};return I.forEach(Object.keys(Object.assign({},e,t)),function(l){let f=u[l]||a,d=f(e[l],t[l],l);I.isUndefined(d)&&f!==o||(n[l]=d)}),n}var Qo,gi=F(()=>{"use strict";Ae();xr();Qo=e=>e instanceof tt?e.toJSON():e});var aa,xi=F(()=>{aa="1.6.2"});function _f(e,t,n){if(typeof e!="object")throw new $("options must be an object",$.ERR_BAD_OPTION_VALUE);let r=Object.keys(e),a=r.length;for(;a-- >0;){let i=r[a],s=t[i];if(s){let o=e[i],u=o===void 0||s(o,i,e);if(u!==!0)throw new $("option "+i+" must be "+u,$.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new $("Unknown option "+i,$.ERR_BAD_OPTION)}}var Ci,Xo,ia,Zo=F(()=>{"use strict";xi();qt();Ci={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ci[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});Xo={};Ci.transitional=function(t,n,r){function a(i,s){return"[Axios v"+aa+"] Transitional option '"+i+"'"+s+(r?". "+r:"")}return(i,s,o)=>{if(t===!1)throw new $(a(s," has been removed"+(n?" in "+n:"")),$.ERR_DEPRECATED);return n&&!Xo[s]&&(Xo[s]=!0,console.warn(a(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,s,o):!0}};ia={assertOptions:_f,validators:Ci}});var rr,Ur,vn,Jo=F(()=>{"use strict";Ae();ei();vo();Yo();gi();pi();Zo();xr();rr=ia.validators,Ur=class{constructor(t){this.defaults=t,this.interceptors={request:new ri,response:new ri}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Ht(this.defaults,n);let{transitional:r,paramsSerializer:a,headers:i}=n;r!==void 0&&ia.assertOptions(r,{silentJSONParsing:rr.transitional(rr.boolean),forcedJSONParsing:rr.transitional(rr.boolean),clarifyTimeoutError:rr.transitional(rr.boolean)},!1),a!=null&&(I.isFunction(a)?n.paramsSerializer={serialize:a}:ia.assertOptions(a,{encode:rr.function,serialize:rr.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=i&&I.merge(i.common,i[n.method]);i&&I.forEach(["delete","get","head","post","put","patch","common"],p=>{delete i[p]}),n.headers=tt.concat(s,i);let o=[],u=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(u=u&&g.synchronous,o.unshift(g.fulfilled,g.rejected))});let c=[];this.interceptors.response.forEach(function(g){c.push(g.fulfilled,g.rejected)});let l,f=0,d;if(!u){let p=[na.bind(this),void 0];for(p.unshift.apply(p,o),p.push.apply(p,c),d=p.length,l=Promise.resolve(n);f{"use strict";mn();gn=class{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});let r=this;this.promise.then(a=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](a);r._listeners=null}),this.promise.then=a=>{let i,s=new Promise(o=>{r.subscribe(o),i=o}).then(a);return s.cancel=function(){r.unsubscribe(i)},s},t(function(i,s,o){r.reason||(r.reason=new tr(i,s,o),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;let n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new gn(function(a){t=a}),cancel:t}}},$o=gn});function Ei(e){return function(n){return e.apply(null,n)}}var t0=F(()=>{"use strict"});function bi(e){return I.isObject(e)&&e.isAxiosError===!0}var r0=F(()=>{"use strict";Ae()});var Si,n0,a0=F(()=>{Si={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Si).forEach(([e,t])=>{Si[t]=e});n0=Si});function i0(e){let t=new vn(e),n=on(vn.prototype.request,t);return I.extend(n,vn.prototype,t,{allOwnKeys:!0}),I.extend(n,t,null,{allOwnKeys:!0}),n.create=function(a){return i0(Ht(e,a))},n}var Be,Or,s0=F(()=>{"use strict";Ae();ja();Jo();gi();ea();si();mn();e0();ci();xi();ln();qt();t0();r0();xr();yi();a0();Be=i0(Dr);Be.Axios=vn;Be.CanceledError=tr;Be.CancelToken=$o;Be.isCancel=hn;Be.VERSION=aa;Be.toFormData=er;Be.AxiosError=$;Be.Cancel=Be.CanceledError;Be.all=function(t){return Promise.all(t)};Be.spread=Ei;Be.isAxiosError=bi;Be.mergeConfig=Ht;Be.AxiosHeaders=tt;Be.formToJSON=e=>$n(I.isHTMLForm(e)?new FormData(e):e);Be.getAdapter=ra.getAdapter;Be.HttpStatusCode=n0;Be.default=Be;Or=Be});var L1,D1,P1,U1,O1,V1,F1,M1,K1,q1,H1,G1,W1,z1,j1,Y1,o0=F(()=>{s0();({Axios:L1,AxiosError:D1,CanceledError:P1,isCancel:U1,CancelToken:O1,VERSION:V1,all:F1,Cancel:M1,isAxiosError:K1,spread:q1,toFormData:H1,AxiosHeaders:G1,HttpStatusCode:W1,formToJSON:z1,getAdapter:j1,mergeConfig:Y1}=Or)});var Ti,Je,sa=F(()=>{Ti=class{constructor(t=!1){this.debugMode=t}setDebugMode(t){this.debugMode=t}log(t,...n){this.debugMode&&console.log(`[LOG] ${t}`,...n)}debug(t,...n){this.debugMode&&console.log(`[DEBUG] ${t}`,...n)}info(t,...n){this.debugMode&&console.info(`[INFO] ${t}`,...n)}warn(t,...n){this.debugMode&&console.warn(`[WARN] ${t}`,...n)}error(t,...n){this.debugMode&&console.error(`[ERROR] ${t}`,...n)}},Je=new Ti(!1)});function u0(e){oa={...oa,...e},Je.setDebugMode(oa?.debug===!0)}function Gt(){return oa}var oa,xn=F(()=>{sa();oa={api:{},collector:{},dataCapture:{autoCapture:!1,consoleListener:!0,sessionReplay:{enabled:!1}},debug:!1}});var nr,Nt,Cn=F(()=>{nr=class{constructor(){this.errors=[]}static getInstance(){return nr.instance||(nr.instance=new nr),nr.instance}addError(t,n){this.errors.push({message:t,error:n})}getErrors(){return this.errors}},Nt=nr.getInstance()});function wi(){if(!ua&&(ua=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ua))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ua(Rf)}var ua,Rf,c0=F(()=>{Rf=new Uint8Array(16)});function l0(e,t=0){return(Pe[e[t+0]]+Pe[e[t+1]]+Pe[e[t+2]]+Pe[e[t+3]]+"-"+Pe[e[t+4]]+Pe[e[t+5]]+"-"+Pe[e[t+6]]+Pe[e[t+7]]+"-"+Pe[e[t+8]]+Pe[e[t+9]]+"-"+Pe[e[t+10]]+Pe[e[t+11]]+Pe[e[t+12]]+Pe[e[t+13]]+Pe[e[t+14]]+Pe[e[t+15]]).toLowerCase()}var Pe,f0=F(()=>{Pe=[];for(let e=0;e<256;++e)Pe.push((e+256).toString(16).slice(1))});var Nf,Ii,d0=F(()=>{Nf=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Ii={randomUUID:Nf}});function kf(e,t,n){if(Ii.randomUUID&&!t&&!e)return Ii.randomUUID();e=e||{};let r=e.random||(e.rng||wi)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let a=0;a<16;++a)t[n+a]=r[a];return t}return l0(r)}var Vr,p0=F(()=>{d0();c0();f0();Vr=kf});var h0=F(()=>{p0()});var Ai,Lf,En,Bi=F(()=>{h0();Cn();Ai=class{constructor(t=30){this.requestId=Vr();this.ttlInMinutes=t}clearSession(){localStorage.removeItem("session")}initializeSession(){try{let t=localStorage.getItem("session");if(t){let{sessionId:a,requestId:i,timestamp:s,identity:o}=JSON.parse(t),u=new Date().getTime();if(u-s0&&i[i.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]{_i=function(e,t){return _i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(n[a]=r[a])},_i(e,t)};bn=function(){return bn=Object.assign||function(t){for(var n,r=1,a=arguments.length;r0){var r=e[n].toLowerCase();r!==e[n]?t+=" ".concat(r):t+=e[n]}else t+=e[n].toUpperCase();return t}function Df(e,t){return function(n,r){return Object.prototype.hasOwnProperty.call(n,r)}(e,t)?e[t]:void 0}function ad(e,t){var n=[];return function(r,a){var i=5,s=(d=r,v=wn([],d,!0),{current:function(){return v[0]},postpone:function(){var g=v.shift();g!==void 0&&v.push(g)},exclude:function(){v.shift()}}),o=(c=100,l=3e3,f=0,function(){return Math.random()*Math.min(l,c*Math.pow(2,f++))}),u=s.current(),c,l,f,d,v;if(u===void 0)return Promise.reject(new TypeError("The list of script URL patterns is empty"));var p=function(g,x){return a(g).catch(function(b){if(x+1>=i)throw b;(function(D){if(!(D instanceof Error))return!1;var k=D.message;return k===Ni||k===Li})(b)?s.exclude():s.postpone();var w,A=s.current();if(A===void 0)throw b;return(w=o(),new Promise(function(D){return setTimeout(D,w)})).then(function(){return p(A,x+1)})})};return p(u,0)}(e,function(r){var a=new Date,i=function(o){return n.push({url:r,startedAt:a,finishedAt:new Date,error:o})},s=t(r);return s.then(function(){return i()},i),s}).then(function(r){return[r,n]})}function sd(e){var t;e.scriptUrlPattern;var n=e.token,r=e.apiKey,a=r===void 0?n:r,i=y0(e,["scriptUrlPattern","token","apiKey"]),s=(t=Df(e,"scriptUrlPattern"))!==null&&t!==void 0?t:x0,o=function(){var l=[],f=function(){l.push({time:new Date,state:document.visibilityState})},d=function(v,p,g,x){return v.addEventListener(p,g,x),function(){return v.removeEventListener(p,g,x)}}(document,"visibilitychange",f);return f(),[l,d]}(),u=o[0],c=o[1];return Promise.resolve().then(function(){if(!a||typeof a!="string")throw new Error(ki);var l=function(f,d){return(Array.isArray(f)?f:[f]).map(function(v){return function(p,g){var x=encodeURIComponent;return p.replace(/<[^<>]+>/g,function(b){return b===""?"3":b===""?x(g):b===""?x(nd):b})}(String(v),d)})}(s,a);return ad(l,od)}).catch(function(l){throw c(),function(f){return f instanceof Error&&f.message===Li?new Error(Di):f}(l)}).then(function(l){var f=l[0],d=l[1];return c(),f.load(bn(bn({},i),{ldi:{attempts:d,visibilityStates:u}}))})}function od(e){return function(t,n,r,a){var i,s=document,o="securitypolicyviolation",u=function(l){var f=new URL(t,location.href),d=l.blockedURI;d!==f.href&&d!==f.protocol.slice(0,-1)&&d!==f.origin||(i=l,c())};s.addEventListener(o,u);var c=function(){return s.removeEventListener(o,u)};return a?.then(c,c),Promise.resolve().then(n).then(function(l){return c(),l},function(l){return new Promise(function(f){return setTimeout(f)}).then(function(){if(c(),i)return r(i);throw l})})}(e,function(){return function(t){return new Promise(function(n,r){var a=document.createElement("script"),i=function(){var o;return(o=a.parentNode)===null||o===void 0?void 0:o.removeChild(a)},s=document.head||document.getElementsByTagName("head")[0];a.onload=function(){i(),n()},a.onerror=function(){i(),r(new Error(Di))},a.async=!0,a.src=t,s.appendChild(a)})}(e)},function(){throw new Error(Ni)}).then(ud)}function ud(){var e=window,t="__fpjs_p_l_b",n=e[t];if(function(r,a){var i,s=(i=Object.getOwnPropertyDescriptor)===null||i===void 0?void 0:i.call(Object,r,a);s?.configurable?delete r[a]:s&&!s.writable||(r[a]=void 0)}(e,t),typeof n?.load!="function")throw new Error(Li);return n}var Pf,Uf,Of,Vf,Ff,Mf,Ni,Kf,qf,Hf,Gf,Wf,zf,jf,ki,v0,g0,Yf,Qf,Xf,Zf,Jf,$f,ed,td,rd,nd,Li,x0,id,Di,C0,E0=F(()=>{Ri();Pf={default:"endpoint"},Uf={default:"tlsEndpoint"},Of="Client timeout",Vf="Network connection error",Ff="Network request aborted",Mf="Response cannot be parsed",Ni="Blocked by CSP",Kf="The endpoint parameter is not a valid URL",qf=Fr("WrongRegion"),Hf=Fr("SubscriptionNotActive"),Gf=Fr("UnsupportedVersion"),Wf=Fr("InstallationMethodRestricted"),zf=Fr("HostnameRestricted"),jf=Fr("IntegrationFailed"),ki="API key required",v0="API key not found",g0="API key expired",Yf="Request cannot be parsed",Qf="Request failed",Xf="Request failed to process",Zf="Too many requests, rate limit exceeded",Jf="Not available for this origin",$f="Not available with restricted header",ed=ki,td=v0,rd=g0,nd="3.8.6",Li="9319";x0="https://fpnpmcdn.net/v//loader_v.js",id=x0,Di="Failed to load the JS script of the agent";C0={load:sd,defaultScriptUrlPattern:id,ERROR_SCRIPT_LOAD_FAIL:Di,ERROR_API_KEY_EXPIRED:g0,ERROR_API_KEY_INVALID:v0,ERROR_API_KEY_MISSING:ki,ERROR_BAD_REQUEST_FORMAT:Yf,ERROR_BAD_RESPONSE_FORMAT:Mf,ERROR_CLIENT_TIMEOUT:Of,ERROR_CSP_BLOCK:Ni,ERROR_FORBIDDEN_ENDPOINT:zf,ERROR_FORBIDDEN_HEADER:$f,ERROR_FORBIDDEN_ORIGIN:Jf,ERROR_GENERAL_SERVER_FAILURE:Qf,ERROR_INSTALLATION_METHOD_RESTRICTED:Wf,ERROR_INTEGRATION_FAILURE:jf,ERROR_INVALID_ENDPOINT:Kf,ERROR_NETWORK_ABORT:Ff,ERROR_NETWORK_CONNECTION:Vf,ERROR_RATE_LIMIT:Zf,ERROR_SERVER_TIMEOUT:Xf,ERROR_SUBSCRIPTION_NOT_ACTIVE:Hf,ERROR_TOKEN_EXPIRED:rd,ERROR_TOKEN_INVALID:td,ERROR_TOKEN_MISSING:ed,ERROR_UNSUPPORTED_VERSION:Gf,ERROR_WRONG_REGION:qf,defaultEndpoint:Pf,defaultTlsEndpoint:Uf}});function zt(e,t,n,r){return new(n||(n=Promise))(function(a,i){function s(c){try{u(r.next(c))}catch(l){i(l)}}function o(c){try{u(r.throw(c))}catch(l){i(l)}}function u(c){var l;c.done?a(c.value):(l=c.value,l instanceof n?l:new n(function(f){f(l)})).then(s,o)}u((r=r.apply(e,t||[])).next())})}function jt(e,t){var n,r,a,i,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function o(u){return function(c){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(s=0)),s;)try{if(n=1,r&&(a=2&l[0]?r.return:l[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,l[1])).done)return a;switch(r=0,a&&(l=[2&l[0],a.value]),l[0]){case 0:case 1:a=l;break;case 4:return s.label++,{value:l[1],done:!1};case 5:s.label++,r=l[1],l=[0];continue;case 7:l=s.ops.pop(),s.trys.pop();continue;default:if(a=s.trys,!((a=a.length>0&&a[a.length-1])||l[0]!==6&&l[0]!==2)){s=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]=a+n?(a=s,[4,Bn(0)]):[3,3]):[3,4];case 2:o.sent(),o.label=3;case 3:return++i,[3,1];case 4:return[2,r]}})})}function An(e){e.then(void 0,function(){})}function ar(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var n=[0,0,0,0];return n[3]+=e[3]+t[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=e[2]+t[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=e[1]+t[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=e[0]+t[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]}function yt(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var n=[0,0,0,0];return n[3]+=e[3]*t[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=e[2]*t[3],n[1]+=n[2]>>>16,n[2]&=65535,n[2]+=e[3]*t[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=e[1]*t[3],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=e[2]*t[2],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=e[3]*t[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=e[0]*t[3]+e[1]*t[2]+e[2]*t[1]+e[3]*t[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]}function Mr(e,t){return(t%=64)===32?[e[1],e[0]]:t<32?[e[0]<>>32-t,e[1]<>>32-t]:(t-=32,[e[1]<>>32-t,e[0]<>>32-t])}function ft(e,t){return(t%=64)===0?e:t<32?[e[0]<>>32-t,e[1]<>>1]),e=Ee(e=yt(e,[4283543511,3981806797]),[0,e[0]>>>1]),e=Ee(e=yt(e,[3301882366,444984403]),[0,e[0]>>>1])}function cd(e,t){t=t||0;var n,r=(e=e||"").length%16,a=e.length-r,i=[0,t],s=[0,t],o=[0,0],u=[0,0],c=[2277735313,289559509],l=[1291169091,658871167];for(n=0;n>>0).toString(16)).slice(-8)+("00000000"+(i[1]>>>0).toString(16)).slice(-8)+("00000000"+(s[0]>>>0).toString(16)).slice(-8)+("00000000"+(s[1]>>>0).toString(16)).slice(-8)}function Pi(e){return parseInt(e)}function St(e){return parseFloat(e)}function Wt(e,t){return typeof e=="number"&&isNaN(e)?t:e}function Tt(e){return e.reduce(function(t,n){return t+(n?1:0)},0)}function U0(e,t){if(t===void 0&&(t=1),Math.abs(t)>=1)return Math.round(e/t)*t;var n=1/t;return Math.round(e*n)/n}function w0(e){return e&&typeof e=="object"&&"message"in e?e:{message:e}}function ld(e){return typeof e!="function"}function fd(e,t,n){var r=Object.keys(e).filter(function(i){return!function(s,o){for(var u=0,c=s.length;u=4}function dd(){var e=window,t=navigator;return Tt(["msWriteProfilerMark"in e,"MSStream"in e,"msLaunchUri"in t,"msSaveBlob"in t])>=3&&!O0()}function qi(){var e=window,t=navigator;return Tt(["webkitPersistentStorage"in t,"webkitTemporaryStorage"in t,t.vendor.indexOf("Google")===0,"webkitResolveLocalFileSystemURL"in e,"BatteryManager"in e,"webkitMediaStream"in e,"webkitSpeechGrammar"in e])>=5}function In(){var e=window,t=navigator;return Tt(["ApplePayError"in e,"CSSPrimitiveValue"in e,"Counter"in e,t.vendor.indexOf("Apple")===0,"getStorageUpdates"in t,"WebKitMediaKeys"in e])>=4}function Hi(){var e=window;return Tt(["safari"in e,!("DeviceMotionEvent"in e),!("ongestureend"in e),!("standalone"in navigator)])>=3}function pd(){var e,t,n=window;return Tt(["buildID"in navigator,"MozAppearance"in((t=(e=document.documentElement)===null||e===void 0?void 0:e.style)!==null&&t!==void 0?t:{}),"onmozfullscreenchange"in n,"mozInnerScreenX"in n,"CSSMozDocumentRule"in n,"CanvasCaptureMediaStream"in n])>=4}function hd(){var e=document;return e.fullscreenElement||e.msFullscreenElement||e.mozFullScreenElement||e.webkitFullscreenElement||null}function V0(){var e=qi(),t=pd();if(!e&&!t)return!1;var n=window;return Tt(["onorientationchange"in n,"orientation"in n,e&&!("SharedWorker"in n),t&&/android/i.test(navigator.appVersion)])>=2}function I0(e){var t=new Error(e);return t.name=e,t}function A0(e,t,n){var r,a,i;return n===void 0&&(n=50),zt(this,void 0,void 0,function(){var s,o;return jt(this,function(u){switch(u.label){case 0:s=document,u.label=1;case 1:return s.body?[3,3]:[4,Bn(n)];case 2:return u.sent(),[3,1];case 3:o=s.createElement("iframe"),u.label=4;case 4:return u.trys.push([4,,10,11]),[4,new Promise(function(c,l){var f=!1,d=function(){f=!0,c()};o.onload=d,o.onerror=function(g){f=!0,l(g)};var v=o.style;v.setProperty("display","block","important"),v.position="absolute",v.top="0",v.left="0",v.visibility="hidden",t&&"srcdoc"in o?o.srcdoc=t:o.src="about:blank",s.body.appendChild(o);var p=function(){var g,x;f||(((x=(g=o.contentWindow)===null||g===void 0?void 0:g.document)===null||x===void 0?void 0:x.readyState)==="complete"?d():setTimeout(p,10))};p()})];case 5:u.sent(),u.label=6;case 6:return!((a=(r=o.contentWindow)===null||r===void 0?void 0:r.document)===null||a===void 0)&&a.body?[3,8]:[4,Bn(n)];case 7:return u.sent(),[3,6];case 8:return[4,e(o,o.contentWindow)];case 9:return[2,u.sent()];case 10:return(i=o.parentNode)===null||i===void 0||i.removeChild(o),[7];case 11:return[2]}})})}function md(e){for(var t=function(c){for(var l,f,d="Unexpected syntax '".concat(c,"'"),v=/^\s*([a-z-]*)(.*)$/i.exec(c),p=v[1]||void 0,g={},x=/([.:#][\w-]+|\[.+?\])/gi,b=function(k,L){g[k]=g[k]||[],g[k].push(L)};;){var w=x.exec(v[2]);if(!w)break;var A=w[0];switch(A[0]){case".":b("class",A.slice(1));break;case"#":b("id",A.slice(1));break;case"[":var D=/^\[([\w-]+)([~|^$*]?=("(.*?)"|([\w-]+)))?(\s+[is])?\]$/.exec(A);if(!D)throw new Error(d);b(D[1],(f=(l=D[4])!==null&&l!==void 0?l:D[5])!==null&&f!==void 0?f:"");break;default:throw new Error(d)}}return[p,g]}(e),n=t[0],r=t[1],a=document.createElement(n??"div"),i=0,s=Object.keys(r);i{Ki=function(){return Ki=Object.assign||function(e){for(var t,n=1,r=arguments.length;n.6*l.length})).sort(),[2,i]}var u})})},fontPreferences:function(){return function(e,t){return t===void 0&&(t=4e3),A0(function(n,r){var a=r.document,i=a.body,s=i.style;s.width="".concat(t,"px"),s.webkitTextSizeAdjust=s.textSizeAdjust="none",qi()?i.style.zoom="".concat(1/r.devicePixelRatio):In()&&(i.style.zoom="reset");var o=a.createElement("div");return o.textContent=D0([],Array(t/20<<0),!0).map(function(){return"word"}).join(" "),i.appendChild(o),e(a,i)},'')}(function(e,t){for(var n={},r={},a=0,i=Object.keys(Mi);a=3}())return-1;var n=new t(1,5e3,44100),r=n.createOscillator();r.type="triangle",r.frequency.value=1e4;var a=n.createDynamicsCompressor();a.threshold.value=-50,a.knee.value=40,a.ratio.value=12,a.attack.value=0,a.release.value=.25,r.connect(a),a.connect(n.destination),r.start(0);var i=function(c){var l=3,f=500,d=500,v=5e3,p=function(){};return[new Promise(function(g,x){var b=!1,w=0,A=0;c.oncomplete=function(L){return g(L.renderedBuffer)};var D=function(){setTimeout(function(){return x(I0("timeout"))},Math.min(d,A+v-Date.now()))},k=function(){try{var L=c.startRendering();switch(P0(L)&&An(L),c.state){case"running":A=Date.now(),b&&D();break;case"suspended":document.hidden||w++,b&&w>=l?x(I0("suspended")):setTimeout(k,f)}}catch(z){x(z)}};k(),p=function(){b||(b=!0,A>0&&D())}}),p]}(n),s=i[0],o=i[1],u=s.then(function(c){return function(l){for(var f=0,d=0;d=3||n.push(t.languages);else if(typeof t.languages=="string"){var a=t.languages;a&&n.push(a.split(","))}return n},colorDepth:function(){return window.screen.colorDepth},deviceMemory:function(){return Wt(St(navigator.deviceMemory),void 0)},screenResolution:function(){var e=screen,t=function(r){return Wt(Pi(r),null)},n=[t(e.width),t(e.height)];return n.sort().reverse(),n},hardwareConcurrency:function(){return Wt(Pi(navigator.hardwareConcurrency),void 0)},timezone:function(){var e,t=(e=window.Intl)===null||e===void 0?void 0:e.DateTimeFormat;if(t){var n=new t().resolvedOptions().timeZone;if(n)return n}var r,a=(r=new Date().getFullYear(),-Math.max(St(new Date(r,0,1).getTimezoneOffset()),St(new Date(r,6,1).getTimezoneOffset())));return"UTC".concat(a>=0?"+":"").concat(Math.abs(a))},sessionStorage:function(){try{return!!window.sessionStorage}catch{return!0}},localStorage:function(){try{return!!window.localStorage}catch{return!0}},indexedDB:function(){if(!O0()&&!dd())try{return!!window.indexedDB}catch{return!0}},openDatabase:function(){return!!window.openDatabase},cpuClass:function(){return navigator.cpuClass},platform:function(){var e=navigator.platform;return e==="MacIntel"&&In()&&!Hi()?function(){if(navigator.platform==="iPad")return!0;var t=screen,n=t.width/t.height;return Tt(["MediaSource"in window,!!Element.prototype.webkitRequestFullscreen,n>.65&&n<1.53])>=2}()?"iPad":"iPhone":e},plugins:function(){var e=navigator.plugins;if(e){for(var t=[],n=0;n{xn();E0();q0();sa();Cn();ir=class{static async get(){try{let t=await ir.getVisitorIdPro(),n=await ir.getVisitorIdV3(),r=n?.visitorId||null,a=n?.components||void 0;return Je.info(`Fp: v3=${r}, pro=${t}`),{visitorIdPro:t,visitorIdV3:r}}catch(t){return Je.error("Could not get fp",t),{visitorIdPro:null,visitorIdV3:null}}}static async getVisitorIdPro(){try{let t=Gt().collector?.fingerprint?.fingerprintPro;if(t?.key&&t?.enabled)return(await(await C0.load({apiKey:t?.key})).get()).visitorId||null}catch(t){Nt.addError("Could not get Fingerprint PRO ID",t)}return null}static async getVisitorIdV3(){try{return await(await K0.load()).get()}catch(t){Nt.addError("Could not get Fingerprint V3 ID",t)}return{visitorId:null,components:void 0}}}});function wd(e){var t=e.appVersion;if(t.state!==W.Success)return!1;if(/headless/i.test(t.value))return J.HeadlessChrome;if(/electron/i.test(t.value))return J.Electron;if(/slimerjs/i.test(t.value))return J.SlimerJS}function la(e,t){return e.indexOf(t)!==-1}function sr(e,t){return e.indexOf(t)!==-1}function Id(e,t){if("find"in e)return e.find(t);for(var n=0;n=5?at.Chromium:Hr(["ApplePayError"in n,"CSSPrimitiveValue"in n,"Counter"in n,r.vendor.indexOf("Apple")===0,"getStorageUpdates"in r,"WebKitMediaKeys"in n])>=4?at.Webkit:Hr(["buildID"in navigator,"MozAppearance"in((t=(e=document.documentElement)===null||e===void 0?void 0:e.style)!==null&&t!==void 0?t:{}),"onmozfullscreenchange"in n,"mozInnerScreenX"in n,"CSSMozDocumentRule"in n,"CanvasCaptureMediaStream"in n])>=4?at.Gecko:at.Unknown}function Wi(){var e,t=(e=navigator.userAgent)===null||e===void 0?void 0:e.toLowerCase();return sr(t,"wechat")?nt.WeChat:sr(t,"firefox")?nt.Firefox:sr(t,"opera")||sr(t,"opr")?nt.Opera:sr(t,"chrome")?nt.Chrome:sr(t,"safari")?nt.Safari:sr(t,"trident")||sr(t,"msie")?nt.IE:nt.Unknown}function _d(){var e=_n(),t=e===at.Chromium,n=e===at.Gecko;if(!t&&!n)return!1;var r=window;return Hr(["onorientationchange"in r,"orientation"in r,t&&!("SharedWorker"in r),n&&/android/i.test(navigator.appVersion)])>=2}function Rd(){if(_n()!==at.Webkit)return!1;var e=window;return Hr(["safari"in e,!("DeviceMotionEvent"in e),!("ongestureend"in e),!("standalone"in navigator)])>=3}function Nd(){return document.hasFocus===void 0?!1:document.hasFocus()}function kd(){var e=window;return Hr([!("MediaSettingsRange"in e),"RTCEncodedAudioFrame"in e,""+e.Intl=="[object Intl]",""+e.Reflect=="[object Reflect]"])>=3}function Ld(e){var t=e.evalLength;if(t.state===W.Success){var n=t.value,r=Wi(),a=_n();return n===37&&!la([at.Webkit,at.Gecko],a)||n===39&&!la([nt.IE],r)||n===33&&!la([at.Chromium],a)}}function Dd(e){var t=e.functionBind;if(t.state===W.NotFunction)return J.PhantomJS}function Pd(e){var t=e.languages;if(t.state===W.Success&&t.value.length===0)return J.HeadlessChrome}function Ud(e){var t=e.mimeTypesConsistent;if(t.state===W.Success&&!t.value)return J.Unknown}function Od(e){var t=e.notificationPermissions,n=Wi();if(n!==nt.Chrome)return!1;if(t.state===W.Success&&t.value)return J.HeadlessChrome}function Vd(e){var t=e.pluginsArray;if(t.state===W.Success&&!t.value)return J.HeadlessChrome}function Fd(e){var t=e.pluginsLength;if(t.state===W.Success){var n=_n();if(!(n===at.Chromium&&_d()||n===at.Webkit&&!Rd())&&t.value===0)return J.HeadlessChrome}}function Md(e){var t,n=e.process;if(n.state!==W.Success)return!1;if(n.value.type==="renderer"||((t=n.value.versions)===null||t===void 0?void 0:t.electron)!=null)return J.Electron}function Kd(e){var t=e.productSub;if(t.state!==W.Success)return!1;var n=Wi();if((n===nt.Chrome||n===nt.Safari||n===nt.Opera||n===nt.WeChat)&&t.value!=="20030107")return J.Unknown}function qd(e){var t=e.userAgent;if(t.state!==W.Success)return!1;if(/PhantomJS/i.test(t.value))return J.PhantomJS;if(/Headless/i.test(t.value))return J.HeadlessChrome;if(/Electron/i.test(t.value))return J.Electron;if(/slimerjs/i.test(t.value))return J.SlimerJS}function Hd(e){var t=e.webDriver;if(t.state===W.Success&&t.value)return J.HeadlessChrome}function Gd(e){var t=e.webGL;if(t.state===W.Success){var n=t.value,r=n.vendor,a=n.renderer;if(r=="Brian Paul"&&a=="Mesa OffScreen")return J.HeadlessChrome}}function Wd(e){var t=e.windowExternal;if(t.state!==W.Success)return!1;if(/Sequentum/i.test(t.value))return J.Sequentum}function zd(e){var t=e.windowSize;if(t.state!==W.Success)return!1;var n=t.value,r=n.outerWidth,a=n.outerHeight;if(Nd()&&r===0&&a===0)return J.HeadlessChrome}function jd(e){var t=e.distinctiveProps;if(t.state!==W.Success)return!1;var n=t.value,r;for(r in n)if(n[r])return r}function Qd(){var e=navigator.appVersion;if(e==null)throw new ge(W.Undefined,"navigator.appVersion is undefined");return e}function Xd(){if(document.documentElement===void 0)throw new ge(W.Undefined,"document.documentElement is undefined");var e=document.documentElement;if(typeof e.getAttributeNames!="function")throw new ge(W.NotFunction,"document.documentElement.getAttributeNames is not a function");return e.getAttributeNames()}function Zd(){try{null[0]()}catch(e){if(e instanceof Error&&e.stack!=null)return e.stack.toString()}throw new ge(W.UnexpectedBehaviour,"errorTrace signal unexpected behaviour")}function Jd(){return eval.toString().length}function $d(){if(Function.prototype.bind===void 0)throw new ge(W.NotFunction,"Function.prototype.bind is undefined");return Function.prototype.bind.toString()}function ep(){var e=navigator,t=[],n=e.language||e.userLanguage||e.browserLanguage||e.systemLanguage;if(n!==void 0&&t.push([n]),Array.isArray(e.languages)){var r=_n();r===at.Chromium&&kd()||t.push(e.languages)}else if(typeof e.languages=="string"){var a=e.languages;a&&t.push(a.split(","))}return t}function tp(){if(navigator.mimeTypes===void 0)throw new ge(W.Undefined,"navigator.mimeTypes is undefined");for(var e=navigator.mimeTypes,t=Object.getPrototypeOf(e)===MimeTypeArray.prototype,n=0;n=.001))try{var e=new XMLHttpRequest;e.open("get","https://m1.openfpcdn.io/botd/v".concat(Td,"/npm-monitoring"),!0),e.send()}catch(t){console.error(t)}}function W0(e){var t=e===void 0?{}:e,n=t.monitoring,r=n===void 0?!0:n;return Sn(this,void 0,void 0,function(){var a;return Tn(this,function(i){switch(i.label){case 0:return r&&yp(),a=new mp,[4,a.collect()];case 1:return i.sent(),[2,a]}})})}var Td,W,J,ge,at,nt,Yd,hp,mp,z0=F(()=>{Ri();Td="1.5.0";(function(e){e[e.Success=0]="Success",e[e.Undefined=-1]="Undefined",e[e.NotFunction=-2]="NotFunction",e[e.UnexpectedBehaviour=-3]="UnexpectedBehaviour",e[e.Null=-4]="Null"})(W||(W={}));(function(e){e.Awesomium="awesomium",e.Cef="cef",e.CefSharp="cefsharp",e.CoachJS="coachjs",e.Electron="electron",e.FMiner="fminer",e.Geb="geb",e.NightmareJS="nightmarejs",e.Phantomas="phantomas",e.PhantomJS="phantomjs",e.Rhino="rhino",e.Selenium="selenium",e.Sequentum="sequentum",e.SlimerJS="slimerjs",e.WebDriverIO="webdriverio",e.WebDriver="webdriver",e.HeadlessChrome="headless_chrome",e.Unknown="unknown"})(J||(J={}));ge=function(e){m0(t,e);function t(n,r){var a=e.call(this,r)||this;return a.state=n,a.name="BotdError",Object.setPrototypeOf(a,t.prototype),a}return t}(Error);(function(e){e.Unknown="unknown",e.Chromium="chromium",e.Gecko="gecko",e.Webkit="webkit"})(at||(at={}));(function(e){e.Unknown="unknown",e.Chrome="chrome",e.Firefox="firefox",e.Opera="opera",e.Safari="safari",e.IE="internet_explorer",e.WeChat="wechat"})(nt||(nt={}));Yd={detectAppVersion:wd,detectDocumentAttributes:Ad,detectErrorTrace:Bd,detectEvalLengthInconsistency:Ld,detectFunctionBind:Dd,detectLanguagesLengthInconsistency:Pd,detectNotificationPermissions:Od,detectPluginsArray:Vd,detectPluginsLengthInconsistency:Fd,detectProcess:Md,detectUserAgent:qd,detectWebDriver:Hd,detectWebGL:Gd,detectWindowExternal:Wd,detectWindowSize:zd,detectMimeTypesConsistent:Ud,detectProductSub:Kd,detectDistinctiveProperties:jd};hp={userAgent:up,appVersion:Qd,rtt:op,windowSize:dp,pluginsLength:ap,pluginsArray:np,errorTrace:Zd,productSub:sp,windowExternal:fp,mimeTypesConsistent:tp,evalLength:Jd,webGL:lp,webDriver:cp,languages:ep,notificationPermissions:rp,documentElementKeys:Xd,functionBind:$d,process:ip,distinctiveProps:pp},mp=function(){function e(){this.components=void 0,this.detections=void 0}return e.prototype.getComponents=function(){return this.components},e.prototype.getDetections=function(){return this.detections},e.prototype.getSources=function(){return hp},e.prototype.getDetectors=function(){return Yd},e.prototype.detect=function(){if(this.components===void 0)throw new Error("BotDetector.detect can't be called before BotDetector.collect");var t=this.components,n=this.getDetectors(),r={},a={bot:!1};for(var i in n){var s=n[i],o=s(t),u={bot:!1};typeof o=="string"?u={bot:!0,botKind:o}:o&&(u={bot:!0,botKind:J.Unknown}),r[i]=u,u.bot&&(a=u)}return this.detections=r,a},e.prototype.collect=function(){return Sn(this,void 0,void 0,function(){var t,n,r,a=this;return Tn(this,function(i){switch(i.label){case 0:return t=this.getSources(),n={},r=Object.keys(t),[4,Promise.all(r.map(function(s){return Sn(a,void 0,void 0,function(){var o,u,c,l,f;return Tn(this,function(d){switch(d.label){case 0:o=t[s],d.label=1;case 1:return d.trys.push([1,3,,4]),u=n,c=s,f={},[4,o()];case 2:return u[c]=(f.value=d.sent(),f.state=W.Success,f),[3,4];case 3:return l=d.sent(),l instanceof ge?n[s]={state:l.state,error:"".concat(l.name,": ").concat(l.message)}:n[s]={state:W.UnexpectedBehaviour,error:l instanceof Error?"".concat(l.name,": ").concat(l.message):String(l)},[3,4];case 4:return[2]}})})}))];case 1:return i.sent(),this.components=n,[2,this.components]}})})},e}()});var zi,j0,Y0=F(()=>{z0();Cn();zi=class{static async detect(){try{return await(await W0()).detect()}catch(t){return Nt.addError("Bot prescreen failed",t),Promise.reject(t)}}},j0=zi});var vp,fa,ji=F(()=>{vp="0.2.65/df586b19",fa=vp});var X=j((Bx,Q0)=>{Q0.exports={options:{usePureJavaScript:!1}}});var J0=j((_x,Z0)=>{var Yi={};Z0.exports=Yi;var X0={};Yi.encode=function(e,t,n){if(typeof t!="string")throw new TypeError('"alphabet" must be a string.');if(n!==void 0&&typeof n!="number")throw new TypeError('"maxline" must be a number.');var r="";if(!(e instanceof Uint8Array))r=gp(e,t);else{var a=0,i=t.length,s=t.charAt(0),o=[0];for(a=0;a0;)o.push(c%i),c=c/i|0}for(a=0;e[a]===0&&a=0;--a)r+=t[o[a]]}if(n){var l=new RegExp(".{1,"+n+"}","g");r=r.match(l).join(`\r `)}return r};Yi.decode=function(e,t){if(typeof e!="string")throw new TypeError('"input" must be a string.');if(typeof t!="string")throw new TypeError('"alphabet" must be a string.');var n=X0[t];if(!n){n=X0[t]=[];for(var r=0;r>=8;for(;c>0;)s.push(c&255),c>>=8}for(var l=0;e[l]===i&&l0;)i.push(o%r),o=o/r|0}var u="";for(n=0;e.at(n)===0&&n=0;--n)u+=t[i[n]];return u}});var se=j((Rx,ru)=>{var $0=X(),eu=J0(),S=ru.exports=$0.util=$0.util||{};(function(){if(typeof process<"u"&&process.nextTick&&!process.browser){S.nextTick=process.nextTick,typeof setImmediate=="function"?S.setImmediate=setImmediate:S.setImmediate=S.nextTick;return}if(typeof setImmediate=="function"){S.setImmediate=function(){return setImmediate.apply(void 0,arguments)},S.nextTick=function(o){return setImmediate(o)};return}if(S.setImmediate=function(o){setTimeout(o,0)},typeof window<"u"&&typeof window.postMessage=="function"){let o=function(u){if(u.source===window&&u.data===e){u.stopPropagation();var c=t.slice();t.length=0,c.forEach(function(l){l()})}};var s=o,e="forge.setImmediate",t=[];S.setImmediate=function(u){t.push(u),t.length===1&&window.postMessage(e,"*")},window.addEventListener("message",o,!0)}if(typeof MutationObserver<"u"){var n=Date.now(),r=!0,a=document.createElement("div"),t=[];new MutationObserver(function(){var u=t.slice();t.length=0,u.forEach(function(c){c()})}).observe(a,{attributes:!0});var i=S.setImmediate;S.setImmediate=function(u){Date.now()-n>15?(n=Date.now(),i(u)):(t.push(u),t.length===1&&a.setAttribute("a",r=!r))}}S.nextTick=S.setImmediate})();S.isNodejs=typeof process<"u"&&process.versions&&process.versions.node;S.globalScope=function(){return S.isNodejs?global:typeof self>"u"?window:self}();S.isArray=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"};S.isArrayBuffer=function(e){return typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer};S.isArrayBufferView=function(e){return e&&S.isArrayBuffer(e.buffer)&&e.byteLength!==void 0};function Rn(e){if(!(e===8||e===16||e===24||e===32))throw new Error("Only 8, 16, 24, or 32 bits supported: "+e)}S.ByteBuffer=Qi;function Qi(e){if(this.data="",this.read=0,typeof e=="string")this.data=e;else if(S.isArrayBuffer(e)||S.isArrayBufferView(e))if(typeof Buffer<"u"&&e instanceof Buffer)this.data=e.toString("binary");else{var t=new Uint8Array(e);try{this.data=String.fromCharCode.apply(null,t)}catch{for(var n=0;nxp&&(this.data.substr(0,1),this._constructedStringLength=0)};S.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};S.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0};S.ByteStringBuffer.prototype.putByte=function(e){return this.putBytes(String.fromCharCode(e))};S.ByteStringBuffer.prototype.fillWithByte=function(e,t){e=String.fromCharCode(e);for(var n=this.data;t>0;)t&1&&(n+=e),t>>>=1,t>0&&(e+=e);return this.data=n,this._optimizeConstructedString(t),this};S.ByteStringBuffer.prototype.putBytes=function(e){return this.data+=e,this._optimizeConstructedString(e.length),this};S.ByteStringBuffer.prototype.putString=function(e){return this.putBytes(S.encodeUtf8(e))};S.ByteStringBuffer.prototype.putInt16=function(e){return this.putBytes(String.fromCharCode(e>>8&255)+String.fromCharCode(e&255))};S.ByteStringBuffer.prototype.putInt24=function(e){return this.putBytes(String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e&255))};S.ByteStringBuffer.prototype.putInt32=function(e){return this.putBytes(String.fromCharCode(e>>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e&255))};S.ByteStringBuffer.prototype.putInt16Le=function(e){return this.putBytes(String.fromCharCode(e&255)+String.fromCharCode(e>>8&255))};S.ByteStringBuffer.prototype.putInt24Le=function(e){return this.putBytes(String.fromCharCode(e&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255))};S.ByteStringBuffer.prototype.putInt32Le=function(e){return this.putBytes(String.fromCharCode(e&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>24&255))};S.ByteStringBuffer.prototype.putInt=function(e,t){Rn(t);var n="";do t-=8,n+=String.fromCharCode(e>>t&255);while(t>0);return this.putBytes(n)};S.ByteStringBuffer.prototype.putSignedInt=function(e,t){return e<0&&(e+=2<0);return t};S.ByteStringBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),n=2<=n&&(t-=n<<1),t};S.ByteStringBuffer.prototype.getBytes=function(e){var t;return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):e===0?t="":(t=this.read===0?this.data:this.data.slice(this.read),this.clear()),t};S.ByteStringBuffer.prototype.bytes=function(e){return typeof e>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+e)};S.ByteStringBuffer.prototype.at=function(e){return this.data.charCodeAt(this.read+e)};S.ByteStringBuffer.prototype.setAt=function(e,t){return this.data=this.data.substr(0,this.read+e)+String.fromCharCode(t)+this.data.substr(this.read+e+1),this};S.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};S.ByteStringBuffer.prototype.copy=function(){var e=S.createBuffer(this.data);return e.read=this.read,e};S.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this};S.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this};S.ByteStringBuffer.prototype.truncate=function(e){var t=Math.max(0,this.length()-e);return this.data=this.data.substr(this.read,t),this.read=0,this};S.ByteStringBuffer.prototype.toHex=function(){for(var e="",t=this.read;t=e)return this;t=Math.max(t||this.growSize,e);var n=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),r=new Uint8Array(this.length()+t);return r.set(n),this.data=new DataView(r.buffer),this};S.DataBuffer.prototype.putByte=function(e){return this.accommodate(1),this.data.setUint8(this.write++,e),this};S.DataBuffer.prototype.fillWithByte=function(e,t){this.accommodate(t);for(var n=0;n>8&65535),this.data.setInt8(this.write,e>>16&255),this.write+=3,this};S.DataBuffer.prototype.putInt32=function(e){return this.accommodate(4),this.data.setInt32(this.write,e),this.write+=4,this};S.DataBuffer.prototype.putInt16Le=function(e){return this.accommodate(2),this.data.setInt16(this.write,e,!0),this.write+=2,this};S.DataBuffer.prototype.putInt24Le=function(e){return this.accommodate(3),this.data.setInt8(this.write,e>>16&255),this.data.setInt16(this.write,e>>8&65535,!0),this.write+=3,this};S.DataBuffer.prototype.putInt32Le=function(e){return this.accommodate(4),this.data.setInt32(this.write,e,!0),this.write+=4,this};S.DataBuffer.prototype.putInt=function(e,t){Rn(t),this.accommodate(t/8);do t-=8,this.data.setInt8(this.write++,e>>t&255);while(t>0);return this};S.DataBuffer.prototype.putSignedInt=function(e,t){return Rn(t),this.accommodate(t/8),e<0&&(e+=2<0);return t};S.DataBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),n=2<=n&&(t-=n<<1),t};S.DataBuffer.prototype.getBytes=function(e){var t;return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):e===0?t="":(t=this.read===0?this.data:this.data.slice(this.read),this.clear()),t};S.DataBuffer.prototype.bytes=function(e){return typeof e>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+e)};S.DataBuffer.prototype.at=function(e){return this.data.getUint8(this.read+e)};S.DataBuffer.prototype.setAt=function(e,t){return this.data.setUint8(e,t),this};S.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)};S.DataBuffer.prototype.copy=function(){return new S.DataBuffer(this)};S.DataBuffer.prototype.compact=function(){if(this.read>0){var e=new Uint8Array(this.data.buffer,this.read),t=new Uint8Array(e.byteLength);t.set(e),this.data=new DataView(t),this.write-=this.read,this.read=0}return this};S.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this};S.DataBuffer.prototype.truncate=function(e){return this.write=Math.max(0,this.length()-e),this.read=Math.min(this.read,this.write),this};S.DataBuffer.prototype.toHex=function(){for(var e="",t=this.read;t0;)t&1&&(n+=e),t>>>=1,t>0&&(e+=e);return n};S.xorBytes=function(e,t,n){for(var r="",a="",i="",s=0,o=0;n>0;--n,++s)a=e.charCodeAt(s)^t.charCodeAt(s),o>=10&&(r+=i,i="",o=0),i+=String.fromCharCode(a),++o;return r+=i,r};S.hexToBytes=function(e){var t="",n=0;for(e.length&!0&&(n=1,t+=String.fromCharCode(parseInt(e[0],16)));n>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e&255)};var or="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",ur=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],tu="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";S.encode64=function(e,t){for(var n="",r="",a,i,s,o=0;o>2),n+=or.charAt((a&3)<<4|i>>4),isNaN(i)?n+="==":(n+=or.charAt((i&15)<<2|s>>6),n+=isNaN(s)?"=":or.charAt(s&63)),t&&n.length>t&&(r+=n.substr(0,t)+`\r `,n=n.substr(t));return r+=n,r};S.decode64=function(e){e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var t="",n,r,a,i,s=0;s>4),a!==64&&(t+=String.fromCharCode((r&15)<<4|a>>2),i!==64&&(t+=String.fromCharCode((a&3)<<6|i)));return t};S.encodeUtf8=function(e){return unescape(encodeURIComponent(e))};S.decodeUtf8=function(e){return decodeURIComponent(escape(e))};S.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:eu.encode,decode:eu.decode}};S.binary.raw.encode=function(e){return String.fromCharCode.apply(null,e)};S.binary.raw.decode=function(e,t,n){var r=t;r||(r=new Uint8Array(e.length)),n=n||0;for(var a=n,i=0;i>2),n+=or.charAt((a&3)<<4|i>>4),isNaN(i)?n+="==":(n+=or.charAt((i&15)<<2|s>>6),n+=isNaN(s)?"=":or.charAt(s&63)),t&&n.length>t&&(r+=n.substr(0,t)+`\r `,n=n.substr(t));return r+=n,r};S.binary.base64.decode=function(e,t,n){var r=t;r||(r=new Uint8Array(Math.ceil(e.length/4)*3)),e=e.replace(/[^A-Za-z0-9\+\/\=]/g,""),n=n||0;for(var a,i,s,o,u=0,c=n;u>4,s!==64&&(r[c++]=(i&15)<<4|s>>2,o!==64&&(r[c++]=(s&3)<<6|o));return t?c-n:r.subarray(0,c)};S.binary.base58.encode=function(e,t){return S.binary.baseN.encode(e,tu,t)};S.binary.base58.decode=function(e,t){return S.binary.baseN.decode(e,tu,t)};S.text={utf8:{},utf16:{}};S.text.utf8.encode=function(e,t,n){e=S.encodeUtf8(e);var r=t;r||(r=new Uint8Array(e.length)),n=n||0;for(var a=n,i=0;i"u"&&(n=["web","flash"]);var a,i=!1,s=null;for(var o in n){a=n[o];try{if(a==="flash"||a==="both"){if(t[0]===null)throw new Error("Flash local storage not available.");r=e.apply(this,t),i=a==="flash"}(a==="web"||a==="both")&&(t[0]=localStorage,r=e.apply(this,t),i=!0)}catch(u){s=u}if(i)break}if(!i)throw s;return r};S.setItem=function(e,t,n,r,a){da(Ep,arguments,a)};S.getItem=function(e,t,n,r){return da(bp,arguments,r)};S.removeItem=function(e,t,n,r){da(Sp,arguments,r)};S.clearItems=function(e,t,n){da(Tp,arguments,n)};S.isEmpty=function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0};S.format=function(e){for(var t=/%./g,n,r,a=0,i=[],s=0;n=t.exec(e);){r=e.substring(s,t.lastIndex-2),r.length>0&&i.push(r),s=t.lastIndex;var o=n[0][1];switch(o){case"s":case"o":a");break;case"%":i.push("%");break;default:i.push("<%"+o+"?>")}}return i.push(e.substring(s)),i.join("")};S.formatNumber=function(e,t,n,r){var a=e,i=isNaN(t=Math.abs(t))?2:t,s=n===void 0?",":n,o=r===void 0?".":r,u=a<0?"-":"",c=parseInt(a=Math.abs(+a||0).toFixed(i),10)+"",l=c.length>3?c.length%3:0;return u+(l?c.substr(0,l)+o:"")+c.substr(l).replace(/(\d{3})(?=\d)/g,"$1"+o)+(i?s+Math.abs(a-c).toFixed(i).slice(2):"")};S.formatSize=function(e){return e>=1073741824?e=S.formatNumber(e/1073741824,2,".","")+" GiB":e>=1048576?e=S.formatNumber(e/1048576,2,".","")+" MiB":e>=1024?e=S.formatNumber(e/1024,0)+" KiB":e=S.formatNumber(e,0)+" bytes",e};S.bytesFromIP=function(e){return e.indexOf(".")!==-1?S.bytesFromIPv4(e):e.indexOf(":")!==-1?S.bytesFromIPv6(e):null};S.bytesFromIPv4=function(e){if(e=e.split("."),e.length!==4)return null;for(var t=S.createBuffer(),n=0;nn[r].end-n[r].start&&(r=n.length-1))}t.push(i)}if(n.length>0){var u=n[r];u.end-u.start>0&&(t.splice(u.start,u.end-u.start+1,""),u.start===0&&t.unshift(""),u.end===7&&t.push(""))}return t.join(":")};S.estimateCores=function(e,t){if(typeof e=="function"&&(t=e,e={}),e=e||{},"cores"in S&&!e.update)return t(null,S.cores);if(typeof navigator<"u"&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return S.cores=navigator.hardwareConcurrency,t(null,S.cores);if(typeof Worker>"u")return S.cores=1,t(null,S.cores);if(typeof Blob>"u")return S.cores=2,t(null,S.cores);var n=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(s){for(var o=Date.now(),u=o+4;Date.now()v.st&&l.stl.st&&v.st{var Ne=X();se();nu.exports=Ne.cipher=Ne.cipher||{};Ne.cipher.algorithms=Ne.cipher.algorithms||{};Ne.cipher.createCipher=function(e,t){var n=e;if(typeof n=="string"&&(n=Ne.cipher.getAlgorithm(n),n&&(n=n())),!n)throw new Error("Unsupported algorithm: "+e);return new Ne.cipher.BlockCipher({algorithm:n,key:t,decrypt:!1})};Ne.cipher.createDecipher=function(e,t){var n=e;if(typeof n=="string"&&(n=Ne.cipher.getAlgorithm(n),n&&(n=n())),!n)throw new Error("Unsupported algorithm: "+e);return new Ne.cipher.BlockCipher({algorithm:n,key:t,decrypt:!0})};Ne.cipher.registerAlgorithm=function(e,t){e=e.toUpperCase(),Ne.cipher.algorithms[e]=t};Ne.cipher.getAlgorithm=function(e){return e=e.toUpperCase(),e in Ne.cipher.algorithms?Ne.cipher.algorithms[e]:null};var Ji=Ne.cipher.BlockCipher=function(e){this.algorithm=e.algorithm,this.mode=this.algorithm.mode,this.blockSize=this.mode.blockSize,this._finish=!1,this._input=null,this.output=null,this._op=e.decrypt?this.mode.decrypt:this.mode.encrypt,this._decrypt=e.decrypt,this.algorithm.initialize(e)};Ji.prototype.start=function(e){e=e||{};var t={};for(var n in e)t[n]=e[n];t.decrypt=this._decrypt,this._finish=!1,this._input=Ne.util.createBuffer(),this.output=e.output||Ne.util.createBuffer(),this.mode.start(t)};Ji.prototype.update=function(e){for(e&&this._input.putBuffer(e);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()};Ji.prototype.finish=function(e){e&&(this.mode.name==="ECB"||this.mode.name==="CBC")&&(this.mode.pad=function(n){return e(this.blockSize,n,!1)},this.mode.unpad=function(n){return e(this.blockSize,n,!0)});var t={};return t.decrypt=this._decrypt,t.overflow=this._input.length()%this.blockSize,!(!this._decrypt&&this.mode.pad&&!this.mode.pad(this._input,t)||(this._finish=!0,this.update(),this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,t))||this.mode.afterFinish&&!this.mode.afterFinish(this.output,t))}});var es=j((kx,au)=>{var ke=X();se();ke.cipher=ke.cipher||{};var ee=au.exports=ke.cipher.modes=ke.cipher.modes||{};ee.ecb=function(e){e=e||{},this.name="ECB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)};ee.ecb.prototype.start=function(e){};ee.ecb.prototype.encrypt=function(e,t,n){if(e.length()0))return!0;for(var r=0;r0))return!0;for(var r=0;r0)return!1;var n=e.length(),r=e.at(n-1);return r>this.blockSize<<2?!1:(e.truncate(r),!0)};ee.cbc=function(e){e=e||{},this.name="CBC",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)};ee.cbc.prototype.start=function(e){if(e.iv===null){if(!this._prev)throw new Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else if("iv"in e)this._iv=ha(e.iv,this.blockSize),this._prev=this._iv.slice(0);else throw new Error("Invalid IV parameter.")};ee.cbc.prototype.encrypt=function(e,t,n){if(e.length()0))return!0;for(var r=0;r0))return!0;for(var r=0;r0)return!1;var n=e.length(),r=e.at(n-1);return r>this.blockSize<<2?!1:(e.truncate(r),!0)};ee.cfb=function(e){e=e||{},this.name="CFB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialBlock=new Array(this._ints),this._partialOutput=ke.util.createBuffer(),this._partialBytes=0};ee.cfb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=ha(e.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};ee.cfb.prototype.encrypt=function(e,t,n){var r=e.length();if(r===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&r>=this.blockSize){for(var a=0;a0&&(i=this.blockSize-i),this._partialOutput.clear();for(var a=0;a0)e.read-=this.blockSize;else for(var a=0;a0&&this._partialOutput.getBytes(this._partialBytes),i>0&&!n)return t.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=i,!0;t.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0};ee.cfb.prototype.decrypt=function(e,t,n){var r=e.length();if(r===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&r>=this.blockSize){for(var a=0;a0&&(i=this.blockSize-i),this._partialOutput.clear();for(var a=0;a0)e.read-=this.blockSize;else for(var a=0;a0&&this._partialOutput.getBytes(this._partialBytes),i>0&&!n)return t.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=i,!0;t.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0};ee.ofb=function(e){e=e||{},this.name="OFB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=ke.util.createBuffer(),this._partialBytes=0};ee.ofb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=ha(e.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};ee.ofb.prototype.encrypt=function(e,t,n){var r=e.length();if(e.length()===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&r>=this.blockSize){for(var a=0;a0&&(i=this.blockSize-i),this._partialOutput.clear();for(var a=0;a0)e.read-=this.blockSize;else for(var a=0;a0&&this._partialOutput.getBytes(this._partialBytes),i>0&&!n)return t.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=i,!0;t.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0};ee.ofb.prototype.decrypt=ee.ofb.prototype.encrypt;ee.ctr=function(e){e=e||{},this.name="CTR",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=ke.util.createBuffer(),this._partialBytes=0};ee.ctr.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=ha(e.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};ee.ctr.prototype.encrypt=function(e,t,n){var r=e.length();if(r===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&r>=this.blockSize)for(var a=0;a0&&(i=this.blockSize-i),this._partialOutput.clear();for(var a=0;a0&&(e.read-=this.blockSize),this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),i>0&&!n)return t.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=i,!0;t.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0}ma(this._inBlock)};ee.ctr.prototype.decrypt=ee.ctr.prototype.encrypt;ee.gcm=function(e){e=e||{},this.name="GCM",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints),this._partialOutput=ke.util.createBuffer(),this._partialBytes=0,this._R=3774873600};ee.gcm.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");var t=ke.util.createBuffer(e.iv);this._cipherLength=0;var n;if("additionalData"in e?n=ke.util.createBuffer(e.additionalData):n=ke.util.createBuffer(),"tagLength"in e?this._tagLength=e.tagLength:this._tagLength=128,this._tag=null,e.decrypt&&(this._tag=ke.util.createBuffer(e.tag).getBytes(),this._tag.length!==this._tagLength/8))throw new Error("Authentication tag does not match tag length.");this._hashBlock=new Array(this._ints),this.tag=null,this._hashSubkey=new Array(this._ints),this.cipher.encrypt([0,0,0,0],this._hashSubkey),this.componentBits=4,this._m=this.generateHashTable(this._hashSubkey,this.componentBits);var r=t.length();if(r===12)this._j0=[t.getInt32(),t.getInt32(),t.getInt32(),1];else{for(this._j0=[0,0,0,0];t.length()>0;)this._j0=this.ghash(this._hashSubkey,this._j0,[t.getInt32(),t.getInt32(),t.getInt32(),t.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat($i(r*8)))}this._inBlock=this._j0.slice(0),ma(this._inBlock),this._partialBytes=0,n=ke.util.createBuffer(n),this._aDataLength=$i(n.length()*8);var a=n.length()%this.blockSize;for(a&&n.fillWithByte(0,this.blockSize-a),this._s=[0,0,0,0];n.length()>0;)this._s=this.ghash(this._hashSubkey,this._s,[n.getInt32(),n.getInt32(),n.getInt32(),n.getInt32()])};ee.gcm.prototype.encrypt=function(e,t,n){var r=e.length();if(r===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&r>=this.blockSize){for(var a=0;a0&&(i=this.blockSize-i),this._partialOutput.clear();for(var a=0;a0&&this._partialOutput.getBytes(this._partialBytes),i>0&&!n)return e.read-=this.blockSize,t.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=i,!0;t.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),ma(this._inBlock)};ee.gcm.prototype.decrypt=function(e,t,n){var r=e.length();if(r0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),ma(this._inBlock),this._hashBlock[0]=e.getInt32(),this._hashBlock[1]=e.getInt32(),this._hashBlock[2]=e.getInt32(),this._hashBlock[3]=e.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock);for(var a=0;a0;--r)t[r]=e[r]>>>1|(e[r-1]&1)<<31;t[0]=e[0]>>>1,n&&(t[0]^=this._R)};ee.gcm.prototype.tableMultiply=function(e){for(var t=[0,0,0,0],n=0;n<32;++n){var r=n/8|0,a=e[r]>>>(7-n%8)*4&15,i=this._m[n][a];t[0]^=i[0],t[1]^=i[1],t[2]^=i[2],t[3]^=i[3]}return t};ee.gcm.prototype.ghash=function(e,t,n){return t[0]^=n[0],t[1]^=n[1],t[2]^=n[2],t[3]^=n[3],this.tableMultiply(t)};ee.gcm.prototype.generateHashTable=function(e,t){for(var n=8/t,r=4*n,a=16*n,i=new Array(a),s=0;s>>1,a=new Array(n);a[r]=e.slice(0);for(var i=r>>>1;i>0;)this.pow(a[2*i],a[i]=[]),i>>=1;for(i=2;i4){var n=e;e=ke.util.createBuffer();for(var r=0;r{var me=X();pa();es();se();uu.exports=me.aes=me.aes||{};me.aes.startEncrypting=function(e,t,n,r){var a=ya({key:e,output:n,decrypt:!1,mode:r});return a.start(t),a};me.aes.createEncryptionCipher=function(e,t){return ya({key:e,output:null,decrypt:!1,mode:t})};me.aes.startDecrypting=function(e,t,n,r){var a=ya({key:e,output:n,decrypt:!0,mode:r});return a.start(t),a};me.aes.createDecryptionCipher=function(e,t){return ya({key:e,output:null,decrypt:!0,mode:t})};me.aes.Algorithm=function(e,t){ns||su();var n=this;n.name=e,n.mode=new t({blockSize:16,cipher:{encrypt:function(r,a){return rs(n._w,r,a,!1)},decrypt:function(r,a){return rs(n._w,r,a,!0)}}}),n._init=!1};me.aes.Algorithm.prototype.initialize=function(e){if(!this._init){var t=e.key,n;if(typeof t=="string"&&(t.length===16||t.length===24||t.length===32))t=me.util.createBuffer(t);else if(me.util.isArray(t)&&(t.length===16||t.length===24||t.length===32)){n=t,t=me.util.createBuffer();for(var r=0;r>>2;for(var r=0;r>8^o&255^99,it[n]=o,ts[o]=n,u=e[o],a=e[n],i=e[a],s=e[i],c=u<<24^o<<16^o<<8^(o^u),l=(a^i^s)<<24^(n^s)<<16^(n^i^s)<<8^(n^a^s);for(var f=0;f<4;++f)Cr[f][n]=c,wt[f][o]=l,c=c<<24|c>>>8,l=l<<24|l>>>8;n===0?n=r=1:(n=a^e[e[e[a^s]]],r^=e[e[r]])}}function ou(e,t){for(var n=e.slice(0),r,a=1,i=n.length,s=i+6+1,o=Gr*s,u=i;u>>16&255]<<24^it[r>>>8&255]<<16^it[r&255]<<8^it[r>>>24]^iu[a]<<24,a++):i>6&&u%i===4&&(r=it[r>>>24]<<24^it[r>>>16&255]<<16^it[r>>>8&255]<<8^it[r&255]),n[u]=n[u-i]^r;if(t){var c,l=wt[0],f=wt[1],d=wt[2],v=wt[3],p=n.slice(0);o=n.length;for(var u=0,g=o-Gr;u>>24]]^f[it[c>>>16&255]]^d[it[c>>>8&255]]^v[it[c&255]];n=p}return n}function rs(e,t,n,r){var a=e.length/4-1,i,s,o,u,c;r?(i=wt[0],s=wt[1],o=wt[2],u=wt[3],c=ts):(i=Cr[0],s=Cr[1],o=Cr[2],u=Cr[3],c=it);var l,f,d,v,p,g,x;l=t[0]^e[0],f=t[r?3:1]^e[1],d=t[2]^e[2],v=t[r?1:3]^e[3];for(var b=3,w=1;w>>24]^s[f>>>16&255]^o[d>>>8&255]^u[v&255]^e[++b],g=i[f>>>24]^s[d>>>16&255]^o[v>>>8&255]^u[l&255]^e[++b],x=i[d>>>24]^s[v>>>16&255]^o[l>>>8&255]^u[f&255]^e[++b],v=i[v>>>24]^s[l>>>16&255]^o[f>>>8&255]^u[d&255]^e[++b],l=p,f=g,d=x;n[0]=c[l>>>24]<<24^c[f>>>16&255]<<16^c[d>>>8&255]<<8^c[v&255]^e[++b],n[r?3:1]=c[f>>>24]<<24^c[d>>>16&255]<<16^c[v>>>8&255]<<8^c[l&255]^e[++b],n[2]=c[d>>>24]<<24^c[v>>>16&255]<<16^c[l>>>8&255]<<8^c[f&255]^e[++b],n[r?1:3]=c[v>>>24]<<24^c[l>>>16&255]<<16^c[f>>>8&255]<<8^c[d&255]^e[++b]}function ya(e){e=e||{};var t=(e.mode||"CBC").toUpperCase(),n="AES-"+t,r;e.decrypt?r=me.cipher.createDecipher(n,e.key):r=me.cipher.createCipher(n,e.key);var a=r.start;return r.start=function(i,s){var o=null;s instanceof me.util.ByteBuffer&&(o=s,s={}),s=s||{},s.output=o,s.iv=i,a.call(r,s)},r}});var lr=j((Dx,cu)=>{var Nn=X();Nn.pki=Nn.pki||{};var as=cu.exports=Nn.pki.oids=Nn.oids=Nn.oids||{};function N(e,t){as[e]=t,as[t]=e}function ce(e,t){as[e]=t}N("1.2.840.113549.1.1.1","rsaEncryption");N("1.2.840.113549.1.1.4","md5WithRSAEncryption");N("1.2.840.113549.1.1.5","sha1WithRSAEncryption");N("1.2.840.113549.1.1.7","RSAES-OAEP");N("1.2.840.113549.1.1.8","mgf1");N("1.2.840.113549.1.1.9","pSpecified");N("1.2.840.113549.1.1.10","RSASSA-PSS");N("1.2.840.113549.1.1.11","sha256WithRSAEncryption");N("1.2.840.113549.1.1.12","sha384WithRSAEncryption");N("1.2.840.113549.1.1.13","sha512WithRSAEncryption");N("1.3.101.112","EdDSA25519");N("1.2.840.10040.4.3","dsa-with-sha1");N("1.3.14.3.2.7","desCBC");N("1.3.14.3.2.26","sha1");N("1.3.14.3.2.29","sha1WithRSASignature");N("2.16.840.1.101.3.4.2.1","sha256");N("2.16.840.1.101.3.4.2.2","sha384");N("2.16.840.1.101.3.4.2.3","sha512");N("2.16.840.1.101.3.4.2.4","sha224");N("2.16.840.1.101.3.4.2.5","sha512-224");N("2.16.840.1.101.3.4.2.6","sha512-256");N("1.2.840.113549.2.2","md2");N("1.2.840.113549.2.5","md5");N("1.2.840.113549.1.7.1","data");N("1.2.840.113549.1.7.2","signedData");N("1.2.840.113549.1.7.3","envelopedData");N("1.2.840.113549.1.7.4","signedAndEnvelopedData");N("1.2.840.113549.1.7.5","digestedData");N("1.2.840.113549.1.7.6","encryptedData");N("1.2.840.113549.1.9.1","emailAddress");N("1.2.840.113549.1.9.2","unstructuredName");N("1.2.840.113549.1.9.3","contentType");N("1.2.840.113549.1.9.4","messageDigest");N("1.2.840.113549.1.9.5","signingTime");N("1.2.840.113549.1.9.6","counterSignature");N("1.2.840.113549.1.9.7","challengePassword");N("1.2.840.113549.1.9.8","unstructuredAddress");N("1.2.840.113549.1.9.14","extensionRequest");N("1.2.840.113549.1.9.20","friendlyName");N("1.2.840.113549.1.9.21","localKeyId");N("1.2.840.113549.1.9.22.1","x509Certificate");N("1.2.840.113549.1.12.10.1.1","keyBag");N("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag");N("1.2.840.113549.1.12.10.1.3","certBag");N("1.2.840.113549.1.12.10.1.4","crlBag");N("1.2.840.113549.1.12.10.1.5","secretBag");N("1.2.840.113549.1.12.10.1.6","safeContentsBag");N("1.2.840.113549.1.5.13","pkcs5PBES2");N("1.2.840.113549.1.5.12","pkcs5PBKDF2");N("1.2.840.113549.1.12.1.1","pbeWithSHAAnd128BitRC4");N("1.2.840.113549.1.12.1.2","pbeWithSHAAnd40BitRC4");N("1.2.840.113549.1.12.1.3","pbeWithSHAAnd3-KeyTripleDES-CBC");N("1.2.840.113549.1.12.1.4","pbeWithSHAAnd2-KeyTripleDES-CBC");N("1.2.840.113549.1.12.1.5","pbeWithSHAAnd128BitRC2-CBC");N("1.2.840.113549.1.12.1.6","pbewithSHAAnd40BitRC2-CBC");N("1.2.840.113549.2.7","hmacWithSHA1");N("1.2.840.113549.2.8","hmacWithSHA224");N("1.2.840.113549.2.9","hmacWithSHA256");N("1.2.840.113549.2.10","hmacWithSHA384");N("1.2.840.113549.2.11","hmacWithSHA512");N("1.2.840.113549.3.7","des-EDE3-CBC");N("2.16.840.1.101.3.4.1.2","aes128-CBC");N("2.16.840.1.101.3.4.1.22","aes192-CBC");N("2.16.840.1.101.3.4.1.42","aes256-CBC");N("2.5.4.3","commonName");N("2.5.4.4","surname");N("2.5.4.5","serialNumber");N("2.5.4.6","countryName");N("2.5.4.7","localityName");N("2.5.4.8","stateOrProvinceName");N("2.5.4.9","streetAddress");N("2.5.4.10","organizationName");N("2.5.4.11","organizationalUnitName");N("2.5.4.12","title");N("2.5.4.13","description");N("2.5.4.15","businessCategory");N("2.5.4.17","postalCode");N("2.5.4.42","givenName");N("1.3.6.1.4.1.311.60.2.1.2","jurisdictionOfIncorporationStateOrProvinceName");N("1.3.6.1.4.1.311.60.2.1.3","jurisdictionOfIncorporationCountryName");N("2.16.840.1.113730.1.1","nsCertType");N("2.16.840.1.113730.1.13","nsComment");ce("2.5.29.1","authorityKeyIdentifier");ce("2.5.29.2","keyAttributes");ce("2.5.29.3","certificatePolicies");ce("2.5.29.4","keyUsageRestriction");ce("2.5.29.5","policyMapping");ce("2.5.29.6","subtreesConstraint");ce("2.5.29.7","subjectAltName");ce("2.5.29.8","issuerAltName");ce("2.5.29.9","subjectDirectoryAttributes");ce("2.5.29.10","basicConstraints");ce("2.5.29.11","nameConstraints");ce("2.5.29.12","policyConstraints");ce("2.5.29.13","basicConstraints");N("2.5.29.14","subjectKeyIdentifier");N("2.5.29.15","keyUsage");ce("2.5.29.16","privateKeyUsagePeriod");N("2.5.29.17","subjectAltName");N("2.5.29.18","issuerAltName");N("2.5.29.19","basicConstraints");ce("2.5.29.20","cRLNumber");ce("2.5.29.21","cRLReason");ce("2.5.29.22","expirationDate");ce("2.5.29.23","instructionCode");ce("2.5.29.24","invalidityDate");ce("2.5.29.25","cRLDistributionPoints");ce("2.5.29.26","issuingDistributionPoint");ce("2.5.29.27","deltaCRLIndicator");ce("2.5.29.28","issuingDistributionPoint");ce("2.5.29.29","certificateIssuer");ce("2.5.29.30","nameConstraints");N("2.5.29.31","cRLDistributionPoints");N("2.5.29.32","certificatePolicies");ce("2.5.29.33","policyMappings");ce("2.5.29.34","policyConstraints");N("2.5.29.35","authorityKeyIdentifier");ce("2.5.29.36","policyConstraints");N("2.5.29.37","extKeyUsage");ce("2.5.29.46","freshestCRL");ce("2.5.29.54","inhibitAnyPolicy");N("1.3.6.1.4.1.11129.2.4.2","timestampList");N("1.3.6.1.5.5.7.1.1","authorityInfoAccess");N("1.3.6.1.5.5.7.3.1","serverAuth");N("1.3.6.1.5.5.7.3.2","clientAuth");N("1.3.6.1.5.5.7.3.3","codeSigning");N("1.3.6.1.5.5.7.3.4","emailProtection");N("1.3.6.1.5.5.7.3.8","timeStamping")});var It=j((Px,fu)=>{var xe=X();se();lr();var O=fu.exports=xe.asn1=xe.asn1||{};O.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};O.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30};O.create=function(e,t,n,r,a){if(xe.util.isArray(r)){for(var i=[],s=0;st){var r=new Error("Too few bytes to parse DER.");throw r.available=e.length(),r.remaining=t,r.requested=n,r}}var wp=function(e,t){var n=e.getByte();if(t--,n!==128){var r,a=n&128;if(!a)r=n;else{var i=n&127;kn(e,t,i),r=e.getInt(i<<3)}if(r<0)throw new Error("Negative length: "+r);return r}};O.fromDer=function(e,t){t===void 0&&(t={strict:!0,parseAllBytes:!0,decodeBitStrings:!0}),typeof t=="boolean"&&(t={strict:t,parseAllBytes:!0,decodeBitStrings:!0}),"strict"in t||(t.strict=!0),"parseAllBytes"in t||(t.parseAllBytes=!0),"decodeBitStrings"in t||(t.decodeBitStrings=!0),typeof e=="string"&&(e=xe.util.createBuffer(e));var n=e.length(),r=va(e,e.length(),0,t);if(t.parseAllBytes&&e.length()!==0){var a=new Error("Unparsed DER bytes remain after ASN.1 parsing.");throw a.byteCount=n,a.remaining=e.length(),a}return r};function va(e,t,n,r){var a;kn(e,t,2);var i=e.getByte();t--;var s=i&192,o=i&31;a=e.length();var u=wp(e,t);if(t-=a-e.length(),u!==void 0&&u>t){if(r.strict){var c=new Error("Too few bytes to read ASN.1 value.");throw c.available=e.length(),c.remaining=t,c.requested=u,c}u=t}var l,f,d=(i&32)===32;if(d)if(l=[],u===void 0)for(;;){if(kn(e,t,2),e.bytes(2)===String.fromCharCode(0,0)){e.getBytes(2),t-=2;break}a=e.length(),l.push(va(e,t,n+1,r)),t-=a-e.length()}else for(;u>0;)a=e.length(),l.push(va(e,u,n+1,r)),t-=a-e.length(),u-=a-e.length();if(l===void 0&&s===O.Class.UNIVERSAL&&o===O.Type.BITSTRING&&(f=e.bytes(u)),l===void 0&&r.decodeBitStrings&&s===O.Class.UNIVERSAL&&o===O.Type.BITSTRING&&u>1){var v=e.read,p=t,g=0;if(o===O.Type.BITSTRING&&(kn(e,t,1),g=e.getByte(),t--),g===0)try{a=e.length();var x={strict:!0,decodeBitStrings:!0},b=va(e,t,n+1,x),w=a-e.length();t-=w,o==O.Type.BITSTRING&&w++;var A=b.tagClass;w===u&&(A===O.Class.UNIVERSAL||A===O.Class.CONTEXT_SPECIFIC)&&(l=[b])}catch{}l===void 0&&(e.read=v,t=p)}if(l===void 0){if(u===void 0){if(r.strict)throw new Error("Non-constructed ASN.1 object of indefinite length.");u=t}if(o===O.Type.BMPSTRING)for(l="";u>0;u-=2)kn(e,t,2),l+=String.fromCharCode(e.getInt16()),t-=2;else l=e.getBytes(u),t-=u}var D=f===void 0?null:{bitStringContents:f};return O.create(s,o,d,l,D)}O.toDer=function(e){var t=xe.util.createBuffer(),n=e.tagClass|e.type,r=xe.util.createBuffer(),a=!1;if("bitStringContents"in e&&(a=!0,e.original&&(a=O.equals(e,e.original))),a)r.putBytes(e.bitStringContents);else if(e.composed){e.constructed?n|=32:r.putByte(0);for(var i=0;i1&&(e.value.charCodeAt(0)===0&&!(e.value.charCodeAt(1)&128)||e.value.charCodeAt(0)===255&&(e.value.charCodeAt(1)&128)===128)?r.putBytes(e.value.substr(1)):r.putBytes(e.value);if(t.putByte(n),r.length()<=127)t.putByte(r.length()&127);else{var s=r.length(),o="";do o+=String.fromCharCode(s&255),s=s>>>8;while(s>0);t.putByte(o.length|128);for(var i=o.length-1;i>=0;--i)t.putByte(o.charCodeAt(i))}return t.putBuffer(r),t};O.oidToDer=function(e){var t=e.split("."),n=xe.util.createBuffer();n.putByte(40*parseInt(t[0],10)+parseInt(t[1],10));for(var r,a,i,s,o=2;o>>7,r||(s|=128),a.push(s),r=!1;while(i>0);for(var u=a.length-1;u>=0;--u)n.putByte(a[u])}return n};O.derToOid=function(e){var t;typeof e=="string"&&(e=xe.util.createBuffer(e));var n=e.getByte();t=Math.floor(n/40)+"."+n%40;for(var r=0;e.length()>0;)n=e.getByte(),r=r<<7,n&128?r+=n&127:(t+="."+(r+n),r=0);return t};O.utcTimeToDate=function(e){var t=new Date,n=parseInt(e.substr(0,2),10);n=n>=50?1900+n:2e3+n;var r=parseInt(e.substr(2,2),10)-1,a=parseInt(e.substr(4,2),10),i=parseInt(e.substr(6,2),10),s=parseInt(e.substr(8,2),10),o=0;if(e.length>11){var u=e.charAt(10),c=10;u!=="+"&&u!=="-"&&(o=parseInt(e.substr(10,2),10),c+=2)}if(t.setUTCFullYear(n,r,a),t.setUTCHours(i,s,o,0),c&&(u=e.charAt(c),u==="+"||u==="-")){var l=parseInt(e.substr(c+1,2),10),f=parseInt(e.substr(c+4,2),10),d=l*60+f;d*=6e4,u==="+"?t.setTime(+t-d):t.setTime(+t+d)}return t};O.generalizedTimeToDate=function(e){var t=new Date,n=parseInt(e.substr(0,4),10),r=parseInt(e.substr(4,2),10)-1,a=parseInt(e.substr(6,2),10),i=parseInt(e.substr(8,2),10),s=parseInt(e.substr(10,2),10),o=parseInt(e.substr(12,2),10),u=0,c=0,l=!1;e.charAt(e.length-1)==="Z"&&(l=!0);var f=e.length-5,d=e.charAt(f);if(d==="+"||d==="-"){var v=parseInt(e.substr(f+1,2),10),p=parseInt(e.substr(f+4,2),10);c=v*60+p,c*=6e4,d==="+"&&(c*=-1),l=!0}return e.charAt(14)==="."&&(u=parseFloat(e.substr(14),10)*1e3),l?(t.setUTCFullYear(n,r,a),t.setUTCHours(i,s,o,u),t.setTime(+t+c)):(t.setFullYear(n,r,a),t.setHours(i,s,o,u)),t};O.dateToUtcTime=function(e){if(typeof e=="string")return e;var t="",n=[];n.push((""+e.getUTCFullYear()).substr(2)),n.push(""+(e.getUTCMonth()+1)),n.push(""+e.getUTCDate()),n.push(""+e.getUTCHours()),n.push(""+e.getUTCMinutes()),n.push(""+e.getUTCSeconds());for(var r=0;r=-128&&e<128)return t.putSignedInt(e,8);if(e>=-32768&&e<32768)return t.putSignedInt(e,16);if(e>=-8388608&&e<8388608)return t.putSignedInt(e,24);if(e>=-2147483648&&e<2147483648)return t.putSignedInt(e,32);var n=new Error("Integer too large; max is 32-bits.");throw n.integer=e,n};O.derToInteger=function(e){typeof e=="string"&&(e=xe.util.createBuffer(e));var t=e.length()*8;if(t>32)throw new Error("Integer too large; max is 32-bits.");return e.getSignedInt(t)};O.validate=function(e,t,n,r){var a=!1;if((e.tagClass===t.tagClass||typeof t.tagClass>"u")&&(e.type===t.type||typeof t.type>"u"))if(e.constructed===t.constructed||typeof t.constructed>"u"){if(a=!0,t.value&&xe.util.isArray(t.value))for(var i=0,s=0;a&&s0&&(r+=` `);for(var a="",i=0;i1?r+="0x"+xe.util.bytesToHex(e.value.slice(1)):r+="(none)",e.value.length>0){var c=e.value.charCodeAt(0);c==1?r+=" (1 unused bit shown)":c>1&&(r+=" ("+c+" unused bits shown)")}}else if(e.type===O.Type.OCTETSTRING)lu.test(e.value)||(r+="("+e.value+") "),r+="0x"+xe.util.bytesToHex(e.value);else if(e.type===O.Type.UTF8)try{r+=xe.util.decodeUtf8(e.value)}catch(l){if(l.message==="URI malformed")r+="0x"+xe.util.bytesToHex(e.value)+" (malformed UTF8)";else throw l}else e.type===O.Type.PRINTABLESTRING||e.type===O.Type.IA5String?r+=e.value:lu.test(e.value)?r+="0x"+xe.util.bytesToHex(e.value):e.value.length===0?r+="[null]":r+=e.value}return r}});var kt=j((Ux,du)=>{var ga=X();du.exports=ga.md=ga.md||{};ga.md.algorithms=ga.md.algorithms||{}});var zr=j((Ox,pu)=>{var Yt=X();kt();se();var Ip=pu.exports=Yt.hmac=Yt.hmac||{};Ip.create=function(){var e=null,t=null,n=null,r=null,a={};return a.start=function(i,s){if(i!==null)if(typeof i=="string")if(i=i.toLowerCase(),i in Yt.md.algorithms)t=Yt.md.algorithms[i].create();else throw new Error('Unknown hash algorithm "'+i+'"');else t=i;if(s===null)s=e;else{if(typeof s=="string")s=Yt.util.createBuffer(s);else if(Yt.util.isArray(s)){var o=s;s=Yt.util.createBuffer();for(var u=0;ut.blockLength&&(t.start(),t.update(s.bytes()),s=t.digest()),n=Yt.util.createBuffer(),r=Yt.util.createBuffer(),c=s.length();for(var u=0;u{var Lt=X();kt();se();var mu=vu.exports=Lt.md5=Lt.md5||{};Lt.md.md5=Lt.md.algorithms.md5=mu;mu.create=function(){yu||Ap();var e=null,t=Lt.util.createBuffer(),n=new Array(16),r={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8};return r.start=function(){r.messageLength=0,r.fullMessageLength=r.messageLength64=[];for(var a=r.messageLengthSize/4,i=0;i>>0,s>>>0];for(var o=r.fullMessageLength.length-1;o>=0;--o)r.fullMessageLength[o]+=s[1],s[1]=s[0]+(r.fullMessageLength[o]/4294967296>>>0),r.fullMessageLength[o]=r.fullMessageLength[o]>>>0,s[0]=s[1]/4294967296>>>0;return t.putBytes(a),hu(e,n,t),(t.read>2048||t.length()===0)&&t.compact(),r},r.digest=function(){var a=Lt.util.createBuffer();a.putBytes(t.bytes());var i=r.fullMessageLength[r.fullMessageLength.length-1]+r.messageLengthSize,s=i&r.blockLength-1;a.putBytes(is.substr(0,r.blockLength-s));for(var o,u=0,c=r.fullMessageLength.length-1;c>=0;--c)o=r.fullMessageLength[c]*8+u,u=o/4294967296>>>0,a.putInt32Le(o>>>0);var l={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3};hu(l,n,a);var f=Lt.util.createBuffer();return f.putInt32Le(l.h0),f.putInt32Le(l.h1),f.putInt32Le(l.h2),f.putInt32Le(l.h3),f},r};var is=null,xa=null,Ln=null,jr=null,yu=!1;function Ap(){is=String.fromCharCode(128),is+=Lt.util.fillString(String.fromCharCode(0),64),xa=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1,6,11,0,5,10,15,4,9,14,3,8,13,2,7,12,5,8,11,14,1,4,7,10,13,0,3,6,9,12,15,2,0,7,14,5,12,3,10,1,8,15,6,13,4,11,2,9],Ln=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21],jr=new Array(64);for(var e=0;e<64;++e)jr[e]=Math.floor(Math.abs(Math.sin(e+1))*4294967296);yu=!0}function hu(e,t,n){for(var r,a,i,s,o,u,c,l,f=n.length();f>=64;){for(a=e.h0,i=e.h1,s=e.h2,o=e.h3,l=0;l<16;++l)t[l]=n.getInt32Le(),u=o^i&(s^o),r=a+u+jr[l]+t[l],c=Ln[l],a=o,o=s,s=i,i+=r<>>32-c;for(;l<32;++l)u=s^o&(i^s),r=a+u+jr[l]+t[xa[l]],c=Ln[l],a=o,o=s,s=i,i+=r<>>32-c;for(;l<48;++l)u=i^s^o,r=a+u+jr[l]+t[xa[l]],c=Ln[l],a=o,o=s,s=i,i+=r<>>32-c;for(;l<64;++l)u=s^(i|~o),r=a+u+jr[l]+t[xa[l]],c=Ln[l],a=o,o=s,s=i,i+=r<>>32-c;e.h0=e.h0+a|0,e.h1=e.h1+i|0,e.h2=e.h2+s|0,e.h3=e.h3+o|0,f-=64}}});var Er=j((Fx,xu)=>{var ba=X();se();var gu=xu.exports=ba.pem=ba.pem||{};gu.encode=function(e,t){t=t||{};var n="-----BEGIN "+e.type+`-----\r `,r;if(e.procType&&(r={name:"Proc-Type",values:[String(e.procType.version),e.procType.type]},n+=Ea(r)),e.contentDomain&&(r={name:"Content-Domain",values:[e.contentDomain]},n+=Ea(r)),e.dekInfo&&(r={name:"DEK-Info",values:[e.dekInfo.algorithm]},e.dekInfo.parameters&&r.values.push(e.dekInfo.parameters),n+=Ea(r)),e.headers)for(var a=0;a65&&s!==-1){var o=t[s];o===","?(++s,t=t.substr(0,s)+`\r `+t.substr(s)):t=t.substr(0,s)+`\r `+o+t.substr(s+1),i=a-s-1,s=-1,++a}else(t[a]===" "||t[a]===" "||t[a]===",")&&(s=a);return t}function Bp(e){return e.replace(/^\s+/,"")}});var Dn=j((Mx,Eu)=>{var be=X();pa();es();se();Eu.exports=be.des=be.des||{};be.des.startEncrypting=function(e,t,n,r){var a=Sa({key:e,output:n,decrypt:!1,mode:r||(t===null?"ECB":"CBC")});return a.start(t),a};be.des.createEncryptionCipher=function(e,t){return Sa({key:e,output:null,decrypt:!1,mode:t})};be.des.startDecrypting=function(e,t,n,r){var a=Sa({key:e,output:n,decrypt:!0,mode:r||(t===null?"ECB":"CBC")});return a.start(t),a};be.des.createDecryptionCipher=function(e,t){return Sa({key:e,output:null,decrypt:!0,mode:t})};be.des.Algorithm=function(e,t){var n=this;n.name=e,n.mode=new t({blockSize:8,cipher:{encrypt:function(r,a){return Cu(n._keys,r,a,!1)},decrypt:function(r,a){return Cu(n._keys,r,a,!0)}}}),n._init=!1};be.des.Algorithm.prototype.initialize=function(e){if(!this._init){var t=be.util.createBuffer(e.key);if(this.name.indexOf("3DES")===0&&t.length()!==24)throw new Error("Invalid Triple-DES key size: "+t.length()*8);this._keys=Op(t),this._init=!0}};Dt("DES-ECB",be.cipher.modes.ecb);Dt("DES-CBC",be.cipher.modes.cbc);Dt("DES-CFB",be.cipher.modes.cfb);Dt("DES-OFB",be.cipher.modes.ofb);Dt("DES-CTR",be.cipher.modes.ctr);Dt("3DES-ECB",be.cipher.modes.ecb);Dt("3DES-CBC",be.cipher.modes.cbc);Dt("3DES-CFB",be.cipher.modes.cfb);Dt("3DES-OFB",be.cipher.modes.ofb);Dt("3DES-CTR",be.cipher.modes.ctr);function Dt(e,t){var n=function(){return new be.des.Algorithm(e,t)};be.cipher.registerAlgorithm(e,n)}var _p=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],Rp=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],Np=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],kp=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],Lp=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],Dp=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],Pp=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],Up=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];function Op(e){for(var t=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],n=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],r=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],a=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],i=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],s=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],o=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],u=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],c=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],l=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],f=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],d=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],v=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],p=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],g=e.length()>8?3:1,x=[],b=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],w=0,A,D=0;D>>4^L)&252645135,L^=A,k^=A<<4,A=(L>>>-16^k)&65535,k^=A,L^=A<<-16,A=(k>>>2^L)&858993459,L^=A,k^=A<<2,A=(L>>>-16^k)&65535,k^=A,L^=A<<-16,A=(k>>>1^L)&1431655765,L^=A,k^=A<<1,A=(L>>>8^k)&16711935,k^=A,L^=A<<8,A=(k>>>1^L)&1431655765,L^=A,k^=A<<1,A=k<<8|L>>>20&240,k=L<<24|L<<8&16711680|L>>>8&65280|L>>>24&240,L=A;for(var z=0;z>>26,L=L<<2|L>>>26):(k=k<<1|k>>>27,L=L<<1|L>>>27),k&=-15,L&=-15;var Z=t[k>>>28]|n[k>>>24&15]|r[k>>>20&15]|a[k>>>16&15]|i[k>>>12&15]|s[k>>>8&15]|o[k>>>4&15],le=u[L>>>28]|c[L>>>24&15]|l[L>>>20&15]|f[L>>>16&15]|d[L>>>12&15]|v[L>>>8&15]|p[L>>>4&15];A=(le>>>16^Z)&65535,x[w++]=Z^A,x[w++]=le^A<<16}}return x}function Cu(e,t,n,r){var a=e.length===32?3:9,i;a===3?i=r?[30,-2,-2]:[0,32,2]:i=r?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var s,o=t[0],u=t[1];s=(o>>>4^u)&252645135,u^=s,o^=s<<4,s=(o>>>16^u)&65535,u^=s,o^=s<<16,s=(u>>>2^o)&858993459,o^=s,u^=s<<2,s=(u>>>8^o)&16711935,o^=s,u^=s<<8,s=(o>>>1^u)&1431655765,u^=s,o^=s<<1,o=o<<1|o>>>31,u=u<<1|u>>>31;for(var c=0;c>>4|u<<28)^e[d+1];s=o,o=u,u=s^(Rp[v>>>24&63]|kp[v>>>16&63]|Dp[v>>>8&63]|Up[v&63]|_p[p>>>24&63]|Np[p>>>16&63]|Lp[p>>>8&63]|Pp[p&63])}s=o,o=u,u=s}o=o>>>1|o<<31,u=u>>>1|u<<31,s=(o>>>1^u)&1431655765,u^=s,o^=s<<1,s=(u>>>8^o)&16711935,o^=s,u^=s<<8,s=(u>>>2^o)&858993459,o^=s,u^=s<<2,s=(o>>>16^u)&65535,u^=s,o^=s<<16,s=(o>>>4^u)&252645135,u^=s,o^=s<<4,n[0]=o,n[1]=u}function Sa(e){e=e||{};var t=(e.mode||"CBC").toUpperCase(),n="DES-"+t,r;e.decrypt?r=be.cipher.createDecipher(n,e.key):r=be.cipher.createCipher(n,e.key);var a=r.start;return r.start=function(i,s){var o=null;s instanceof be.util.ByteBuffer&&(o=s,s={}),s=s||{},s.output=o,s.iv=i,a.call(r,s)},r}});var Ta=j(()=>{});var wa=j((Hx,bu)=>{var st=X();zr();kt();se();var Vp=st.pkcs5=st.pkcs5||{},Qt;st.util.isNodejs&&!st.options.usePureJavaScript&&(Qt=Ta());bu.exports=st.pbkdf2=Vp.pbkdf2=function(e,t,n,r,a,i){if(typeof a=="function"&&(i=a,a=null),st.util.isNodejs&&!st.options.usePureJavaScript&&Qt.pbkdf2&&(a===null||typeof a!="object")&&(Qt.pbkdf2Sync.length>4||!a||a==="sha1"))return typeof a!="string"&&(a="sha1"),e=Buffer.from(e,"binary"),t=Buffer.from(t,"binary"),i?Qt.pbkdf2Sync.length===4?Qt.pbkdf2(e,t,n,r,function(A,D){if(A)return i(A);i(null,D.toString("binary"))}):Qt.pbkdf2(e,t,n,r,a,function(A,D){if(A)return i(A);i(null,D.toString("binary"))}):Qt.pbkdf2Sync.length===4?Qt.pbkdf2Sync(e,t,n,r).toString("binary"):Qt.pbkdf2Sync(e,t,n,r,a).toString("binary");if((typeof a>"u"||a===null)&&(a="sha1"),typeof a=="string"){if(!(a in st.md.algorithms))throw new Error("Unknown hash algorithm: "+a);a=st.md[a].create()}var s=a.digestLength;if(r>4294967295*s){var o=new Error("Derived key is too long.");if(i)return i(o);throw o}var u=Math.ceil(r/s),c=r-(u-1)*s,l=st.hmac.create();l.start(a,e);var f="",d,v,p;if(!i){for(var g=1;g<=u;++g){l.start(null,null),l.update(t),l.update(st.util.int32ToBytes(g)),d=p=l.digest().getBytes();for(var x=2;x<=n;++x)l.start(null,null),l.update(p),v=l.digest().getBytes(),d=st.util.xorBytes(d,v,s),p=v;f+=gu)return i(null,f);l.start(null,null),l.update(t),l.update(st.util.int32ToBytes(g)),d=p=l.digest().getBytes(),x=2,w()}function w(){if(x<=n)return l.start(null,null),l.update(p),v=l.digest().getBytes(),d=st.util.xorBytes(d,v,s),p=v,++x,st.util.setImmediate(w);f+=g{var Pt=X();kt();se();var Tu=Au.exports=Pt.sha256=Pt.sha256||{};Pt.md.sha256=Pt.md.algorithms.sha256=Tu;Tu.create=function(){wu||Fp();var e=null,t=Pt.util.createBuffer(),n=new Array(64),r={algorithm:"sha256",blockLength:64,digestLength:32,messageLength:0,fullMessageLength:null,messageLengthSize:8};return r.start=function(){r.messageLength=0,r.fullMessageLength=r.messageLength64=[];for(var a=r.messageLengthSize/4,i=0;i>>0,s>>>0];for(var o=r.fullMessageLength.length-1;o>=0;--o)r.fullMessageLength[o]+=s[1],s[1]=s[0]+(r.fullMessageLength[o]/4294967296>>>0),r.fullMessageLength[o]=r.fullMessageLength[o]>>>0,s[0]=s[1]/4294967296>>>0;return t.putBytes(a),Su(e,n,t),(t.read>2048||t.length()===0)&&t.compact(),r},r.digest=function(){var a=Pt.util.createBuffer();a.putBytes(t.bytes());var i=r.fullMessageLength[r.fullMessageLength.length-1]+r.messageLengthSize,s=i&r.blockLength-1;a.putBytes(ss.substr(0,r.blockLength-s));for(var o,u,c=r.fullMessageLength[0]*8,l=0;l>>0,c+=u,a.putInt32(c>>>0),c=o>>>0;a.putInt32(c);var f={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4,h5:e.h5,h6:e.h6,h7:e.h7};Su(f,n,a);var d=Pt.util.createBuffer();return d.putInt32(f.h0),d.putInt32(f.h1),d.putInt32(f.h2),d.putInt32(f.h3),d.putInt32(f.h4),d.putInt32(f.h5),d.putInt32(f.h6),d.putInt32(f.h7),d},r};var ss=null,wu=!1,Iu=null;function Fp(){ss=String.fromCharCode(128),ss+=Pt.util.fillString(String.fromCharCode(0),64),Iu=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],wu=!0}function Su(e,t,n){for(var r,a,i,s,o,u,c,l,f,d,v,p,g,x,b,w=n.length();w>=64;){for(c=0;c<16;++c)t[c]=n.getInt32();for(;c<64;++c)r=t[c-2],r=(r>>>17|r<<15)^(r>>>19|r<<13)^r>>>10,a=t[c-15],a=(a>>>7|a<<25)^(a>>>18|a<<14)^a>>>3,t[c]=r+t[c-7]+a+t[c-16]|0;for(l=e.h0,f=e.h1,d=e.h2,v=e.h3,p=e.h4,g=e.h5,x=e.h6,b=e.h7,c=0;c<64;++c)s=(p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7),o=x^p&(g^x),i=(l>>>2|l<<30)^(l>>>13|l<<19)^(l>>>22|l<<10),u=l&f|d&(l^f),r=b+s+o+Iu[c]+t[c],a=i+u,b=x,x=g,g=p,p=v+r>>>0,v=d,d=f,f=l,l=r+a>>>0;e.h0=e.h0+l|0,e.h1=e.h1+f|0,e.h2=e.h2+d|0,e.h3=e.h3+v|0,e.h4=e.h4+p|0,e.h5=e.h5+g|0,e.h6=e.h6+x|0,e.h7=e.h7+b|0,w-=64}}});var us=j((Wx,Bu)=>{var Ut=X();se();var Ia=null;Ut.util.isNodejs&&!Ut.options.usePureJavaScript&&!process.versions["node-webkit"]&&(Ia=Ta());var Mp=Bu.exports=Ut.prng=Ut.prng||{};Mp.create=function(e){for(var t={plugin:e,key:null,seed:null,time:null,reseeds:0,generated:0,keyBytes:""},n=e.md,r=new Array(32),a=0;a<32;++a)r[a]=n.create();t.pools=r,t.pool=0,t.generate=function(c,l){if(!l)return t.generateSync(c);var f=t.plugin.cipher,d=t.plugin.increment,v=t.plugin.formatKey,p=t.plugin.formatSeed,g=Ut.util.createBuffer();t.key=null,x();function x(b){if(b)return l(b);if(g.length()>=c)return l(null,g.getBytes(c));if(t.generated>1048575&&(t.key=null),t.key===null)return Ut.util.nextTick(function(){i(x)});var w=f(t.key,t.seed);t.generated+=w.length,g.putBytes(w),t.key=v(f(t.key,d(t.seed))),t.seed=p(f(t.key,t.seed)),Ut.util.setImmediate(x)}},t.generateSync=function(c){var l=t.plugin.cipher,f=t.plugin.increment,d=t.plugin.formatKey,v=t.plugin.formatSeed;t.key=null;for(var p=Ut.util.createBuffer();p.length()1048575&&(t.key=null),t.key===null&&s();var g=l(t.key,t.seed);t.generated+=g.length,p.putBytes(g),t.key=d(l(t.key,f(t.seed))),t.seed=v(l(t.key,t.seed))}return p.getBytes(c)};function i(c){if(t.pools[0].messageLength>=32)return o(),c();var l=32-t.pools[0].messageLength<<5;t.seedFile(l,function(f,d){if(f)return c(f);t.collect(d),o(),c()})}function s(){if(t.pools[0].messageLength>=32)return o();var c=32-t.pools[0].messageLength<<5;t.collect(t.seedFileSync(c)),o()}function o(){t.reseeds=t.reseeds===4294967295?0:t.reseeds+1;var c=t.plugin.md.create();c.update(t.keyBytes);for(var l=1,f=0;f<32;++f)t.reseeds%l===0&&(c.update(t.pools[f].digest().getBytes()),t.pools[f].start()),l=l<<1;t.keyBytes=c.digest().getBytes(),c.start(),c.update(t.keyBytes);var d=c.digest().getBytes();t.key=t.plugin.formatKey(t.keyBytes),t.seed=t.plugin.formatSeed(d),t.generated=0}function u(c){var l=null,f=Ut.util.globalScope,d=f.crypto||f.msCrypto;d&&d.getRandomValues&&(l=function(k){return d.getRandomValues(k)});var v=Ut.util.createBuffer();if(l)for(;v.length()>16),w+=(b&32767)<<16,w+=b>>15,w=(w&2147483647)+(w>>31),D=w&4294967295;for(var x=0;x<3;++x)A=D>>>(x<<3),A^=Math.floor(Math.random()*256),v.putByte(A&255)}return v.getBytes(c)}return Ia?(t.seedFile=function(c,l){Ia.randomBytes(c,function(f,d){if(f)return l(f);l(null,d.toString())})},t.seedFileSync=function(c){return Ia.randomBytes(c).toString()}):(t.seedFile=function(c,l){try{l(null,u(c))}catch(f){l(f)}},t.seedFileSync=u),t.collect=function(c){for(var l=c.length,f=0;f>d&255);t.collect(f)},t.registerWorker=function(c){if(c===self)t.seedFile=function(f,d){function v(p){var g=p.data;g.forge&&g.forge.prng&&(self.removeEventListener("message",v),d(g.forge.prng.err,g.forge.prng.bytes))}self.addEventListener("message",v),self.postMessage({forge:{prng:{needed:f}}})};else{var l=function(f){var d=f.data;d.forge&&d.forge.prng&&t.seedFile(d.forge.prng.needed,function(v,p){c.postMessage({forge:{prng:{err:v,bytes:p}}})})};c.addEventListener("message",l)}},t}});var vt=j((zx,cs)=>{var Le=X();cr();os();us();se();(function(){if(Le.random&&Le.random.getBytes){cs.exports=Le.random;return}(function(e){var t={},n=new Array(4),r=Le.util.createBuffer();t.formatKey=function(f){var d=Le.util.createBuffer(f);return f=new Array(4),f[0]=d.getInt32(),f[1]=d.getInt32(),f[2]=d.getInt32(),f[3]=d.getInt32(),Le.aes._expandKey(f,!1)},t.formatSeed=function(f){var d=Le.util.createBuffer(f);return f=new Array(4),f[0]=d.getInt32(),f[1]=d.getInt32(),f[2]=d.getInt32(),f[3]=d.getInt32(),f},t.cipher=function(f,d){return Le.aes._updateBlock(f,d,n,!1),r.putInt32(n[0]),r.putInt32(n[1]),r.putInt32(n[2]),r.putInt32(n[3]),r.getBytes()},t.increment=function(f){return++f[3],f},t.md=Le.md.sha256;function a(){var f=Le.prng.create(t);return f.getBytes=function(d,v){return f.generate(d,v)},f.getBytesSync=function(d){return f.generate(d)},f}var i=a(),s=null,o=Le.util.globalScope,u=o.crypto||o.msCrypto;if(u&&u.getRandomValues&&(s=function(f){return u.getRandomValues(f)}),Le.options.usePureJavaScript||!Le.util.isNodejs&&!s){if(typeof window>"u"||window.document,i.collectInt(+new Date,32),typeof navigator<"u"){var c="";for(var l in navigator)try{typeof navigator[l]=="string"&&(c+=navigator[l])}catch{}i.collect(c),c=null}e&&(e().mousemove(function(f){i.collectInt(f.clientX,16),i.collectInt(f.clientY,16)}),e().keypress(function(f){i.collectInt(f.charCode,8)}))}if(!Le.random)Le.random=i;else for(var l in i)Le.random[l]=i[l];Le.random.createInstance=a,cs.exports=Le.random})(typeof jQuery<"u"?jQuery:null)})()});var fs=j((jx,Nu)=>{var ct=X();se();var ls=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],_u=[1,2,3,5],Kp=function(e,t){return e<>16-t},qp=function(e,t){return(e&65535)>>t|e<<16-t&65535};Nu.exports=ct.rc2=ct.rc2||{};ct.rc2.expandKey=function(e,t){typeof e=="string"&&(e=ct.util.createBuffer(e)),t=t||128;var n=e,r=e.length(),a=t,i=Math.ceil(a/8),s=255>>(a&7),o;for(o=r;o<128;o++)n.putByte(ls[n.at(o-1)+n.at(o-r)&255]);for(n.setAt(128-i,ls[n.at(128-i)&s]),o=127-i;o>=0;o--)n.setAt(o,ls[n.at(o+1)^n.at(o+i)]);return n};var Ru=function(e,t,n){var r=!1,a=null,i=null,s=null,o,u,c,l,f=[];for(e=ct.rc2.expandKey(e,t),c=0;c<64;c++)f.push(e.getInt16Le());n?(o=function(p){for(c=0;c<4;c++)p[c]+=f[l]+(p[(c+3)%4]&p[(c+2)%4])+(~p[(c+3)%4]&p[(c+1)%4]),p[c]=Kp(p[c],_u[c]),l++},u=function(p){for(c=0;c<4;c++)p[c]+=f[p[(c+3)%4]&63]}):(o=function(p){for(c=3;c>=0;c--)p[c]=qp(p[c],_u[c]),p[c]-=f[l]+(p[(c+3)%4]&p[(c+2)%4])+(~p[(c+3)%4]&p[(c+1)%4]),l--},u=function(p){for(c=3;c>=0;c--)p[c]-=f[p[(c+3)%4]&63]});var d=function(p){var g=[];for(c=0;c<4;c++){var x=a.getInt16Le();s!==null&&(n?x^=s.getInt16Le():s.putInt16Le(x)),g.push(x&65535)}l=n?0:63;for(var b=0;b=8;)d([[5,o],[1,u],[6,o],[1,u],[5,o]])},finish:function(p){var g=!0;if(n)if(p)g=p(8,a,!n);else{var x=a.length()===8?8:8-a.length();a.fillWithByte(x,x)}if(g&&(r=!0,v.update()),!n&&(g=a.length()===0,g))if(p)g=p(8,i,!n);else{var b=i.length(),w=i.at(b-1);w>b?g=!1:i.truncate(w)}return g}},v};ct.rc2.startEncrypting=function(e,t,n){var r=ct.rc2.createEncryptionCipher(e,128);return r.start(t,n),r};ct.rc2.createEncryptionCipher=function(e,t){return Ru(e,t,!0)};ct.rc2.startDecrypting=function(e,t,n){var r=ct.rc2.createDecryptionCipher(e,128);return r.start(t,n),r};ct.rc2.createDecryptionCipher=function(e,t){return Ru(e,t,!1)}});var Un=j((Yx,Fu)=>{var ds=X();Fu.exports=ds.jsbn=ds.jsbn||{};var Xt,Hp=0xdeadbeefcafe,ku=(Hp&16777215)==15715070;function _(e,t,n){this.data=[],e!=null&&(typeof e=="number"?this.fromNumber(e,t,n):t==null&&typeof e!="string"?this.fromString(e,256):this.fromString(e,t))}ds.jsbn.BigInteger=_;function oe(){return new _(null)}function Gp(e,t,n,r,a,i){for(;--i>=0;){var s=t*this.data[e++]+n.data[r]+a;a=Math.floor(s/67108864),n.data[r++]=s&67108863}return a}function Wp(e,t,n,r,a,i){for(var s=t&32767,o=t>>15;--i>=0;){var u=this.data[e]&32767,c=this.data[e++]>>15,l=o*u+c*s;u=s*u+((l&32767)<<15)+n.data[r]+(a&1073741823),a=(u>>>30)+(l>>>15)+o*c+(a>>>30),n.data[r++]=u&1073741823}return a}function Lu(e,t,n,r,a,i){for(var s=t&16383,o=t>>14;--i>=0;){var u=this.data[e]&16383,c=this.data[e++]>>14,l=o*u+c*s;u=s*u+((l&16383)<<14)+n.data[r]+a,a=(u>>28)+(l>>14)+o*c,n.data[r++]=u&268435455}return a}typeof navigator>"u"?(_.prototype.am=Lu,Xt=28):ku&&navigator.appName=="Microsoft Internet Explorer"?(_.prototype.am=Wp,Xt=30):ku&&navigator.appName!="Netscape"?(_.prototype.am=Gp,Xt=26):(_.prototype.am=Lu,Xt=28);_.prototype.DB=Xt;_.prototype.DM=(1<=0;--t)e.data[t]=this.data[t];e.t=this.t,e.s=this.s}function Yp(e){this.t=1,this.s=e<0?-1:0,e>0?this.data[0]=e:e<-1?this.data[0]=e+this.DV:this.t=0}function fr(e){var t=oe();return t.fromInt(e),t}function Qp(e,t){var n;if(t==16)n=4;else if(t==8)n=3;else if(t==256)n=8;else if(t==2)n=1;else if(t==32)n=5;else if(t==4)n=2;else{this.fromRadix(e,t);return}this.t=0,this.s=0;for(var r=e.length,a=!1,i=0;--r>=0;){var s=n==8?e[r]&255:Pu(e,r);if(s<0){e.charAt(r)=="-"&&(a=!0);continue}a=!1,i==0?this.data[this.t++]=s:i+n>this.DB?(this.data[this.t-1]|=(s&(1<>this.DB-i):this.data[this.t-1]|=s<=this.DB&&(i-=this.DB)}n==8&&e[0]&128&&(this.s=-1,i>0&&(this.data[this.t-1]|=(1<0&&this.data[this.t-1]==e;)--this.t}function Zp(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(e==16)t=4;else if(e==8)t=3;else if(e==2)t=1;else if(e==32)t=5;else if(e==4)t=2;else return this.toRadix(e);var n=(1<0)for(o>o)>0&&(a=!0,i=Du(r));s>=0;)o>(o+=this.DB-t)):(r=this.data[s]>>(o-=t)&n,o<=0&&(o+=this.DB,--s)),r>0&&(a=!0),a&&(i+=Du(r));return a?i:"0"}function Jp(){var e=oe();return _.ZERO.subTo(this,e),e}function $p(){return this.s<0?this.negate():this}function eh(e){var t=this.s-e.s;if(t!=0)return t;var n=this.t;if(t=n-e.t,t!=0)return this.s<0?-t:t;for(;--n>=0;)if((t=this.data[n]-e.data[n])!=0)return t;return 0}function Ba(e){var t=1,n;return(n=e>>>16)!=0&&(e=n,t+=16),(n=e>>8)!=0&&(e=n,t+=8),(n=e>>4)!=0&&(e=n,t+=4),(n=e>>2)!=0&&(e=n,t+=2),(n=e>>1)!=0&&(e=n,t+=1),t}function th(){return this.t<=0?0:this.DB*(this.t-1)+Ba(this.data[this.t-1]^this.s&this.DM)}function rh(e,t){var n;for(n=this.t-1;n>=0;--n)t.data[n+e]=this.data[n];for(n=e-1;n>=0;--n)t.data[n]=0;t.t=this.t+e,t.s=this.s}function nh(e,t){for(var n=e;n=0;--o)t.data[o+i+1]=this.data[o]>>r|s,s=(this.data[o]&a)<=0;--o)t.data[o]=0;t.data[i]=s,t.t=this.t+i+1,t.s=this.s,t.clamp()}function ih(e,t){t.s=this.s;var n=Math.floor(e/this.DB);if(n>=this.t){t.t=0;return}var r=e%this.DB,a=this.DB-r,i=(1<>r;for(var s=n+1;s>r;r>0&&(t.data[this.t-n-1]|=(this.s&i)<>=this.DB;if(e.t>=this.DB;r+=this.s}else{for(r+=this.s;n>=this.DB;r-=e.s}t.s=r<0?-1:0,r<-1?t.data[n++]=this.DV+r:r>0&&(t.data[n++]=r),t.t=n,t.clamp()}function oh(e,t){var n=this.abs(),r=e.abs(),a=n.t;for(t.t=a+r.t;--a>=0;)t.data[a]=0;for(a=0;a=0;)e.data[n]=0;for(n=0;n=t.DV&&(e.data[n+t.t]-=t.DV,e.data[n+t.t+1]=1)}e.t>0&&(e.data[e.t-1]+=t.am(n,t.data[n],e,2*n,0,1)),e.s=0,e.clamp()}function ch(e,t,n){var r=e.abs();if(!(r.t<=0)){var a=this.abs();if(a.t0?(r.lShiftTo(u,i),a.lShiftTo(u,n)):(r.copyTo(i),a.copyTo(n));var c=i.t,l=i.data[c-1];if(l!=0){var f=l*(1<1?i.data[c-2]>>this.F2:0),d=this.FV/f,v=(1<=0&&(n.data[n.t++]=1,n.subTo(b,n)),_.ONE.dlShiftTo(c,b),b.subTo(i,i);i.t=0;){var w=n.data[--g]==l?this.DM:Math.floor(n.data[g]*d+(n.data[g-1]+p)*v);if((n.data[g]+=i.am(0,w,n,x,0,c))0&&n.rShiftTo(u,n),s<0&&_.ZERO.subTo(n,n)}}}function lh(e){var t=oe();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(_.ZERO)>0&&e.subTo(t,t),t}function br(e){this.m=e}function fh(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e}function dh(e){return e}function ph(e){e.divRemTo(this.m,null,e)}function hh(e,t,n){e.multiplyTo(t,n),this.reduce(n)}function mh(e,t){e.squareTo(t),this.reduce(t)}br.prototype.convert=fh;br.prototype.revert=dh;br.prototype.reduce=ph;br.prototype.mulTo=hh;br.prototype.sqrTo=mh;function yh(){if(this.t<1)return 0;var e=this.data[0];if(!(e&1))return 0;var t=e&3;return t=t*(2-(e&15)*t)&15,t=t*(2-(e&255)*t)&255,t=t*(2-((e&65535)*t&65535))&65535,t=t*(2-e*t%this.DV)%this.DV,t>0?this.DV-t:-t}function Sr(e){this.m=e,this.mp=e.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<0&&this.m.subTo(t,t),t}function gh(e){var t=oe();return e.copyTo(t),this.reduce(t),t}function xh(e){for(;e.t<=this.mt2;)e.data[e.t++]=0;for(var t=0;t>15)*this.mpl&this.um)<<15)&e.DM;for(n=t+this.m.t,e.data[n]+=this.m.am(0,r,e,t,0,this.m.t);e.data[n]>=e.DV;)e.data[n]-=e.DV,e.data[++n]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)}function Ch(e,t){e.squareTo(t),this.reduce(t)}function Eh(e,t,n){e.multiplyTo(t,n),this.reduce(n)}Sr.prototype.convert=vh;Sr.prototype.revert=gh;Sr.prototype.reduce=xh;Sr.prototype.mulTo=Eh;Sr.prototype.sqrTo=Ch;function bh(){return(this.t>0?this.data[0]&1:this.s)==0}function Sh(e,t){if(e>4294967295||e<1)return _.ONE;var n=oe(),r=oe(),a=t.convert(this),i=Ba(e)-1;for(a.copyTo(n);--i>=0;)if(t.sqrTo(n,r),(e&1<0)t.mulTo(r,a,n);else{var s=n;n=r,r=s}return t.revert(n)}function Th(e,t){var n;return e<256||t.isEven()?n=new br(t):n=new Sr(t),this.exp(e,n)}_.prototype.copyTo=jp;_.prototype.fromInt=Yp;_.prototype.fromString=Qp;_.prototype.clamp=Xp;_.prototype.dlShiftTo=rh;_.prototype.drShiftTo=nh;_.prototype.lShiftTo=ah;_.prototype.rShiftTo=ih;_.prototype.subTo=sh;_.prototype.multiplyTo=oh;_.prototype.squareTo=uh;_.prototype.divRemTo=ch;_.prototype.invDigit=yh;_.prototype.isEven=bh;_.prototype.exp=Sh;_.prototype.toString=Zp;_.prototype.negate=Jp;_.prototype.abs=$p;_.prototype.compareTo=eh;_.prototype.bitLength=th;_.prototype.mod=lh;_.prototype.modPowInt=Th;_.ZERO=fr(0);_.ONE=fr(1);function wh(){var e=oe();return this.copyTo(e),e}function Ih(){if(this.s<0){if(this.t==1)return this.data[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this.data[0];if(this.t==0)return 0}return(this.data[1]&(1<<32-this.DB)-1)<>24}function Bh(){return this.t==0?this.s:this.data[0]<<16>>16}function _h(e){return Math.floor(Math.LN2*this.DB/Math.log(e))}function Rh(){return this.s<0?-1:this.t<=0||this.t==1&&this.data[0]<=0?0:1}function Nh(e){if(e==null&&(e=10),this.signum()==0||e<2||e>36)return"0";var t=this.chunkSize(e),n=Math.pow(e,t),r=fr(n),a=oe(),i=oe(),s="";for(this.divRemTo(r,a,i);a.signum()>0;)s=(n+i.intValue()).toString(e).substr(1)+s,a.divRemTo(r,a,i);return i.intValue().toString(e)+s}function kh(e,t){this.fromInt(0),t==null&&(t=10);for(var n=this.chunkSize(t),r=Math.pow(t,n),a=!1,i=0,s=0,o=0;o=n&&(this.dMultiply(r),this.dAddOffset(s,0),i=0,s=0)}i>0&&(this.dMultiply(Math.pow(t,i)),this.dAddOffset(s,0)),a&&_.ZERO.subTo(this,this)}function Lh(e,t,n){if(typeof t=="number")if(e<2)this.fromInt(1);else for(this.fromNumber(e,n),this.testBit(e-1)||this.bitwiseTo(_.ONE.shiftLeft(e-1),hs,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(_.ONE.shiftLeft(e-1),this);else{var r=new Array,a=e&7;r.length=(e>>3)+1,t.nextBytes(r),a>0?r[0]&=(1<0)for(n>n)!=(this.s&this.DM)>>n&&(t[a++]=r|this.s<=0;)n<8?(r=(this.data[e]&(1<>(n+=this.DB-8)):(r=this.data[e]>>(n-=8)&255,n<=0&&(n+=this.DB,--e)),r&128&&(r|=-256),a==0&&(this.s&128)!=(r&128)&&++a,(a>0||r!=this.s)&&(t[a++]=r);return t}function Ph(e){return this.compareTo(e)==0}function Uh(e){return this.compareTo(e)<0?this:e}function Oh(e){return this.compareTo(e)>0?this:e}function Vh(e,t,n){var r,a,i=Math.min(e.t,this.t);for(r=0;r>=16,t+=16),e&255||(e>>=8,t+=8),e&15||(e>>=4,t+=4),e&3||(e>>=2,t+=2),e&1||++t,t}function Yh(){for(var e=0;e=this.t?this.s!=0:(this.data[t]&1<>=this.DB;if(e.t>=this.DB;r+=this.s}else{for(r+=this.s;n>=this.DB;r+=e.s}t.s=r<0?-1:0,r>0?t.data[n++]=r:r<-1&&(t.data[n++]=this.DV+r),t.t=n,t.clamp()}function nm(e){var t=oe();return this.addTo(e,t),t}function am(e){var t=oe();return this.subTo(e,t),t}function im(e){var t=oe();return this.multiplyTo(e,t),t}function sm(e){var t=oe();return this.divRemTo(e,t,null),t}function om(e){var t=oe();return this.divRemTo(e,null,t),t}function um(e){var t=oe(),n=oe();return this.divRemTo(e,t,n),new Array(t,n)}function cm(e){this.data[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()}function lm(e,t){if(e!=0){for(;this.t<=t;)this.data[this.t++]=0;for(this.data[t]+=e;this.data[t]>=this.DV;)this.data[t]-=this.DV,++t>=this.t&&(this.data[this.t++]=0),++this.data[t]}}function Pn(){}function Vu(e){return e}function fm(e,t,n){e.multiplyTo(t,n)}function dm(e,t){e.squareTo(t)}Pn.prototype.convert=Vu;Pn.prototype.revert=Vu;Pn.prototype.mulTo=fm;Pn.prototype.sqrTo=dm;function pm(e){return this.exp(e,new Pn)}function hm(e,t,n){var r=Math.min(this.t+e.t,t);for(n.s=0,n.t=r;r>0;)n.data[--r]=0;var a;for(a=n.t-this.t;r=0;)n.data[r]=0;for(r=Math.max(t-this.t,0);r2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=oe();return e.copyTo(t),this.reduce(t),t}function vm(e){return e}function gm(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)}function xm(e,t){e.squareTo(t),this.reduce(t)}function Cm(e,t,n){e.multiplyTo(t,n),this.reduce(n)}Qr.prototype.convert=ym;Qr.prototype.revert=vm;Qr.prototype.reduce=gm;Qr.prototype.mulTo=Cm;Qr.prototype.sqrTo=xm;function Em(e,t){var n=e.bitLength(),r,a=fr(1),i;if(n<=0)return a;n<18?r=1:n<48?r=3:n<144?r=4:n<768?r=5:r=6,n<8?i=new br(t):t.isEven()?i=new Qr(t):i=new Sr(t);var s=new Array,o=3,u=r-1,c=(1<1){var l=oe();for(i.sqrTo(s[1],l);o<=c;)s[o]=oe(),i.mulTo(l,s[o-2],s[o]),o+=2}var f=e.t-1,d,v=!0,p=oe(),g;for(n=Ba(e.data[f])-1;f>=0;){for(n>=u?d=e.data[f]>>n-u&c:(d=(e.data[f]&(1<0&&(d|=e.data[f-1]>>this.DB+n-u)),o=r;!(d&1);)d>>=1,--o;if((n-=o)<0&&(n+=this.DB,--f),v)s[d].copyTo(a),v=!1;else{for(;o>1;)i.sqrTo(a,p),i.sqrTo(p,a),o-=2;o>0?i.sqrTo(a,p):(g=a,a=p,p=g),i.mulTo(p,s[d],a)}for(;f>=0&&!(e.data[f]&1<0&&(t.rShiftTo(i,t),n.rShiftTo(i,n));t.signum()>0;)(a=t.getLowestSetBit())>0&&t.rShiftTo(a,t),(a=n.getLowestSetBit())>0&&n.rShiftTo(a,n),t.compareTo(n)>=0?(t.subTo(n,t),t.rShiftTo(1,t)):(n.subTo(t,n),n.rShiftTo(1,n));return i>0&&n.lShiftTo(i,n),n}function Sm(e){if(e<=0)return 0;var t=this.DV%e,n=this.s<0?e-1:0;if(this.t>0)if(t==0)n=this.data[0]%e;else for(var r=this.t-1;r>=0;--r)n=(t*n+this.data[r])%e;return n}function Tm(e){var t=e.isEven();if(this.isEven()&&t||e.signum()==0)return _.ZERO;for(var n=e.clone(),r=this.clone(),a=fr(1),i=fr(0),s=fr(0),o=fr(1);n.signum()!=0;){for(;n.isEven();)n.rShiftTo(1,n),t?((!a.isEven()||!i.isEven())&&(a.addTo(this,a),i.subTo(e,i)),a.rShiftTo(1,a)):i.isEven()||i.subTo(e,i),i.rShiftTo(1,i);for(;r.isEven();)r.rShiftTo(1,r),t?((!s.isEven()||!o.isEven())&&(s.addTo(this,s),o.subTo(e,o)),s.rShiftTo(1,s)):o.isEven()||o.subTo(e,o),o.rShiftTo(1,o);n.compareTo(r)>=0?(n.subTo(r,n),t&&a.subTo(s,a),i.subTo(o,i)):(r.subTo(n,r),t&&s.subTo(a,s),o.subTo(i,o))}if(r.compareTo(_.ONE)!=0)return _.ZERO;if(o.compareTo(e)>=0)return o.subtract(e);if(o.signum()<0)o.addTo(e,o);else return o;return o.signum()<0?o.add(e):o}var At=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509],wm=(1<<26)/At[At.length-1];function Im(e){var t,n=this.abs();if(n.t==1&&n.data[0]<=At[At.length-1]){for(t=0;t=0);var o=i.modPow(r,this);if(o.compareTo(_.ONE)!=0&&o.compareTo(t)!=0){for(var u=1;u++{var Ot=X();kt();se();var Ku=Hu.exports=Ot.sha1=Ot.sha1||{};Ot.md.sha1=Ot.md.algorithms.sha1=Ku;Ku.create=function(){qu||_m();var e=null,t=Ot.util.createBuffer(),n=new Array(80),r={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8};return r.start=function(){r.messageLength=0,r.fullMessageLength=r.messageLength64=[];for(var a=r.messageLengthSize/4,i=0;i>>0,s>>>0];for(var o=r.fullMessageLength.length-1;o>=0;--o)r.fullMessageLength[o]+=s[1],s[1]=s[0]+(r.fullMessageLength[o]/4294967296>>>0),r.fullMessageLength[o]=r.fullMessageLength[o]>>>0,s[0]=s[1]/4294967296>>>0;return t.putBytes(a),Mu(e,n,t),(t.read>2048||t.length()===0)&&t.compact(),r},r.digest=function(){var a=Ot.util.createBuffer();a.putBytes(t.bytes());var i=r.fullMessageLength[r.fullMessageLength.length-1]+r.messageLengthSize,s=i&r.blockLength-1;a.putBytes(ms.substr(0,r.blockLength-s));for(var o,u,c=r.fullMessageLength[0]*8,l=0;l>>0,c+=u,a.putInt32(c>>>0),c=o>>>0;a.putInt32(c);var f={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4};Mu(f,n,a);var d=Ot.util.createBuffer();return d.putInt32(f.h0),d.putInt32(f.h1),d.putInt32(f.h2),d.putInt32(f.h3),d.putInt32(f.h4),d},r};var ms=null,qu=!1;function _m(){ms=String.fromCharCode(128),ms+=Ot.util.fillString(String.fromCharCode(0),64),qu=!0}function Mu(e,t,n){for(var r,a,i,s,o,u,c,l,f=n.length();f>=64;){for(a=e.h0,i=e.h1,s=e.h2,o=e.h3,u=e.h4,l=0;l<16;++l)r=n.getInt32(),t[l]=r,c=o^i&(s^o),r=(a<<5|a>>>27)+c+u+1518500249+r,u=o,o=s,s=(i<<30|i>>>2)>>>0,i=a,a=r;for(;l<20;++l)r=t[l-3]^t[l-8]^t[l-14]^t[l-16],r=r<<1|r>>>31,t[l]=r,c=o^i&(s^o),r=(a<<5|a>>>27)+c+u+1518500249+r,u=o,o=s,s=(i<<30|i>>>2)>>>0,i=a,a=r;for(;l<32;++l)r=t[l-3]^t[l-8]^t[l-14]^t[l-16],r=r<<1|r>>>31,t[l]=r,c=i^s^o,r=(a<<5|a>>>27)+c+u+1859775393+r,u=o,o=s,s=(i<<30|i>>>2)>>>0,i=a,a=r;for(;l<40;++l)r=t[l-6]^t[l-16]^t[l-28]^t[l-32],r=r<<2|r>>>30,t[l]=r,c=i^s^o,r=(a<<5|a>>>27)+c+u+1859775393+r,u=o,o=s,s=(i<<30|i>>>2)>>>0,i=a,a=r;for(;l<60;++l)r=t[l-6]^t[l-16]^t[l-28]^t[l-32],r=r<<2|r>>>30,t[l]=r,c=i&s|o&(i^s),r=(a<<5|a>>>27)+c+u+2400959708+r,u=o,o=s,s=(i<<30|i>>>2)>>>0,i=a,a=r;for(;l<80;++l)r=t[l-6]^t[l-16]^t[l-28]^t[l-32],r=r<<2|r>>>30,t[l]=r,c=i^s^o,r=(a<<5|a>>>27)+c+u+3395469782+r,u=o,o=s,s=(i<<30|i>>>2)>>>0,i=a,a=r;e.h0=e.h0+a|0,e.h1=e.h1+i|0,e.h2=e.h2+s|0,e.h3=e.h3+o|0,e.h4=e.h4+u|0,f-=64}}});var ys=j((Xx,Wu)=>{var Vt=X();se();vt();Xr();var Gu=Wu.exports=Vt.pkcs1=Vt.pkcs1||{};Gu.encode_rsa_oaep=function(e,t,n){var r,a,i,s;typeof n=="string"?(r=n,a=arguments[3]||void 0,i=arguments[4]||void 0):n&&(r=n.label||void 0,a=n.seed||void 0,i=n.md||void 0,n.mgf1&&n.mgf1.md&&(s=n.mgf1.md)),i?i.start():i=Vt.md.sha1.create(),s||(s=i);var o=Math.ceil(e.n.bitLength()/8),u=o-2*i.digestLength-2;if(t.length>u){var c=new Error("RSAES-OAEP input message length is too long.");throw c.length=t.length,c.maxLength=u,c}r||(r=""),i.update(r,"raw");for(var l=i.digest(),f="",d=u-t.length,v=0;v>24&255,i>>16&255,i>>8&255,i&255);n.start(),n.update(e+s),r+=n.digest().getBytes()}return r.substring(0,t)}});var gs=j((Zx,vs)=>{var dr=X();se();Un();vt();(function(){if(dr.prime){vs.exports=dr.prime;return}var e=vs.exports=dr.prime=dr.prime||{},t=dr.jsbn.BigInteger,n=[6,4,2,4,2,4,6,2],r=new t(null);r.fromInt(30);var a=function(f,d){return f|d};e.generateProbablePrime=function(f,d,v){typeof d=="function"&&(v=d,d={}),d=d||{};var p=d.algorithm||"PRIMEINC";typeof p=="string"&&(p={name:p}),p.options=p.options||{};var g=d.prng||dr.random,x={nextBytes:function(b){for(var w=g.getBytesSync(b.length),A=0;Ad&&(f=c(d,v)),f.isProbablePrime(g))return b(null,f);f.dAddOffset(n[p++%8],0)}while(x<0||+new Date-w"u")return s(f,d,v,p);var g=c(f,d),x=v.workers,b=v.workLoad||100,w=b*30/8,A=v.workerScript||"forge/prime.worker.js";if(x===-1)return dr.util.estimateCores(function(k,L){k&&(L=2),x=L-1,D()});D();function D(){x=Math.max(1,x);for(var k=[],L=0;Lf&&(g=c(f,d));var $e=g.toString(16);fe.target.postMessage({hex:$e,workLoad:b}),g.dAddOffset(w,0)}}}}function c(f,d){var v=new t(f,d),p=f-1;return v.testBit(p)||v.bitwiseTo(t.ONE.shiftLeft(p),a,v),v.dAddOffset(31-v.mod(r).byteValue(),0),v}function l(f){return f<=100?27:f<=150?18:f<=200?15:f<=250?12:f<=300?9:f<=350?8:f<=400?7:f<=500?6:f<=600?5:f<=800?4:f<=1250?3:2}})()});var On=j((Jx,Ju)=>{var q=X();It();Un();lr();ys();gs();vt();se();typeof ae>"u"&&(ae=q.jsbn.BigInteger);var ae,xs=q.util.isNodejs?Ta():null,T=q.asn1,xt=q.util;q.pki=q.pki||{};Ju.exports=q.pki.rsa=q.rsa=q.rsa||{};var Y=q.pki,Rm=[6,4,2,4,2,4,6,2],Nm={name:"PrivateKeyInfo",tagClass:T.Class.UNIVERSAL,type:T.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:T.Class.UNIVERSAL,type:T.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:T.Class.UNIVERSAL,type:T.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:T.Class.UNIVERSAL,type:T.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:T.Class.UNIVERSAL,type:T.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},km={name:"RSAPrivateKey",tagClass:T.Class.UNIVERSAL,type:T.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:T.Class.UNIVERSAL,type:T.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",tagClass:T.Class.UNIVERSAL,type:T.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:T.Class.UNIVERSAL,type:T.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:T.Class.UNIVERSAL,type:T.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:T.Class.UNIVERSAL,type:T.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",tagClass:T.Class.UNIVERSAL,type:T.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:T.Class.UNIVERSAL,type:T.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:T.Class.UNIVERSAL,type:T.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:T.Class.UNIVERSAL,type:T.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},Lm={name:"RSAPublicKey",tagClass:T.Class.UNIVERSAL,type:T.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:T.Class.UNIVERSAL,type:T.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:T.Class.UNIVERSAL,type:T.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},Dm=q.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:T.Class.UNIVERSAL,type:T.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:T.Class.UNIVERSAL,type:T.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:T.Class.UNIVERSAL,type:T.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:T.Class.UNIVERSAL,type:T.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:T.Class.UNIVERSAL,type:T.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},Pm={name:"DigestInfo",tagClass:T.Class.UNIVERSAL,type:T.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm",tagClass:T.Class.UNIVERSAL,type:T.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm.algorithmIdentifier",tagClass:T.Class.UNIVERSAL,type:T.Type.OID,constructed:!1,capture:"algorithmIdentifier"},{name:"DigestInfo.DigestAlgorithm.parameters",tagClass:T.Class.UNIVERSAL,type:T.Type.NULL,capture:"parameters",optional:!0,constructed:!1}]},{name:"DigestInfo.digest",tagClass:T.Class.UNIVERSAL,type:T.Type.OCTETSTRING,constructed:!1,capture:"digest"}]},Um=function(e){var t;if(e.algorithm in Y.oids)t=Y.oids[e.algorithm];else{var n=new Error("Unknown message digest algorithm.");throw n.algorithm=e.algorithm,n}var r=T.oidToDer(t).getBytes(),a=T.create(T.Class.UNIVERSAL,T.Type.SEQUENCE,!0,[]),i=T.create(T.Class.UNIVERSAL,T.Type.SEQUENCE,!0,[]);i.value.push(T.create(T.Class.UNIVERSAL,T.Type.OID,!1,r)),i.value.push(T.create(T.Class.UNIVERSAL,T.Type.NULL,!1,""));var s=T.create(T.Class.UNIVERSAL,T.Type.OCTETSTRING,!1,e.digest().getBytes());return a.value.push(i),a.value.push(s),T.toDer(a).getBytes()},Xu=function(e,t,n){if(n)return e.modPow(t.e,t.n);if(!t.p||!t.q)return e.modPow(t.d,t.n);t.dP||(t.dP=t.d.mod(t.p.subtract(ae.ONE))),t.dQ||(t.dQ=t.d.mod(t.q.subtract(ae.ONE))),t.qInv||(t.qInv=t.q.modInverse(t.p));var r;do r=new ae(q.util.bytesToHex(q.random.getBytes(t.n.bitLength()/8)),16);while(r.compareTo(t.n)>=0||!r.gcd(t.n).equals(ae.ONE));e=e.multiply(r.modPow(t.e,t.n)).mod(t.n);for(var a=e.mod(t.p).modPow(t.dP,t.p),i=e.mod(t.q).modPow(t.dQ,t.q);a.compareTo(i)<0;)a=a.add(t.p);var s=a.subtract(i).multiply(t.qInv).mod(t.p).multiply(t.q).add(i);return s=s.multiply(r.modInverse(t.n)).mod(t.n),s};Y.rsa.encrypt=function(e,t,n){var r=n,a,i=Math.ceil(t.n.bitLength()/8);n!==!1&&n!==!0?(r=n===2,a=Zu(e,t,n)):(a=q.util.createBuffer(),a.putBytes(e));for(var s=new ae(a.toHex(),16),o=Xu(s,t,r),u=o.toString(16),c=q.util.createBuffer(),l=i-Math.ceil(u.length/2);l>0;)c.putByte(0),--l;return c.putBytes(q.util.hexToBytes(u)),c.getBytes()};Y.rsa.decrypt=function(e,t,n,r){var a=Math.ceil(t.n.bitLength()/8);if(e.length!==a){var i=new Error("Encrypted message length is invalid.");throw i.length=e.length,i.expected=a,i}var s=new ae(q.util.createBuffer(e).toHex(),16);if(s.compareTo(t.n)>=0)throw new Error("Encrypted message is invalid.");for(var o=Xu(s,t,n),u=o.toString(16),c=q.util.createBuffer(),l=a-Math.ceil(u.length/2);l>0;)c.putByte(0),--l;return c.putBytes(q.util.hexToBytes(u)),r!==!1?Ra(c.getBytes(),t,n):c.getBytes()};Y.rsa.createKeyPairGenerationState=function(e,t,n){typeof e=="string"&&(e=parseInt(e,10)),e=e||2048,n=n||{};var r=n.prng||q.random,a={nextBytes:function(o){for(var u=r.getBytesSync(o.length),c=0;c>1,pBits:e-(e>>1),pqState:0,num:null,keys:null},s.e.fromInt(s.eInt);else throw new Error("Invalid key generation algorithm: "+i);return s};Y.rsa.stepKeyPairGenerationState=function(e,t){"algorithm"in e||(e.algorithm="PRIMEINC");var n=new ae(null);n.fromInt(30);for(var r=0,a=function(f,d){return f|d},i=+new Date,s,o=0;e.keys===null&&(t<=0||ou?e.pqState=0:e.num.isProbablePrime(Vm(e.num.bitLength()))?++e.pqState:e.num.dAddOffset(Rm[r++%8],0):e.pqState===2?e.pqState=e.num.subtract(ae.ONE).gcd(e.e).compareTo(ae.ONE)===0?3:0:e.pqState===3&&(e.pqState=0,e.p===null?e.p=e.num:e.q=e.num,e.p!==null&&e.q!==null&&++e.state,e.num=null)}else if(e.state===1)e.p.compareTo(e.q)<0&&(e.num=e.p,e.p=e.q,e.q=e.num),++e.state;else if(e.state===2)e.p1=e.p.subtract(ae.ONE),e.q1=e.q.subtract(ae.ONE),e.phi=e.p1.multiply(e.q1),++e.state;else if(e.state===3)e.phi.gcd(e.e).compareTo(ae.ONE)===0?++e.state:(e.p=null,e.q=null,e.state=0);else if(e.state===4)e.n=e.p.multiply(e.q),e.n.bitLength()===e.bits?++e.state:(e.q=null,e.state=0);else if(e.state===5){var l=e.e.modInverse(e.phi);e.keys={privateKey:Y.rsa.setPrivateKey(e.n,e.e,l,e.p,e.q,l.mod(e.p1),l.mod(e.q1),e.q.modInverse(e.p)),publicKey:Y.rsa.setPublicKey(e.n,e.e)}}s=+new Date,o+=s-i,i=s}return e.keys!==null};Y.rsa.generateKeyPair=function(e,t,n,r){if(arguments.length===1?typeof e=="object"?(n=e,e=void 0):typeof e=="function"&&(r=e,e=void 0):arguments.length===2?typeof e=="number"?typeof t=="function"?(r=t,t=void 0):typeof t!="number"&&(n=t,t=void 0):(n=e,r=t,e=void 0,t=void 0):arguments.length===3&&(typeof t=="number"?typeof n=="function"&&(r=n,n=void 0):(r=n,n=t,t=void 0)),n=n||{},e===void 0&&(e=n.bits||2048),t===void 0&&(t=n.e||65537),!q.options.usePureJavaScript&&!n.prng&&e>=256&&e<=16384&&(t===65537||t===3)){if(r){if(zu("generateKeyPair"))return xs.generateKeyPair("rsa",{modulusLength:e,publicExponent:t,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}},function(o,u,c){if(o)return r(o);r(null,{privateKey:Y.privateKeyFromPem(c),publicKey:Y.publicKeyFromPem(u)})});if(ju("generateKey")&&ju("exportKey"))return xt.globalScope.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:Qu(t),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(function(o){return xt.globalScope.crypto.subtle.exportKey("pkcs8",o.privateKey)}).then(void 0,function(o){r(o)}).then(function(o){if(o){var u=Y.privateKeyFromAsn1(T.fromDer(q.util.createBuffer(o)));r(null,{privateKey:u,publicKey:Y.setRsaPublicKey(u.n,u.e)})}});if(Yu("generateKey")&&Yu("exportKey")){var a=xt.globalScope.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:Qu(t),hash:{name:"SHA-256"}},!0,["sign","verify"]);a.oncomplete=function(o){var u=o.target.result,c=xt.globalScope.msCrypto.subtle.exportKey("pkcs8",u.privateKey);c.oncomplete=function(l){var f=l.target.result,d=Y.privateKeyFromAsn1(T.fromDer(q.util.createBuffer(f)));r(null,{privateKey:d,publicKey:Y.setRsaPublicKey(d.n,d.e)})},c.onerror=function(l){r(l)}},a.onerror=function(o){r(o)};return}}else if(zu("generateKeyPairSync")){var i=xs.generateKeyPairSync("rsa",{modulusLength:e,publicExponent:t,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}});return{privateKey:Y.privateKeyFromPem(i.privateKey),publicKey:Y.publicKeyFromPem(i.publicKey)}}}var s=Y.rsa.createKeyPairGenerationState(e,t,n);if(!r)return Y.rsa.stepKeyPairGenerationState(s,0),s.keys;Om(s,n,r)};Y.setRsaPublicKey=Y.rsa.setPublicKey=function(e,t){var n={n:e,e:t};return n.encrypt=function(r,a,i){if(typeof a=="string"?a=a.toUpperCase():a===void 0&&(a="RSAES-PKCS1-V1_5"),a==="RSAES-PKCS1-V1_5")a={encode:function(o,u,c){return Zu(o,u,2).getBytes()}};else if(a==="RSA-OAEP"||a==="RSAES-OAEP")a={encode:function(o,u){return q.pkcs1.encode_rsa_oaep(u,o,i)}};else if(["RAW","NONE","NULL",null].indexOf(a)!==-1)a={encode:function(o){return o}};else if(typeof a=="string")throw new Error('Unsupported encryption scheme: "'+a+'".');var s=a.encode(r,n,!0);return Y.rsa.encrypt(s,n,!0)},n.verify=function(r,a,i,s){typeof i=="string"?i=i.toUpperCase():i===void 0&&(i="RSASSA-PKCS1-V1_5"),s===void 0&&(s={_parseAllDigestBytes:!0}),"_parseAllDigestBytes"in s||(s._parseAllDigestBytes=!0),i==="RSASSA-PKCS1-V1_5"?i={verify:function(u,c){c=Ra(c,n,!0);var l=T.fromDer(c,{parseAllBytes:s._parseAllDigestBytes}),f={},d=[];if(!T.validate(l,Pm,f,d)){var v=new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value.");throw v.errors=d,v}var p=T.derToOid(f.algorithmIdentifier);if(!(p===q.oids.md2||p===q.oids.md5||p===q.oids.sha1||p===q.oids.sha224||p===q.oids.sha256||p===q.oids.sha384||p===q.oids.sha512||p===q.oids["sha512-224"]||p===q.oids["sha512-256"])){var v=new Error("Unknown RSASSA-PKCS1-v1_5 DigestAlgorithm identifier.");throw v.oid=p,v}if((p===q.oids.md2||p===q.oids.md5)&&!("parameters"in f))throw new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value. Missing algorithm identifer NULL parameters.");return u===f.digest}}:(i==="NONE"||i==="NULL"||i===null)&&(i={verify:function(u,c){return c=Ra(c,n,!0),u===c}});var o=Y.rsa.decrypt(a,n,!0,!1);return i.verify(r,o,n.n.bitLength())},n};Y.setRsaPrivateKey=Y.rsa.setPrivateKey=function(e,t,n,r,a,i,s,o){var u={n:e,e:t,d:n,p:r,q:a,dP:i,dQ:s,qInv:o};return u.decrypt=function(c,l,f){typeof l=="string"?l=l.toUpperCase():l===void 0&&(l="RSAES-PKCS1-V1_5");var d=Y.rsa.decrypt(c,u,!1,!1);if(l==="RSAES-PKCS1-V1_5")l={decode:Ra};else if(l==="RSA-OAEP"||l==="RSAES-OAEP")l={decode:function(v,p){return q.pkcs1.decode_rsa_oaep(p,v,f)}};else if(["RAW","NONE","NULL",null].indexOf(l)!==-1)l={decode:function(v){return v}};else throw new Error('Unsupported encryption scheme: "'+l+'".');return l.decode(d,u,!1)},u.sign=function(c,l){var f=!1;typeof l=="string"&&(l=l.toUpperCase()),l===void 0||l==="RSASSA-PKCS1-V1_5"?(l={encode:Um},f=1):(l==="NONE"||l==="NULL"||l===null)&&(l={encode:function(){return c}},f=1);var d=l.encode(c,u.n.bitLength());return Y.rsa.encrypt(d,u,f)},u};Y.wrapRsaPrivateKey=function(e){return T.create(T.Class.UNIVERSAL,T.Type.SEQUENCE,!0,[T.create(T.Class.UNIVERSAL,T.Type.INTEGER,!1,T.integerToDer(0).getBytes()),T.create(T.Class.UNIVERSAL,T.Type.SEQUENCE,!0,[T.create(T.Class.UNIVERSAL,T.Type.OID,!1,T.oidToDer(Y.oids.rsaEncryption).getBytes()),T.create(T.Class.UNIVERSAL,T.Type.NULL,!1,"")]),T.create(T.Class.UNIVERSAL,T.Type.OCTETSTRING,!1,T.toDer(e).getBytes())])};Y.privateKeyFromAsn1=function(e){var t={},n=[];if(T.validate(e,Nm,t,n)&&(e=T.fromDer(q.util.createBuffer(t.privateKey))),t={},n=[],!T.validate(e,km,t,n)){var r=new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");throw r.errors=n,r}var a,i,s,o,u,c,l,f;return a=q.util.createBuffer(t.privateKeyModulus).toHex(),i=q.util.createBuffer(t.privateKeyPublicExponent).toHex(),s=q.util.createBuffer(t.privateKeyPrivateExponent).toHex(),o=q.util.createBuffer(t.privateKeyPrime1).toHex(),u=q.util.createBuffer(t.privateKeyPrime2).toHex(),c=q.util.createBuffer(t.privateKeyExponent1).toHex(),l=q.util.createBuffer(t.privateKeyExponent2).toHex(),f=q.util.createBuffer(t.privateKeyCoefficient).toHex(),Y.setRsaPrivateKey(new ae(a,16),new ae(i,16),new ae(s,16),new ae(o,16),new ae(u,16),new ae(c,16),new ae(l,16),new ae(f,16))};Y.privateKeyToAsn1=Y.privateKeyToRSAPrivateKey=function(e){return T.create(T.Class.UNIVERSAL,T.Type.SEQUENCE,!0,[T.create(T.Class.UNIVERSAL,T.Type.INTEGER,!1,T.integerToDer(0).getBytes()),T.create(T.Class.UNIVERSAL,T.Type.INTEGER,!1,Ft(e.n)),T.create(T.Class.UNIVERSAL,T.Type.INTEGER,!1,Ft(e.e)),T.create(T.Class.UNIVERSAL,T.Type.INTEGER,!1,Ft(e.d)),T.create(T.Class.UNIVERSAL,T.Type.INTEGER,!1,Ft(e.p)),T.create(T.Class.UNIVERSAL,T.Type.INTEGER,!1,Ft(e.q)),T.create(T.Class.UNIVERSAL,T.Type.INTEGER,!1,Ft(e.dP)),T.create(T.Class.UNIVERSAL,T.Type.INTEGER,!1,Ft(e.dQ)),T.create(T.Class.UNIVERSAL,T.Type.INTEGER,!1,Ft(e.qInv))])};Y.publicKeyFromAsn1=function(e){var t={},n=[];if(T.validate(e,Dm,t,n)){var r=T.derToOid(t.publicKeyOid);if(r!==Y.oids.rsaEncryption){var a=new Error("Cannot read public key. Unknown OID.");throw a.oid=r,a}e=t.rsaPublicKey}if(n=[],!T.validate(e,Lm,t,n)){var a=new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.");throw a.errors=n,a}var i=q.util.createBuffer(t.publicKeyModulus).toHex(),s=q.util.createBuffer(t.publicKeyExponent).toHex();return Y.setRsaPublicKey(new ae(i,16),new ae(s,16))};Y.publicKeyToAsn1=Y.publicKeyToSubjectPublicKeyInfo=function(e){return T.create(T.Class.UNIVERSAL,T.Type.SEQUENCE,!0,[T.create(T.Class.UNIVERSAL,T.Type.SEQUENCE,!0,[T.create(T.Class.UNIVERSAL,T.Type.OID,!1,T.oidToDer(Y.oids.rsaEncryption).getBytes()),T.create(T.Class.UNIVERSAL,T.Type.NULL,!1,"")]),T.create(T.Class.UNIVERSAL,T.Type.BITSTRING,!1,[Y.publicKeyToRSAPublicKey(e)])])};Y.publicKeyToRSAPublicKey=function(e){return T.create(T.Class.UNIVERSAL,T.Type.SEQUENCE,!0,[T.create(T.Class.UNIVERSAL,T.Type.INTEGER,!1,Ft(e.n)),T.create(T.Class.UNIVERSAL,T.Type.INTEGER,!1,Ft(e.e))])};function Zu(e,t,n){var r=q.util.createBuffer(),a=Math.ceil(t.n.bitLength()/8);if(e.length>a-11){var i=new Error("Message is too long for PKCS#1 v1.5 padding.");throw i.length=e.length,i.max=a-11,i}r.putByte(0),r.putByte(n);var s=a-3-e.length,o;if(n===0||n===1){o=n===0?0:255;for(var u=0;u0;){for(var c=0,l=q.random.getBytes(s),u=0;u"u")throw new Error("Encryption block is invalid.");var u=0;if(o===0){u=a-3-r;for(var c=0;c1;){if(i.getByte()!==255){--i.read;break}++u}else if(o===2)for(u=0;i.length()>1;){if(i.getByte()===0){--i.read;break}++u}var l=i.getByte();if(l!==0||u!==a-3-i.length())throw new Error("Encryption block is invalid.");return i.getBytes()}function Om(e,t,n){typeof t=="function"&&(n=t,t={}),t=t||{};var r={algorithm:{name:t.algorithm||"PRIMEINC",options:{workers:t.workers||2,workLoad:t.workLoad||100,workerScript:t.workerScript}}};"prng"in t&&(r.prng=t.prng),a();function a(){i(e.pBits,function(o,u){if(o)return n(o);if(e.p=u,e.q!==null)return s(o,e.q);i(e.qBits,s)})}function i(o,u){q.prime.generateProbablePrime(o,r,u)}function s(o,u){if(o)return n(o);if(e.q=u,e.p.compareTo(e.q)<0){var c=e.p;e.p=e.q,e.q=c}if(e.p.subtract(ae.ONE).gcd(e.e).compareTo(ae.ONE)!==0){e.p=null,a();return}if(e.q.subtract(ae.ONE).gcd(e.e).compareTo(ae.ONE)!==0){e.q=null,i(e.qBits,s);return}if(e.p1=e.p.subtract(ae.ONE),e.q1=e.q.subtract(ae.ONE),e.phi=e.p1.multiply(e.q1),e.phi.gcd(e.e).compareTo(ae.ONE)!==0){e.p=e.q=null,a();return}if(e.n=e.p.multiply(e.q),e.n.bitLength()!==e.bits){e.q=null,i(e.qBits,s);return}var l=e.e.modInverse(e.phi);e.keys={privateKey:Y.rsa.setPrivateKey(e.n,e.e,l,e.p,e.q,l.mod(e.p1),l.mod(e.q1),e.q.modInverse(e.p)),publicKey:Y.rsa.setPublicKey(e.n,e.e)},n(null,e.keys)}}function Ft(e){var t=e.toString(16);t[0]>="8"&&(t="00"+t);var n=q.util.hexToBytes(t);return n.length>1&&(n.charCodeAt(0)===0&&!(n.charCodeAt(1)&128)||n.charCodeAt(0)===255&&(n.charCodeAt(1)&128)===128)?n.substr(1):n}function Vm(e){return e<=100?27:e<=150?18:e<=200?15:e<=250?12:e<=300?9:e<=350?8:e<=400?7:e<=500?6:e<=600?5:e<=800?4:e<=1250?3:2}function zu(e){return q.util.isNodejs&&typeof xs[e]=="function"}function ju(e){return typeof xt.globalScope<"u"&&typeof xt.globalScope.crypto=="object"&&typeof xt.globalScope.crypto.subtle=="object"&&typeof xt.globalScope.crypto.subtle[e]=="function"}function Yu(e){return typeof xt.globalScope<"u"&&typeof xt.globalScope.msCrypto=="object"&&typeof xt.globalScope.msCrypto.subtle=="object"&&typeof xt.globalScope.msCrypto.subtle[e]=="function"}function Qu(e){for(var t=q.util.hexToBytes(e.toString(16)),n=new Uint8Array(t.length),r=0;r{var M=X();cr();It();Dn();kt();lr();wa();Er();vt();fs();On();se();typeof $u>"u"&&($u=M.jsbn.BigInteger);var $u,B=M.asn1,Q=M.pki=M.pki||{};nc.exports=Q.pbe=M.pbe=M.pbe||{};var Tr=Q.oids,Fm={name:"EncryptedPrivateKeyInfo",tagClass:B.Class.UNIVERSAL,type:B.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:B.Class.UNIVERSAL,type:B.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:B.Class.UNIVERSAL,type:B.Type.OID,constructed:!1,capture:"encryptionOid"},{name:"AlgorithmIdentifier.parameters",tagClass:B.Class.UNIVERSAL,type:B.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:B.Class.UNIVERSAL,type:B.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},Mm={name:"PBES2Algorithms",tagClass:B.Class.UNIVERSAL,type:B.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:B.Class.UNIVERSAL,type:B.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",tagClass:B.Class.UNIVERSAL,type:B.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:B.Class.UNIVERSAL,type:B.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:B.Class.UNIVERSAL,type:B.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:B.Class.UNIVERSAL,type:B.Type.INTEGER,constructed:!1,capture:"kdfIterationCount"},{name:"PBES2Algorithms.params.keyLength",tagClass:B.Class.UNIVERSAL,type:B.Type.INTEGER,constructed:!1,optional:!0,capture:"keyLength"},{name:"PBES2Algorithms.params.prf",tagClass:B.Class.UNIVERSAL,type:B.Type.SEQUENCE,constructed:!0,optional:!0,value:[{name:"PBES2Algorithms.params.prf.algorithm",tagClass:B.Class.UNIVERSAL,type:B.Type.OID,constructed:!1,capture:"prfOid"}]}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:B.Class.UNIVERSAL,type:B.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:B.Class.UNIVERSAL,type:B.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:B.Class.UNIVERSAL,type:B.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},Km={name:"pkcs-12PbeParams",tagClass:B.Class.UNIVERSAL,type:B.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:B.Class.UNIVERSAL,type:B.Type.OCTETSTRING,constructed:!1,capture:"salt"},{name:"pkcs-12PbeParams.iterations",tagClass:B.Class.UNIVERSAL,type:B.Type.INTEGER,constructed:!1,capture:"iterations"}]};Q.encryptPrivateKeyInfo=function(e,t,n){n=n||{},n.saltSize=n.saltSize||8,n.count=n.count||2048,n.algorithm=n.algorithm||"aes128",n.prfAlgorithm=n.prfAlgorithm||"sha1";var r=M.random.getBytesSync(n.saltSize),a=n.count,i=B.integerToDer(a),s,o,u;if(n.algorithm.indexOf("aes")===0||n.algorithm==="des"){var c,l,f;switch(n.algorithm){case"aes128":s=16,c=16,l=Tr["aes128-CBC"],f=M.aes.createEncryptionCipher;break;case"aes192":s=24,c=16,l=Tr["aes192-CBC"],f=M.aes.createEncryptionCipher;break;case"aes256":s=32,c=16,l=Tr["aes256-CBC"],f=M.aes.createEncryptionCipher;break;case"des":s=8,c=8,l=Tr.desCBC,f=M.des.createEncryptionCipher;break;default:var d=new Error("Cannot encrypt private key. Unknown encryption algorithm.");throw d.algorithm=n.algorithm,d}var v="hmacWith"+n.prfAlgorithm.toUpperCase(),p=rc(v),g=M.pkcs5.pbkdf2(t,r,a,s,p),x=M.random.getBytesSync(c),b=f(g);b.start(x),b.update(B.toDer(e)),b.finish(),u=b.output.getBytes();var w=qm(r,i,s,v);o=B.create(B.Class.UNIVERSAL,B.Type.SEQUENCE,!0,[B.create(B.Class.UNIVERSAL,B.Type.OID,!1,B.oidToDer(Tr.pkcs5PBES2).getBytes()),B.create(B.Class.UNIVERSAL,B.Type.SEQUENCE,!0,[B.create(B.Class.UNIVERSAL,B.Type.SEQUENCE,!0,[B.create(B.Class.UNIVERSAL,B.Type.OID,!1,B.oidToDer(Tr.pkcs5PBKDF2).getBytes()),w]),B.create(B.Class.UNIVERSAL,B.Type.SEQUENCE,!0,[B.create(B.Class.UNIVERSAL,B.Type.OID,!1,B.oidToDer(l).getBytes()),B.create(B.Class.UNIVERSAL,B.Type.OCTETSTRING,!1,x)])])])}else if(n.algorithm==="3des"){s=24;var A=new M.util.ByteBuffer(r),g=Q.pbe.generatePkcs12Key(t,A,1,a,s),x=Q.pbe.generatePkcs12Key(t,A,2,a,s),b=M.des.createEncryptionCipher(g);b.start(x),b.update(B.toDer(e)),b.finish(),u=b.output.getBytes(),o=B.create(B.Class.UNIVERSAL,B.Type.SEQUENCE,!0,[B.create(B.Class.UNIVERSAL,B.Type.OID,!1,B.oidToDer(Tr["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),B.create(B.Class.UNIVERSAL,B.Type.SEQUENCE,!0,[B.create(B.Class.UNIVERSAL,B.Type.OCTETSTRING,!1,r),B.create(B.Class.UNIVERSAL,B.Type.INTEGER,!1,i.getBytes())])])}else{var d=new Error("Cannot encrypt private key. Unknown encryption algorithm.");throw d.algorithm=n.algorithm,d}var D=B.create(B.Class.UNIVERSAL,B.Type.SEQUENCE,!0,[o,B.create(B.Class.UNIVERSAL,B.Type.OCTETSTRING,!1,u)]);return D};Q.decryptPrivateKeyInfo=function(e,t){var n=null,r={},a=[];if(!B.validate(e,Fm,r,a)){var i=new Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw i.errors=a,i}var s=B.derToOid(r.encryptionOid),o=Q.pbe.getCipher(s,r.encryptionParams,t),u=M.util.createBuffer(r.encryptedData);return o.update(u),o.finish()&&(n=B.fromDer(o.output)),n};Q.encryptedPrivateKeyToPem=function(e,t){var n={type:"ENCRYPTED PRIVATE KEY",body:B.toDer(e).getBytes()};return M.pem.encode(n,{maxline:t})};Q.encryptedPrivateKeyFromPem=function(e){var t=M.pem.decode(e)[0];if(t.type!=="ENCRYPTED PRIVATE KEY"){var n=new Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');throw n.headerType=t.type,n}if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return B.fromDer(t.body)};Q.encryptRsaPrivateKey=function(e,t,n){if(n=n||{},!n.legacy){var r=Q.wrapRsaPrivateKey(Q.privateKeyToAsn1(e));return r=Q.encryptPrivateKeyInfo(r,t,n),Q.encryptedPrivateKeyToPem(r)}var a,i,s,o;switch(n.algorithm){case"aes128":a="AES-128-CBC",s=16,i=M.random.getBytesSync(16),o=M.aes.createEncryptionCipher;break;case"aes192":a="AES-192-CBC",s=24,i=M.random.getBytesSync(16),o=M.aes.createEncryptionCipher;break;case"aes256":a="AES-256-CBC",s=32,i=M.random.getBytesSync(16),o=M.aes.createEncryptionCipher;break;case"3des":a="DES-EDE3-CBC",s=24,i=M.random.getBytesSync(8),o=M.des.createEncryptionCipher;break;case"des":a="DES-CBC",s=8,i=M.random.getBytesSync(8),o=M.des.createEncryptionCipher;break;default:var u=new Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+n.algorithm+'".');throw u.algorithm=n.algorithm,u}var c=M.pbe.opensslDeriveBytes(t,i.substr(0,8),s),l=o(c);l.start(i),l.update(B.toDer(Q.privateKeyToAsn1(e))),l.finish();var f={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:a,parameters:M.util.bytesToHex(i).toUpperCase()},body:l.output.getBytes()};return M.pem.encode(f)};Q.decryptRsaPrivateKey=function(e,t){var n=null,r=M.pem.decode(e)[0];if(r.type!=="ENCRYPTED PRIVATE KEY"&&r.type!=="PRIVATE KEY"&&r.type!=="RSA PRIVATE KEY"){var a=new Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".');throw a.headerType=a,a}if(r.procType&&r.procType.type==="ENCRYPTED"){var i,s;switch(r.dekInfo.algorithm){case"DES-CBC":i=8,s=M.des.createDecryptionCipher;break;case"DES-EDE3-CBC":i=24,s=M.des.createDecryptionCipher;break;case"AES-128-CBC":i=16,s=M.aes.createDecryptionCipher;break;case"AES-192-CBC":i=24,s=M.aes.createDecryptionCipher;break;case"AES-256-CBC":i=32,s=M.aes.createDecryptionCipher;break;case"RC2-40-CBC":i=5,s=function(f){return M.rc2.createDecryptionCipher(f,40)};break;case"RC2-64-CBC":i=8,s=function(f){return M.rc2.createDecryptionCipher(f,64)};break;case"RC2-128-CBC":i=16,s=function(f){return M.rc2.createDecryptionCipher(f,128)};break;default:var a=new Error('Could not decrypt private key; unsupported encryption algorithm "'+r.dekInfo.algorithm+'".');throw a.algorithm=r.dekInfo.algorithm,a}var o=M.util.hexToBytes(r.dekInfo.parameters),u=M.pbe.opensslDeriveBytes(t,o.substr(0,8),i),c=s(u);if(c.start(o),c.update(M.util.createBuffer(r.body)),c.finish())n=c.output.getBytes();else return n}else n=r.body;return r.type==="ENCRYPTED PRIVATE KEY"?n=Q.decryptPrivateKeyInfo(B.fromDer(n),t):n=B.fromDer(n),n!==null&&(n=Q.privateKeyFromAsn1(n)),n};Q.pbe.generatePkcs12Key=function(e,t,n,r,a,i){var s,o;if(typeof i>"u"||i===null){if(!("sha1"in M.md))throw new Error('"sha1" hash algorithm unavailable.');i=M.md.sha1.create()}var u=i.digestLength,c=i.blockLength,l=new M.util.ByteBuffer,f=new M.util.ByteBuffer;if(e!=null){for(o=0;o=0;o--)ve=ve>>8,ve+=Z.at(o)+he.at(o),he.setAt(o,ve&255);fe.putBuffer(he)}A=fe,l.putBuffer(L)}return l.truncate(l.length()-a),l};Q.pbe.getCipher=function(e,t,n){switch(e){case Q.oids.pkcs5PBES2:return Q.pbe.getCipherForPBES2(e,t,n);case Q.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case Q.oids["pbewithSHAAnd40BitRC2-CBC"]:return Q.pbe.getCipherForPKCS12PBE(e,t,n);default:var r=new Error("Cannot read encrypted PBE data block. Unsupported OID.");throw r.oid=e,r.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC","pbewithSHAAnd40BitRC2-CBC"],r}};Q.pbe.getCipherForPBES2=function(e,t,n){var r={},a=[];if(!B.validate(t,Mm,r,a)){var i=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw i.errors=a,i}if(e=B.derToOid(r.kdfOid),e!==Q.oids.pkcs5PBKDF2){var i=new Error("Cannot read encrypted private key. Unsupported key derivation function OID.");throw i.oid=e,i.supportedOids=["pkcs5PBKDF2"],i}if(e=B.derToOid(r.encOid),e!==Q.oids["aes128-CBC"]&&e!==Q.oids["aes192-CBC"]&&e!==Q.oids["aes256-CBC"]&&e!==Q.oids["des-EDE3-CBC"]&&e!==Q.oids.desCBC){var i=new Error("Cannot read encrypted private key. Unsupported encryption scheme OID.");throw i.oid=e,i.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],i}var s=r.kdfSalt,o=M.util.createBuffer(r.kdfIterationCount);o=o.getInt(o.length()<<3);var u,c;switch(Q.oids[e]){case"aes128-CBC":u=16,c=M.aes.createDecryptionCipher;break;case"aes192-CBC":u=24,c=M.aes.createDecryptionCipher;break;case"aes256-CBC":u=32,c=M.aes.createDecryptionCipher;break;case"des-EDE3-CBC":u=24,c=M.des.createDecryptionCipher;break;case"desCBC":u=8,c=M.des.createDecryptionCipher;break}var l=tc(r.prfOid),f=M.pkcs5.pbkdf2(n,s,o,u,l),d=r.encIv,v=c(f);return v.start(d),v};Q.pbe.getCipherForPKCS12PBE=function(e,t,n){var r={},a=[];if(!B.validate(t,Km,r,a)){var i=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw i.errors=a,i}var s=M.util.createBuffer(r.salt),o=M.util.createBuffer(r.iterations);o=o.getInt(o.length()<<3);var u,c,l;switch(e){case Q.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:u=24,c=8,l=M.des.startDecrypting;break;case Q.oids["pbewithSHAAnd40BitRC2-CBC"]:u=5,c=8,l=function(g,x){var b=M.rc2.createDecryptionCipher(g,40);return b.start(x,null),b};break;default:var i=new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.");throw i.oid=e,i}var f=tc(r.prfOid),d=Q.pbe.generatePkcs12Key(n,s,1,o,u,f);f.start();var v=Q.pbe.generatePkcs12Key(n,s,2,o,c,f);return l(d,v)};Q.pbe.opensslDeriveBytes=function(e,t,n,r){if(typeof r>"u"||r===null){if(!("md5"in M.md))throw new Error('"md5" hash algorithm unavailable.');r=M.md.md5.create()}t===null&&(t="");for(var a=[ec(r,e+t)],i=16,s=1;i{var Zr=X();It();se();var V=Zr.asn1,Jr=sc.exports=Zr.pkcs7asn1=Zr.pkcs7asn1||{};Zr.pkcs7=Zr.pkcs7||{};Zr.pkcs7.asn1=Jr;var ac={name:"ContentInfo",tagClass:V.Class.UNIVERSAL,type:V.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:V.Class.UNIVERSAL,type:V.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:V.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};Jr.contentInfoValidator=ac;var ic={name:"EncryptedContentInfo",tagClass:V.Class.UNIVERSAL,type:V.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",tagClass:V.Class.UNIVERSAL,type:V.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:V.Class.UNIVERSAL,type:V.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:V.Class.UNIVERSAL,type:V.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:V.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",tagClass:V.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};Jr.envelopedDataValidator={name:"EnvelopedData",tagClass:V.Class.UNIVERSAL,type:V.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:V.Class.UNIVERSAL,type:V.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:V.Class.UNIVERSAL,type:V.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(ic)};Jr.encryptedDataValidator={name:"EncryptedData",tagClass:V.Class.UNIVERSAL,type:V.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:V.Class.UNIVERSAL,type:V.Type.INTEGER,constructed:!1,capture:"version"}].concat(ic)};var Hm={name:"SignerInfo",tagClass:V.Class.UNIVERSAL,type:V.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:V.Class.UNIVERSAL,type:V.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:V.Class.UNIVERSAL,type:V.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:V.Class.UNIVERSAL,type:V.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:V.Class.UNIVERSAL,type:V.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:V.Class.UNIVERSAL,type:V.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:V.Class.UNIVERSAL,type:V.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:V.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:V.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:V.Class.UNIVERSAL,type:V.Type.SEQUENCE,constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:V.Class.UNIVERSAL,type:V.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:V.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]};Jr.signedDataValidator={name:"SignedData",tagClass:V.Class.UNIVERSAL,type:V.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:V.Class.UNIVERSAL,type:V.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:V.Class.UNIVERSAL,type:V.Type.SET,constructed:!0,captureAsn1:"digestAlgorithms"},ac,{name:"SignedData.Certificates",tagClass:V.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:V.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:V.Class.UNIVERSAL,type:V.Type.SET,capture:"signerInfos",optional:!0,value:[Hm]}]};Jr.recipientInfoValidator={name:"RecipientInfo",tagClass:V.Class.UNIVERSAL,type:V.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:V.Class.UNIVERSAL,type:V.Type.INTEGER,constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:V.Class.UNIVERSAL,type:V.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:V.Class.UNIVERSAL,type:V.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:V.Class.UNIVERSAL,type:V.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:V.Class.UNIVERSAL,type:V.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:V.Class.UNIVERSAL,type:V.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:V.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter",optional:!0}]},{name:"RecipientInfo.encryptedKey",tagClass:V.Class.UNIVERSAL,type:V.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}});var bs=j((tC,oc)=>{var wr=X();se();wr.mgf=wr.mgf||{};var Gm=oc.exports=wr.mgf.mgf1=wr.mgf1=wr.mgf1||{};Gm.create=function(e){var t={generate:function(n,r){for(var a=new wr.util.ByteBuffer,i=Math.ceil(r/e.digestLength),s=0;s{var Na=X();bs();uc.exports=Na.mgf=Na.mgf||{};Na.mgf.mgf1=Na.mgf1});var ka=j((nC,lc)=>{var Ir=X();vt();se();var Wm=lc.exports=Ir.pss=Ir.pss||{};Wm.create=function(e){arguments.length===3&&(e={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var t=e.md,n=e.mgf,r=t.digestLength,a=e.salt||null;typeof a=="string"&&(a=Ir.util.createBuffer(a));var i;if("saltLength"in e)i=e.saltLength;else if(a!==null)i=a.length();else throw new Error("Salt length not specified or specific salt not given.");if(a!==null&&a.length()!==i)throw new Error("Given salt length does not match length of given salt.");var s=e.prng||Ir.random,o={};return o.encode=function(u,c){var l,f=c-1,d=Math.ceil(f/8),v=u.digest().getBytes();if(d>8*d-f&255;return k=String.fromCharCode(k.charCodeAt(0)&~L)+k.substr(1),k+x+String.fromCharCode(188)},o.verify=function(u,c,l){var f,d=l-1,v=Math.ceil(d/8);if(c=c.substr(-v),v>8*v-d&255;if(g.charCodeAt(0)&b)throw new Error("Bits beyond keysize not zero as expected.");var w=n.generate(x,p),A="";for(f=0;f{var H=X();cr();It();Dn();kt();cc();lr();Er();ka();On();se();var h=H.asn1,P=mc.exports=H.pki=H.pki||{},ie=P.oids,Se={};Se.CN=ie.commonName;Se.commonName="CN";Se.C=ie.countryName;Se.countryName="C";Se.L=ie.localityName;Se.localityName="L";Se.ST=ie.stateOrProvinceName;Se.stateOrProvinceName="ST";Se.O=ie.organizationName;Se.organizationName="O";Se.OU=ie.organizationalUnitName;Se.organizationalUnitName="OU";Se.E=ie.emailAddress;Se.emailAddress="E";var dc=H.pki.rsa.publicKeyValidator,zm={name:"Certificate",tagClass:h.Class.UNIVERSAL,type:h.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate",tagClass:h.Class.UNIVERSAL,type:h.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:h.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:h.Class.UNIVERSAL,type:h.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:h.Class.UNIVERSAL,type:h.Type.INTEGER,constructed:!1,capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:h.Class.UNIVERSAL,type:h.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:h.Class.UNIVERSAL,type:h.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:h.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:h.Class.UNIVERSAL,type:h.Type.SEQUENCE,constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:h.Class.UNIVERSAL,type:h.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:h.Class.UNIVERSAL,type:h.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:h.Class.UNIVERSAL,type:h.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:h.Class.UNIVERSAL,type:h.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:h.Class.UNIVERSAL,type:h.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:h.Class.UNIVERSAL,type:h.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},dc,{name:"Certificate.TBSCertificate.issuerUniqueID",tagClass:h.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:h.Class.UNIVERSAL,type:h.Type.BITSTRING,constructed:!1,captureBitStringValue:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:h.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:h.Class.UNIVERSAL,type:h.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSubjectUniqueId"}]},{name:"Certificate.TBSCertificate.extensions",tagClass:h.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:h.Class.UNIVERSAL,type:h.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:h.Class.UNIVERSAL,type:h.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:h.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},{name:"Certificate.signatureValue",tagClass:h.Class.UNIVERSAL,type:h.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSignature"}]},jm={name:"rsapss",tagClass:h.Class.UNIVERSAL,type:h.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:h.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:h.Class.UNIVERSAL,type:h.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:h.Class.UNIVERSAL,type:h.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:h.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:h.Class.UNIVERSAL,type:h.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:h.Class.UNIVERSAL,type:h.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:h.Class.UNIVERSAL,type:h.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:h.Class.UNIVERSAL,type:h.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:h.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:h.Class.UNIVERSAL,type:h.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:h.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",tagClass:h.Class.UNIVERSAL,type:h.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},Ym={name:"CertificationRequestInfo",tagClass:h.Class.UNIVERSAL,type:h.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:h.Class.UNIVERSAL,type:h.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",tagClass:h.Class.UNIVERSAL,type:h.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},dc,{name:"CertificationRequestInfo.attributes",tagClass:h.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:h.Class.UNIVERSAL,type:h.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:h.Class.UNIVERSAL,type:h.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",tagClass:h.Class.UNIVERSAL,type:h.Type.SET,constructed:!0}]}]}]},Qm={name:"CertificationRequest",tagClass:h.Class.UNIVERSAL,type:h.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[Ym,{name:"CertificationRequest.signatureAlgorithm",tagClass:h.Class.UNIVERSAL,type:h.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:h.Class.UNIVERSAL,type:h.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:h.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:h.Class.UNIVERSAL,type:h.Type.BITSTRING,constructed:!1,captureBitStringValue:"csrSignature"}]};P.RDNAttributesAsArray=function(e,t){for(var n=[],r,a,i,s=0;s2)throw new Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(u.length<2)throw new Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");if(s.validity.notBefore=u[0],s.validity.notAfter=u[1],s.tbsCertificate=n.tbsCertificate,t){s.md=Da({signatureOid:s.signatureOid,type:"certificate"});var c=h.toDer(s.tbsCertificate);s.md.update(c.getBytes())}var l=H.md.sha1.create(),f=h.toDer(n.certIssuer);l.update(f.getBytes()),s.issuer.getField=function(p){return pr(s.issuer,p)},s.issuer.addField=function(p){Ct([p]),s.issuer.attributes.push(p)},s.issuer.attributes=P.RDNAttributesAsArray(n.certIssuer),n.certIssuerUniqueId&&(s.issuer.uniqueId=n.certIssuerUniqueId),s.issuer.hash=l.digest().toHex();var d=H.md.sha1.create(),v=h.toDer(n.certSubject);return d.update(v.getBytes()),s.subject.getField=function(p){return pr(s.subject,p)},s.subject.addField=function(p){Ct([p]),s.subject.attributes.push(p)},s.subject.attributes=P.RDNAttributesAsArray(n.certSubject),n.certSubjectUniqueId&&(s.subject.uniqueId=n.certSubjectUniqueId),s.subject.hash=d.digest().toHex(),n.certExtensions?s.extensions=P.certificateExtensionsFromAsn1(n.certExtensions):s.extensions=[],s.publicKey=P.publicKeyFromAsn1(n.subjectPublicKeyInfo),s};P.certificateExtensionsFromAsn1=function(e){for(var t=[],n=0;n1&&(r=n.value.charCodeAt(1),a=n.value.length>2?n.value.charCodeAt(2):0),t.digitalSignature=(r&128)===128,t.nonRepudiation=(r&64)===64,t.keyEncipherment=(r&32)===32,t.dataEncipherment=(r&16)===16,t.keyAgreement=(r&8)===8,t.keyCertSign=(r&4)===4,t.cRLSign=(r&2)===2,t.encipherOnly=(r&1)===1,t.decipherOnly=(a&128)===128}else if(t.name==="basicConstraints"){var n=h.fromDer(t.value);n.value.length>0&&n.value[0].type===h.Type.BOOLEAN?t.cA=n.value[0].value.charCodeAt(0)!==0:t.cA=!1;var i=null;n.value.length>0&&n.value[0].type===h.Type.INTEGER?i=n.value[0].value:n.value.length>1&&(i=n.value[1].value),i!==null&&(t.pathLenConstraint=h.derToInteger(i))}else if(t.name==="extKeyUsage")for(var n=h.fromDer(t.value),s=0;s1&&(r=n.value.charCodeAt(1)),t.client=(r&128)===128,t.server=(r&64)===64,t.email=(r&32)===32,t.objsign=(r&16)===16,t.reserved=(r&8)===8,t.sslCA=(r&4)===4,t.emailCA=(r&2)===2,t.objCA=(r&1)===1}else if(t.name==="subjectAltName"||t.name==="issuerAltName"){t.altNames=[];for(var u,n=h.fromDer(t.value),c=0;c"u"&&(t.type&&t.type in P.oids?t.name=P.oids[t.type]:t.shortName&&t.shortName in Se&&(t.name=P.oids[Se[t.shortName]])),typeof t.type>"u")if(t.name&&t.name in P.oids)t.type=P.oids[t.name];else{var r=new Error("Attribute type not specified.");throw r.attribute=t,r}if(typeof t.shortName>"u"&&t.name&&t.name in Se&&(t.shortName=Se[t.name]),t.type===ie.extensionRequest&&(t.valueConstructed=!0,t.valueTagClass=h.Type.SEQUENCE,!t.value&&t.extensions)){t.value=[];for(var a=0;a"u"){var r=new Error("Attribute value not specified.");throw r.attribute=t,r}}}function hc(e,t){if(t=t||{},typeof e.name>"u"&&e.id&&e.id in P.oids&&(e.name=P.oids[e.id]),typeof e.id>"u")if(e.name&&e.name in P.oids)e.id=P.oids[e.name];else{var n=new Error("Extension ID not specified.");throw n.extension=e,n}if(typeof e.value<"u")return e;if(e.name==="keyUsage"){var r=0,a=0,i=0;e.digitalSignature&&(a|=128,r=7),e.nonRepudiation&&(a|=64,r=6),e.keyEncipherment&&(a|=32,r=5),e.dataEncipherment&&(a|=16,r=4),e.keyAgreement&&(a|=8,r=3),e.keyCertSign&&(a|=4,r=2),e.cRLSign&&(a|=2,r=1),e.encipherOnly&&(a|=1,r=0),e.decipherOnly&&(i|=128,r=7);var s=String.fromCharCode(r);i!==0?s+=String.fromCharCode(a)+String.fromCharCode(i):a!==0&&(s+=String.fromCharCode(a)),e.value=h.create(h.Class.UNIVERSAL,h.Type.BITSTRING,!1,s)}else if(e.name==="basicConstraints")e.value=h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[]),e.cA&&e.value.value.push(h.create(h.Class.UNIVERSAL,h.Type.BOOLEAN,!1,String.fromCharCode(255))),"pathLenConstraint"in e&&e.value.value.push(h.create(h.Class.UNIVERSAL,h.Type.INTEGER,!1,h.integerToDer(e.pathLenConstraint).getBytes()));else if(e.name==="extKeyUsage"){e.value=h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[]);var o=e.value.value;for(var u in e)e[u]===!0&&(u in ie?o.push(h.create(h.Class.UNIVERSAL,h.Type.OID,!1,h.oidToDer(ie[u]).getBytes())):u.indexOf(".")!==-1&&o.push(h.create(h.Class.UNIVERSAL,h.Type.OID,!1,h.oidToDer(u).getBytes())))}else if(e.name==="nsCertType"){var r=0,a=0;e.client&&(a|=128,r=7),e.server&&(a|=64,r=6),e.email&&(a|=32,r=5),e.objsign&&(a|=16,r=4),e.reserved&&(a|=8,r=3),e.sslCA&&(a|=4,r=2),e.emailCA&&(a|=2,r=1),e.objCA&&(a|=1,r=0);var s=String.fromCharCode(r);a!==0&&(s+=String.fromCharCode(a)),e.value=h.create(h.Class.UNIVERSAL,h.Type.BITSTRING,!1,s)}else if(e.name==="subjectAltName"||e.name==="issuerAltName"){e.value=h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[]);for(var c,l=0;l128)throw new Error('Invalid "nsComment" content.');e.value=h.create(h.Class.UNIVERSAL,h.Type.IA5STRING,!1,e.comment)}else if(e.name==="subjectKeyIdentifier"&&t.cert){var f=t.cert.generateSubjectKeyIdentifier();e.subjectKeyIdentifier=f.toHex(),e.value=h.create(h.Class.UNIVERSAL,h.Type.OCTETSTRING,!1,f.getBytes())}else if(e.name==="authorityKeyIdentifier"&&t.cert){e.value=h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[]);var o=e.value.value;if(e.keyIdentifier){var d=e.keyIdentifier===!0?t.cert.generateSubjectKeyIdentifier().getBytes():e.keyIdentifier;o.push(h.create(h.Class.CONTEXT_SPECIFIC,0,!1,d))}if(e.authorityCertIssuer){var v=[h.create(h.Class.CONTEXT_SPECIFIC,4,!0,[$r(e.authorityCertIssuer===!0?t.cert.issuer:e.authorityCertIssuer)])];o.push(h.create(h.Class.CONTEXT_SPECIFIC,1,!0,v))}if(e.serialNumber){var p=H.util.hexToBytes(e.serialNumber===!0?t.cert.serialNumber:e.serialNumber);o.push(h.create(h.Class.CONTEXT_SPECIFIC,2,!1,p))}}else if(e.name==="cRLDistributionPoints"){e.value=h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[]);for(var o=e.value.value,g=h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[]),x=h.create(h.Class.CONTEXT_SPECIFIC,0,!0,[]),c,l=0;l"u"){var n=new Error("Extension value not specified.");throw n.extension=e,n}return e}function Ss(e,t){switch(e){case ie["RSASSA-PSS"]:var n=[];return t.hash.algorithmOid!==void 0&&n.push(h.create(h.Class.CONTEXT_SPECIFIC,0,!0,[h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[h.create(h.Class.UNIVERSAL,h.Type.OID,!1,h.oidToDer(t.hash.algorithmOid).getBytes()),h.create(h.Class.UNIVERSAL,h.Type.NULL,!1,"")])])),t.mgf.algorithmOid!==void 0&&n.push(h.create(h.Class.CONTEXT_SPECIFIC,1,!0,[h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[h.create(h.Class.UNIVERSAL,h.Type.OID,!1,h.oidToDer(t.mgf.algorithmOid).getBytes()),h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[h.create(h.Class.UNIVERSAL,h.Type.OID,!1,h.oidToDer(t.mgf.hash.algorithmOid).getBytes()),h.create(h.Class.UNIVERSAL,h.Type.NULL,!1,"")])])])),t.saltLength!==void 0&&n.push(h.create(h.Class.CONTEXT_SPECIFIC,2,!0,[h.create(h.Class.UNIVERSAL,h.Type.INTEGER,!1,h.integerToDer(t.saltLength).getBytes())])),h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,n);default:return h.create(h.Class.UNIVERSAL,h.Type.NULL,!1,"")}}function Xm(e){var t=h.create(h.Class.CONTEXT_SPECIFIC,0,!0,[]);if(e.attributes.length===0)return t;for(var n=e.attributes,r=0;r=Zm&&e0&&r.value.push(P.certificateExtensionsToAsn1(e.extensions)),r};P.getCertificationRequestInfo=function(e){var t=h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[h.create(h.Class.UNIVERSAL,h.Type.INTEGER,!1,h.integerToDer(e.version).getBytes()),$r(e.subject),P.publicKeyToAsn1(e.publicKey),Xm(e)]);return t};P.distinguishedNameToAsn1=function(e){return $r(e)};P.certificateToAsn1=function(e){var t=e.tbsCertificate||P.getTBSCertificate(e);return h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[t,h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[h.create(h.Class.UNIVERSAL,h.Type.OID,!1,h.oidToDer(e.signatureOid).getBytes()),Ss(e.signatureOid,e.signatureParameters)]),h.create(h.Class.UNIVERSAL,h.Type.BITSTRING,!1,String.fromCharCode(0)+e.signature)])};P.certificateExtensionsToAsn1=function(e){var t=h.create(h.Class.CONTEXT_SPECIFIC,3,!0,[]),n=h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[]);t.value.push(n);for(var r=0;r"u"&&(a=new Date);var i=!0,s=null,o=0;do{var u=t.shift(),c=null,l=!1;if(a&&(au.validity.notAfter)&&(s={message:"Certificate is not valid yet or has expired.",error:P.certificateError.certificate_expired,notBefore:u.validity.notBefore,notAfter:u.validity.notAfter,now:a}),s===null){if(c=t[0]||e.getIssuer(u),c===null&&u.isIssuer(u)&&(l=!0,c=u),c){var f=c;H.util.isArray(f)||(f=[f]);for(var d=!1;!d&&f.length>0;){c=f.shift();try{d=c.verify(u)}catch{}}d||(s={message:"Certificate signature is invalid.",error:P.certificateError.bad_certificate})}s===null&&(!c||l)&&!e.hasCertificate(u)&&(s={message:"Certificate is not trusted.",error:P.certificateError.unknown_ca})}if(s===null&&c&&!u.isIssuer(c)&&(s={message:"Certificate issuer is invalid.",error:P.certificateError.bad_certificate}),s===null)for(var v={keyUsage:!0,basicConstraints:!0},p=0;s===null&&px.pathLenConstraint&&(s={message:"Certificate basicConstraints pathLenConstraint violated.",error:P.certificateError.bad_certificate})}}var A=s===null?!0:s.error,D=n.verify?n.verify(A,o,r):A;if(D===!0)s=null;else throw A===!0&&(s={message:"The application rejected the certificate.",error:P.certificateError.bad_certificate}),(D||D===0)&&(typeof D=="object"&&!H.util.isArray(D)?(D.message&&(s.message=D.message),D.error&&(s.error=D.error)):typeof D=="string"&&(s.error=D)),s;i=!1,++o}while(t.length>0);return!0}});var ws=j((iC,vc)=>{var ye=X();It();zr();lr();Es();Cs();vt();On();Xr();se();Pa();var C=ye.asn1,te=ye.pki,Fn=vc.exports=ye.pkcs12=ye.pkcs12||{},yc={name:"ContentInfo",tagClass:C.Class.UNIVERSAL,type:C.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:C.Class.UNIVERSAL,type:C.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:C.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},$m={name:"PFX",tagClass:C.Class.UNIVERSAL,type:C.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:C.Class.UNIVERSAL,type:C.Type.INTEGER,constructed:!1,capture:"version"},yc,{name:"PFX.macData",tagClass:C.Class.UNIVERSAL,type:C.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:C.Class.UNIVERSAL,type:C.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:C.Class.UNIVERSAL,type:C.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:C.Class.UNIVERSAL,type:C.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",tagClass:C.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:C.Class.UNIVERSAL,type:C.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:C.Class.UNIVERSAL,type:C.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:C.Class.UNIVERSAL,type:C.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},ey={name:"SafeBag",tagClass:C.Class.UNIVERSAL,type:C.Type.SEQUENCE,constructed:!0,value:[{name:"SafeBag.bagId",tagClass:C.Class.UNIVERSAL,type:C.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:C.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:C.Class.UNIVERSAL,type:C.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},ty={name:"Attribute",tagClass:C.Class.UNIVERSAL,type:C.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:C.Class.UNIVERSAL,type:C.Type.OID,constructed:!1,capture:"oid"},{name:"Attribute.attrValues",tagClass:C.Class.UNIVERSAL,type:C.Type.SET,constructed:!0,capture:"values"}]},ry={name:"CertBag",tagClass:C.Class.UNIVERSAL,type:C.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:C.Class.UNIVERSAL,type:C.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:C.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:C.Class.UNIVERSAL,type:C.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};function Vn(e,t,n,r){for(var a=[],i=0;i=0&&a.push(o)}}return a}Fn.pkcs12FromAsn1=function(e,t,n){typeof t=="string"?(n=t,t=!0):t===void 0&&(t=!0);var r={},a=[];if(!C.validate(e,$m,r,a)){var i=new Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX.");throw i.errors=i,i}var s={version:r.version.charCodeAt(0),safeContents:[],getBags:function(x){var b={},w;return"localKeyId"in x?w=x.localKeyId:"localKeyIdHex"in x&&(w=ye.util.hexToBytes(x.localKeyIdHex)),w===void 0&&!("friendlyName"in x)&&"bagType"in x&&(b[x.bagType]=Vn(s.safeContents,null,null,x.bagType)),w!==void 0&&(b.localKeyId=Vn(s.safeContents,"localKeyId",w,x.bagType)),"friendlyName"in x&&(b.friendlyName=Vn(s.safeContents,"friendlyName",x.friendlyName,x.bagType)),b},getBagsByFriendlyName:function(x,b){return Vn(s.safeContents,"friendlyName",x,b)},getBagsByLocalKeyId:function(x,b){return Vn(s.safeContents,"localKeyId",x,b)}};if(r.version.charCodeAt(0)!==3){var i=new Error("PKCS#12 PFX of version other than 3 not supported.");throw i.version=r.version.charCodeAt(0),i}if(C.derToOid(r.contentType)!==te.oids.data){var i=new Error("Only PKCS#12 PFX in password integrity mode supported.");throw i.oid=C.derToOid(r.contentType),i}var o=r.content.value[0];if(o.tagClass!==C.Class.UNIVERSAL||o.type!==C.Type.OCTETSTRING)throw new Error("PKCS#12 authSafe content data is not an OCTET STRING.");if(o=Ts(o),r.mac){var u=null,c=0,l=C.derToOid(r.macAlgorithm);switch(l){case te.oids.sha1:u=ye.md.sha1.create(),c=20;break;case te.oids.sha256:u=ye.md.sha256.create(),c=32;break;case te.oids.sha384:u=ye.md.sha384.create(),c=48;break;case te.oids.sha512:u=ye.md.sha512.create(),c=64;break;case te.oids.md5:u=ye.md.md5.create(),c=16;break}if(u===null)throw new Error("PKCS#12 uses unsupported MAC algorithm: "+l);var f=new ye.util.ByteBuffer(r.macSalt),d="macIterations"in r?parseInt(ye.util.bytesToHex(r.macIterations),16):1,v=Fn.generateKey(n,f,3,d,c,u),p=ye.hmac.create();p.start(u,v),p.update(o.value);var g=p.getMac();if(g.getBytes()!==r.macDigest)throw new Error("PKCS#12 MAC could not be verified. Invalid password?")}return ny(s,o.value,t,n),s};function Ts(e){if(e.composed||e.constructed){for(var t=ye.util.createBuffer(),n=0;n0&&(i=C.create(C.Class.UNIVERSAL,C.Type.SET,!0,u));var c=[],l=[];t!==null&&(ye.util.isArray(t)?l=t:l=[t]);for(var f=[],d=0;d0){var x=C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,f),b=C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,[C.create(C.Class.UNIVERSAL,C.Type.OID,!1,C.oidToDer(te.oids.data).getBytes()),C.create(C.Class.CONTEXT_SPECIFIC,0,!0,[C.create(C.Class.UNIVERSAL,C.Type.OCTETSTRING,!1,C.toDer(x).getBytes())])]);c.push(b)}var w=null;if(e!==null){var A=te.wrapRsaPrivateKey(te.privateKeyToAsn1(e));n===null?w=C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,[C.create(C.Class.UNIVERSAL,C.Type.OID,!1,C.oidToDer(te.oids.keyBag).getBytes()),C.create(C.Class.CONTEXT_SPECIFIC,0,!0,[A]),i]):w=C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,[C.create(C.Class.UNIVERSAL,C.Type.OID,!1,C.oidToDer(te.oids.pkcs8ShroudedKeyBag).getBytes()),C.create(C.Class.CONTEXT_SPECIFIC,0,!0,[te.encryptPrivateKeyInfo(A,n,r)]),i]);var D=C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,[w]),k=C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,[C.create(C.Class.UNIVERSAL,C.Type.OID,!1,C.oidToDer(te.oids.data).getBytes()),C.create(C.Class.CONTEXT_SPECIFIC,0,!0,[C.create(C.Class.UNIVERSAL,C.Type.OCTETSTRING,!1,C.toDer(D).getBytes())])]);c.push(k)}var L=C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,c),z;if(r.useMac){var o=ye.md.sha1.create(),Z=new ye.util.ByteBuffer(ye.random.getBytes(r.saltSize)),le=r.count,e=Fn.generateKey(n,Z,3,le,20),fe=ye.hmac.create();fe.start(o,e),fe.update(C.toDer(L).getBytes());var he=fe.getMac();z=C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,[C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,[C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,[C.create(C.Class.UNIVERSAL,C.Type.OID,!1,C.oidToDer(te.oids.sha1).getBytes()),C.create(C.Class.UNIVERSAL,C.Type.NULL,!1,"")]),C.create(C.Class.UNIVERSAL,C.Type.OCTETSTRING,!1,he.getBytes())]),C.create(C.Class.UNIVERSAL,C.Type.OCTETSTRING,!1,Z.getBytes()),C.create(C.Class.UNIVERSAL,C.Type.INTEGER,!1,C.integerToDer(le).getBytes())])}return C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,[C.create(C.Class.UNIVERSAL,C.Type.INTEGER,!1,C.integerToDer(3).getBytes()),C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,[C.create(C.Class.UNIVERSAL,C.Type.OID,!1,C.oidToDer(te.oids.data).getBytes()),C.create(C.Class.CONTEXT_SPECIFIC,0,!0,[C.create(C.Class.UNIVERSAL,C.Type.OCTETSTRING,!1,C.toDer(L).getBytes())])]),z])};Fn.generateKey=ye.pbe.generatePkcs12Key});var As=j((sC,gc)=>{var hr=X();It();lr();Cs();Er();wa();ws();ka();On();se();Pa();var Is=hr.asn1,en=gc.exports=hr.pki=hr.pki||{};en.pemToDer=function(e){var t=hr.pem.decode(e)[0];if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert PEM to DER; PEM is encrypted.");return hr.util.createBuffer(t.body)};en.privateKeyFromPem=function(e){var t=hr.pem.decode(e)[0];if(t.type!=="PRIVATE KEY"&&t.type!=="RSA PRIVATE KEY"){var n=new Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');throw n.headerType=t.type,n}if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert private key from PEM; PEM is encrypted.");var r=Is.fromDer(t.body);return en.privateKeyFromAsn1(r)};en.privateKeyToPem=function(e,t){var n={type:"RSA PRIVATE KEY",body:Is.toDer(en.privateKeyToAsn1(e)).getBytes()};return hr.pem.encode(n,{maxline:t})};en.privateKeyInfoToPem=function(e,t){var n={type:"PRIVATE KEY",body:Is.toDer(e).getBytes()};return hr.pem.encode(n,{maxline:t})}});var Ls=j((oC,Ic)=>{var R=X();It();zr();Ca();Er();As();vt();Xr();se();var Fa=function(e,t,n,r){var a=R.util.createBuffer(),i=e.length>>1,s=i+(e.length&1),o=e.substr(0,s),u=e.substr(i,s),c=R.util.createBuffer(),l=R.hmac.create();n=t+n;var f=Math.ceil(r/16),d=Math.ceil(r/20);l.start("MD5",o);var v=R.util.createBuffer();c.putBytes(n);for(var p=0;p0&&(y.queue(e,y.createAlert(e,{level:y.Alert.Level.warning,description:y.Alert.Description.no_renegotiation})),y.flush(e)),e.process()};y.parseHelloMessage=function(e,t,n){var r=null,a=e.entity===y.ConnectionEnd.client;if(n<38)e.error(e,{message:a?"Invalid ServerHello message. Message too short.":"Invalid ClientHello message. Message too short.",send:!0,alert:{level:y.Alert.Level.fatal,description:y.Alert.Description.illegal_parameter}});else{var i=t.fragment,s=i.length();if(r={version:{major:i.getByte(),minor:i.getByte()},random:R.util.createBuffer(i.getBytes(32)),session_id:dt(i,1),extensions:[]},a?(r.cipher_suite=i.getBytes(2),r.compression_method=i.getByte()):(r.cipher_suites=dt(i,2),r.compression_methods=dt(i,1)),s=n-(s-i.length()),s>0){for(var o=dt(i,2);o.length()>0;)r.extensions.push({type:[o.getByte(),o.getByte()],data:dt(o,2)});if(!a)for(var u=0;u0;){var f=l.getByte();if(f!==0)break;e.session.extensions.server_name.serverNameList.push(dt(l,2).getBytes())}}}if(e.session.version&&(r.version.major!==e.session.version.major||r.version.minor!==e.session.version.minor))return e.error(e,{message:"TLS version change is disallowed during renegotiation.",send:!0,alert:{level:y.Alert.Level.fatal,description:y.Alert.Description.protocol_version}});if(a)e.session.cipherSuite=y.getCipherSuite(r.cipher_suite);else for(var d=R.util.createBuffer(r.cipher_suites.bytes());d.length()>0&&(e.session.cipherSuite=y.getCipherSuite(d.getBytes(2)),e.session.cipherSuite===null););if(e.session.cipherSuite===null)return e.error(e,{message:"No cipher suites in common.",send:!0,alert:{level:y.Alert.Level.fatal,description:y.Alert.Description.handshake_failure},cipherSuite:R.util.bytesToHex(r.cipher_suite)});a?e.session.compressionMethod=r.compression_method:e.session.compressionMethod=y.CompressionMethod.none}return r};y.createSecurityParameters=function(e,t){var n=e.entity===y.ConnectionEnd.client,r=t.random.bytes(),a=n?e.session.sp.client_random:r,i=n?r:y.createRandom().getBytes();e.session.sp={entity:e.entity,prf_algorithm:y.PRFAlgorithm.tls_prf_sha256,bulk_cipher_algorithm:null,cipher_type:null,enc_key_length:null,block_length:null,fixed_iv_length:null,record_iv_length:null,mac_algorithm:null,mac_length:null,mac_key_length:null,compression_algorithm:e.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:a,server_random:i}};y.handleServerHello=function(e,t,n){var r=y.parseHelloMessage(e,t,n);if(!e.fail){if(r.version.minor<=e.version.minor)e.version.minor=r.version.minor;else return e.error(e,{message:"Incompatible TLS version.",send:!0,alert:{level:y.Alert.Level.fatal,description:y.Alert.Description.protocol_version}});e.session.version=e.version;var a=r.session_id.bytes();a.length>0&&a===e.session.id?(e.expect=Ec,e.session.resuming=!0,e.session.sp.server_random=r.random.bytes()):(e.expect=fy,e.session.resuming=!1,y.createSecurityParameters(e,r)),e.session.id=a,e.process()}};y.handleClientHello=function(e,t,n){var r=y.parseHelloMessage(e,t,n);if(!e.fail){var a=r.session_id.bytes(),i=null;if(e.sessionCache&&(i=e.sessionCache.getSession(a),i===null?a="":(i.version.major!==r.version.major||i.version.minor>r.version.minor)&&(i=null,a="")),a.length===0&&(a=R.random.getBytes(32)),e.session.id=a,e.session.clientHelloVersion=r.version,e.session.sp={},i)e.version=e.session.version=i.version,e.session.sp=i.sp;else{for(var s,o=1;o0;)i=dt(a.certificate_list,3),s=R.asn1.fromDer(i),i=R.pki.certificateFromAsn1(s,!0),o.push(i)}catch(c){return e.error(e,{message:"Could not parse certificate list.",cause:c,send:!0,alert:{level:y.Alert.Level.fatal,description:y.Alert.Description.bad_certificate}})}var u=e.entity===y.ConnectionEnd.client;(u||e.verifyClient===!0)&&o.length===0?e.error(e,{message:u?"No server certificate provided.":"No client certificate provided.",send:!0,alert:{level:y.Alert.Level.fatal,description:y.Alert.Description.illegal_parameter}}):o.length===0?e.expect=u?xc:Rs:(u?e.session.serverCertificate=o[0]:e.session.clientCertificate=o[0],y.verifyCertificateChain(e,o)&&(e.expect=u?xc:Rs)),e.process()};y.handleServerKeyExchange=function(e,t,n){if(n>0)return e.error(e,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:y.Alert.Level.fatal,description:y.Alert.Description.unsupported_certificate}});e.expect=dy,e.process()};y.handleClientKeyExchange=function(e,t,n){if(n<48)return e.error(e,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:y.Alert.Level.fatal,description:y.Alert.Description.unsupported_certificate}});var r=t.fragment,a={enc_pre_master_secret:dt(r,2).getBytes()},i=null;if(e.getPrivateKey)try{i=e.getPrivateKey(e,e.session.serverCertificate),i=R.pki.privateKeyFromPem(i)}catch(u){e.error(e,{message:"Could not get private key.",cause:u,send:!0,alert:{level:y.Alert.Level.fatal,description:y.Alert.Description.internal_error}})}if(i===null)return e.error(e,{message:"No private key set.",send:!0,alert:{level:y.Alert.Level.fatal,description:y.Alert.Description.internal_error}});try{var s=e.session.sp;s.pre_master_secret=i.decrypt(a.enc_pre_master_secret);var o=e.session.clientHelloVersion;if(o.major!==s.pre_master_secret.charCodeAt(0)||o.minor!==s.pre_master_secret.charCodeAt(1))throw new Error("TLS version rollback attack detected.")}catch{s.pre_master_secret=R.random.getBytes(48)}e.expect=Ns,e.session.clientCertificate!==null&&(e.expect=xy),e.process()};y.handleCertificateRequest=function(e,t,n){if(n<3)return e.error(e,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:y.Alert.Level.fatal,description:y.Alert.Description.illegal_parameter}});var r=t.fragment,a={certificate_types:dt(r,1),certificate_authorities:dt(r,2)};e.session.certificateRequest=a,e.expect=py,e.process()};y.handleCertificateVerify=function(e,t,n){if(n<2)return e.error(e,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:y.Alert.Level.fatal,description:y.Alert.Description.illegal_parameter}});var r=t.fragment;r.read-=4;var a=r.bytes();r.read+=4;var i={signature:dt(r,2).getBytes()},s=R.util.createBuffer();s.putBuffer(e.session.md5.digest()),s.putBuffer(e.session.sha1.digest()),s=s.getBytes();try{var o=e.session.clientCertificate;if(!o.publicKey.verify(s,i.signature,"NONE"))throw new Error("CertificateVerify signature does not match.");e.session.md5.update(a),e.session.sha1.update(a)}catch{return e.error(e,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:y.Alert.Level.fatal,description:y.Alert.Description.handshake_failure}})}e.expect=Ns,e.process()};y.handleServerHelloDone=function(e,t,n){if(n>0)return e.error(e,{message:"Invalid ServerHelloDone message. Invalid length.",send:!0,alert:{level:y.Alert.Level.fatal,description:y.Alert.Description.record_overflow}});if(e.serverCertificate===null){var r={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:y.Alert.Level.fatal,description:y.Alert.Description.insufficient_security}},a=0,i=e.verify(e,r.alert.description,a,[]);if(i!==!0)return(i||i===0)&&(typeof i=="object"&&!R.util.isArray(i)?(i.message&&(r.message=i.message),i.alert&&(r.alert.description=i.alert)):typeof i=="number"&&(r.alert.description=i)),e.error(e,r)}e.session.certificateRequest!==null&&(t=y.createRecord(e,{type:y.ContentType.handshake,data:y.createCertificate(e)}),y.queue(e,t)),t=y.createRecord(e,{type:y.ContentType.handshake,data:y.createClientKeyExchange(e)}),y.queue(e,t),e.expect=yy;var s=function(o,u){o.session.certificateRequest!==null&&o.session.clientCertificate!==null&&y.queue(o,y.createRecord(o,{type:y.ContentType.handshake,data:y.createCertificateVerify(o,u)})),y.queue(o,y.createRecord(o,{type:y.ContentType.change_cipher_spec,data:y.createChangeCipherSpec()})),o.state.pending=y.createConnectionState(o),o.state.current.write=o.state.pending.write,y.queue(o,y.createRecord(o,{type:y.ContentType.handshake,data:y.createFinished(o)})),o.expect=Ec,y.flush(o),o.process()};if(e.session.certificateRequest===null||e.session.clientCertificate===null)return s(e,null);y.getClientSignature(e,s)};y.handleChangeCipherSpec=function(e,t){if(t.fragment.getByte()!==1)return e.error(e,{message:"Invalid ChangeCipherSpec message received.",send:!0,alert:{level:y.Alert.Level.fatal,description:y.Alert.Description.illegal_parameter}});var n=e.entity===y.ConnectionEnd.client;(e.session.resuming&&n||!e.session.resuming&&!n)&&(e.state.pending=y.createConnectionState(e)),e.state.current.read=e.state.pending.read,(!e.session.resuming&&n||e.session.resuming&&!n)&&(e.state.pending=null),e.expect=n?hy:Cy,e.process()};y.handleFinished=function(e,t,n){var r=t.fragment;r.read-=4;var a=r.bytes();r.read+=4;var i=t.fragment.getBytes();r=R.util.createBuffer(),r.putBuffer(e.session.md5.digest()),r.putBuffer(e.session.sha1.digest());var s=e.entity===y.ConnectionEnd.client,o=s?"server finished":"client finished",u=e.session.sp,c=12,l=Fa;if(r=l(u.master_secret,o,r.getBytes(),c),r.getBytes()!==i)return e.error(e,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:y.Alert.Level.fatal,description:y.Alert.Description.decrypt_error}});e.session.md5.update(a),e.session.sha1.update(a),(e.session.resuming&&s||!e.session.resuming&&!s)&&(y.queue(e,y.createRecord(e,{type:y.ContentType.change_cipher_spec,data:y.createChangeCipherSpec()})),e.state.current.write=e.state.pending.write,e.state.pending=null,y.queue(e,y.createRecord(e,{type:y.ContentType.handshake,data:y.createFinished(e)}))),e.expect=s?my:Ey,e.handshaking=!1,++e.handshakes,e.peerCertificate=s?e.session.serverCertificate:e.session.clientCertificate,y.flush(e),e.isConnected=!0,e.connected(e),e.process()};y.handleAlert=function(e,t){var n=t.fragment,r={level:n.getByte(),description:n.getByte()},a;switch(r.description){case y.Alert.Description.close_notify:a="Connection closed.";break;case y.Alert.Description.unexpected_message:a="Unexpected message.";break;case y.Alert.Description.bad_record_mac:a="Bad record MAC.";break;case y.Alert.Description.decryption_failed:a="Decryption failed.";break;case y.Alert.Description.record_overflow:a="Record overflow.";break;case y.Alert.Description.decompression_failure:a="Decompression failed.";break;case y.Alert.Description.handshake_failure:a="Handshake failure.";break;case y.Alert.Description.bad_certificate:a="Bad certificate.";break;case y.Alert.Description.unsupported_certificate:a="Unsupported certificate.";break;case y.Alert.Description.certificate_revoked:a="Certificate revoked.";break;case y.Alert.Description.certificate_expired:a="Certificate expired.";break;case y.Alert.Description.certificate_unknown:a="Certificate unknown.";break;case y.Alert.Description.illegal_parameter:a="Illegal parameter.";break;case y.Alert.Description.unknown_ca:a="Unknown certificate authority.";break;case y.Alert.Description.access_denied:a="Access denied.";break;case y.Alert.Description.decode_error:a="Decode error.";break;case y.Alert.Description.decrypt_error:a="Decrypt error.";break;case y.Alert.Description.export_restriction:a="Export restriction.";break;case y.Alert.Description.protocol_version:a="Unsupported protocol version.";break;case y.Alert.Description.insufficient_security:a="Insufficient security.";break;case y.Alert.Description.internal_error:a="Internal error.";break;case y.Alert.Description.user_canceled:a="User canceled.";break;case y.Alert.Description.no_renegotiation:a="Renegotiation not supported.";break;default:a="Unknown error.";break}if(r.description===y.Alert.Description.close_notify)return e.close();e.error(e,{message:a,send:!1,origin:e.entity===y.ConnectionEnd.client?"server":"client",alert:r}),e.process()};y.handleHandshake=function(e,t){var n=t.fragment,r=n.getByte(),a=n.getInt24();if(a>n.length())return e.fragmented=t,t.fragment=R.util.createBuffer(),n.read-=4,e.process();e.fragmented=null,n.read-=4;var i=n.bytes(a+4);n.read+=4,r in Va[e.entity][e.expect]?(e.entity===y.ConnectionEnd.server&&!e.open&&!e.fail&&(e.handshaking=!0,e.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:R.md.md5.create(),sha1:R.md.sha1.create()}),r!==y.HandshakeType.hello_request&&r!==y.HandshakeType.certificate_verify&&r!==y.HandshakeType.finished&&(e.session.md5.update(i),e.session.sha1.update(i)),Va[e.entity][e.expect][r](e,t,a)):y.handleUnexpected(e,t)};y.handleApplicationData=function(e,t){e.data.putBuffer(t.fragment),e.dataReady(e),e.process()};y.handleHeartbeat=function(e,t){var n=t.fragment,r=n.getByte(),a=n.getInt16(),i=n.getBytes(a);if(r===y.HeartbeatMessageType.heartbeat_request){if(e.handshaking||a>i.length)return e.process();y.queue(e,y.createRecord(e,{type:y.ContentType.heartbeat,data:y.createHeartbeat(y.HeartbeatMessageType.heartbeat_response,i)})),y.flush(e)}else if(r===y.HeartbeatMessageType.heartbeat_response){if(i!==e.expectedHeartbeatPayload)return e.process();e.heartbeatReceived&&e.heartbeatReceived(e,R.util.createBuffer(i))}e.process()};var ly=0,fy=1,xc=2,dy=3,py=4,Ec=5,hy=6,my=7,yy=8,vy=0,gy=1,Rs=2,xy=3,Ns=4,Cy=5,Ey=6,m=y.handleUnexpected,bc=y.handleChangeCipherSpec,Ue=y.handleAlert,ot=y.handleHandshake,Sc=y.handleApplicationData,Oe=y.handleHeartbeat,ks=[];ks[y.ConnectionEnd.client]=[[m,Ue,ot,m,Oe],[m,Ue,ot,m,Oe],[m,Ue,ot,m,Oe],[m,Ue,ot,m,Oe],[m,Ue,ot,m,Oe],[bc,Ue,m,m,Oe],[m,Ue,ot,m,Oe],[m,Ue,ot,Sc,Oe],[m,Ue,ot,m,Oe]];ks[y.ConnectionEnd.server]=[[m,Ue,ot,m,Oe],[m,Ue,ot,m,Oe],[m,Ue,ot,m,Oe],[m,Ue,ot,m,Oe],[bc,Ue,m,m,Oe],[m,Ue,ot,m,Oe],[m,Ue,ot,Sc,Oe],[m,Ue,ot,m,Oe]];var mr=y.handleHelloRequest,by=y.handleServerHello,Tc=y.handleCertificate,Cc=y.handleServerKeyExchange,Bs=y.handleCertificateRequest,Ua=y.handleServerHelloDone,wc=y.handleFinished,Va=[];Va[y.ConnectionEnd.client]=[[m,m,by,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m],[mr,m,m,m,m,m,m,m,m,m,m,Tc,Cc,Bs,Ua,m,m,m,m,m,m],[mr,m,m,m,m,m,m,m,m,m,m,m,Cc,Bs,Ua,m,m,m,m,m,m],[mr,m,m,m,m,m,m,m,m,m,m,m,m,Bs,Ua,m,m,m,m,m,m],[mr,m,m,m,m,m,m,m,m,m,m,m,m,m,Ua,m,m,m,m,m,m],[mr,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m],[mr,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,wc],[mr,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m],[mr,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m]];var Sy=y.handleClientHello,Ty=y.handleClientKeyExchange,wy=y.handleCertificateVerify;Va[y.ConnectionEnd.server]=[[m,Sy,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m],[m,m,m,m,m,m,m,m,m,m,m,Tc,m,m,m,m,m,m,m,m,m],[m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,Ty,m,m,m,m],[m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,wy,m,m,m,m,m],[m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m],[m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,wc],[m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m],[m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m]];y.generateKeys=function(e,t){var n=Fa,r=t.client_random+t.server_random;e.session.resuming||(t.master_secret=n(t.pre_master_secret,"master secret",r,48).bytes(),t.pre_master_secret=null),r=t.server_random+t.client_random;var a=2*t.mac_key_length+2*t.enc_key_length,i=e.version.major===y.Versions.TLS_1_0.major&&e.version.minor===y.Versions.TLS_1_0.minor;i&&(a+=2*t.fixed_iv_length);var s=n(t.master_secret,"key expansion",r,a),o={client_write_MAC_key:s.getBytes(t.mac_key_length),server_write_MAC_key:s.getBytes(t.mac_key_length),client_write_key:s.getBytes(t.enc_key_length),server_write_key:s.getBytes(t.enc_key_length)};return i&&(o.client_write_IV=s.getBytes(t.fixed_iv_length),o.server_write_IV=s.getBytes(t.fixed_iv_length)),o};y.createConnectionState=function(e){var t=e.entity===y.ConnectionEnd.client,n=function(){var i={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,cipherState:null,cipherFunction:function(s){return!0},compressionState:null,compressFunction:function(s){return!0},updateSequenceNumber:function(){i.sequenceNumber[1]===4294967295?(i.sequenceNumber[1]=0,++i.sequenceNumber[0]):++i.sequenceNumber[1]}};return i},r={read:n(),write:n()};if(r.read.update=function(i,s){return r.read.cipherFunction(s,r.read)?r.read.compressFunction(i,s,r.read)||i.error(i,{message:"Could not decompress record.",send:!0,alert:{level:y.Alert.Level.fatal,description:y.Alert.Description.decompression_failure}}):i.error(i,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:y.Alert.Level.fatal,description:y.Alert.Description.bad_record_mac}}),!i.fail},r.write.update=function(i,s){return r.write.compressFunction(i,s,r.write)?r.write.cipherFunction(s,r.write)||i.error(i,{message:"Could not encrypt record.",send:!1,alert:{level:y.Alert.Level.fatal,description:y.Alert.Description.internal_error}}):i.error(i,{message:"Could not compress record.",send:!1,alert:{level:y.Alert.Level.fatal,description:y.Alert.Description.internal_error}}),!i.fail},e.session){var a=e.session.sp;switch(e.session.cipherSuite.initSecurityParameters(a),a.keys=y.generateKeys(e,a),r.read.macKey=t?a.keys.server_write_MAC_key:a.keys.client_write_MAC_key,r.write.macKey=t?a.keys.client_write_MAC_key:a.keys.server_write_MAC_key,e.session.cipherSuite.initConnectionState(r,e,a),a.compression_algorithm){case y.CompressionMethod.none:break;case y.CompressionMethod.deflate:r.read.compressFunction=cy,r.write.compressFunction=uy;break;default:throw new Error("Unsupported compression algorithm.")}}return r};y.createRandom=function(){var e=new Date,t=+e+e.getTimezoneOffset()*6e4,n=R.util.createBuffer();return n.putInt32(t),n.putBytes(R.random.getBytes(28)),n};y.createRecord=function(e,t){if(!t.data)return null;var n={type:t.type,version:{major:e.version.major,minor:e.version.minor},length:t.data.length(),fragment:t.data};return n};y.createAlert=function(e,t){var n=R.util.createBuffer();return n.putByte(t.level),n.putByte(t.description),y.createRecord(e,{type:y.ContentType.alert,data:n})};y.createClientHello=function(e){e.session.clientHelloVersion={major:e.version.major,minor:e.version.minor};for(var t=R.util.createBuffer(),n=0;n0&&(f+=2);var d=e.session.id,v=d.length+1+2+4+28+2+a+1+s+f,p=R.util.createBuffer();return p.putByte(y.HandshakeType.client_hello),p.putInt24(v),p.putByte(e.version.major),p.putByte(e.version.minor),p.putBytes(e.session.sp.client_random),Et(p,1,R.util.createBuffer(d)),Et(p,2,t),Et(p,1,i),f>0&&Et(p,2,o),p};y.createServerHello=function(e){var t=e.session.id,n=t.length+1+2+4+28+2+1,r=R.util.createBuffer();return r.putByte(y.HandshakeType.server_hello),r.putInt24(n),r.putByte(e.version.major),r.putByte(e.version.minor),r.putBytes(e.session.sp.server_random),Et(r,1,R.util.createBuffer(t)),r.putByte(e.session.cipherSuite.id[0]),r.putByte(e.session.cipherSuite.id[1]),r.putByte(e.session.compressionMethod),r};y.createCertificate=function(e){var t=e.entity===y.ConnectionEnd.client,n=null;if(e.getCertificate){var r;t?r=e.session.certificateRequest:r=e.session.extensions.server_name.serverNameList,n=e.getCertificate(e,r)}var a=R.util.createBuffer();if(n!==null)try{R.util.isArray(n)||(n=[n]);for(var i=null,s=0;s0&&(n.putByte(y.HandshakeType.server_key_exchange),n.putInt24(t)),n};y.getClientSignature=function(e,t){var n=R.util.createBuffer();n.putBuffer(e.session.md5.digest()),n.putBuffer(e.session.sha1.digest()),n=n.getBytes(),e.getSignature=e.getSignature||function(r,a,i){var s=null;if(r.getPrivateKey)try{s=r.getPrivateKey(r,r.session.clientCertificate),s=R.pki.privateKeyFromPem(s)}catch(o){r.error(r,{message:"Could not get private key.",cause:o,send:!0,alert:{level:y.Alert.Level.fatal,description:y.Alert.Description.internal_error}})}s===null?r.error(r,{message:"No private key set.",send:!0,alert:{level:y.Alert.Level.fatal,description:y.Alert.Description.internal_error}}):a=s.sign(a,null),i(r,a)},e.getSignature(e,n,t)};y.createCertificateVerify=function(e,t){var n=t.length+2,r=R.util.createBuffer();return r.putByte(y.HandshakeType.certificate_verify),r.putInt24(n),r.putInt16(t.length),r.putBytes(t),r};y.createCertificateRequest=function(e){var t=R.util.createBuffer();t.putByte(1);var n=R.util.createBuffer();for(var r in e.caStore.certs){var a=e.caStore.certs[r],i=R.pki.distinguishedNameToAsn1(a.subject),s=R.asn1.toDer(i);n.putInt16(s.length()),n.putBuffer(s)}var o=1+t.length()+2+n.length(),u=R.util.createBuffer();return u.putByte(y.HandshakeType.certificate_request),u.putInt24(o),Et(u,1,t),Et(u,2,n),u};y.createServerHelloDone=function(e){var t=R.util.createBuffer();return t.putByte(y.HandshakeType.server_hello_done),t.putInt24(0),t};y.createChangeCipherSpec=function(){var e=R.util.createBuffer();return e.putByte(1),e};y.createFinished=function(e){var t=R.util.createBuffer();t.putBuffer(e.session.md5.digest()),t.putBuffer(e.session.sha1.digest());var n=e.entity===y.ConnectionEnd.client,r=e.session.sp,a=12,i=Fa,s=n?"client finished":"server finished";t=i(r.master_secret,s,t.getBytes(),a);var o=R.util.createBuffer();return o.putByte(y.HandshakeType.finished),o.putInt24(t.length()),o.putBuffer(t),o};y.createHeartbeat=function(e,t,n){typeof n>"u"&&(n=t.length);var r=R.util.createBuffer();r.putByte(e),r.putInt16(n),r.putBytes(t);var a=r.length(),i=Math.max(16,a-n-3);return r.putBytes(R.random.getBytes(i)),r};y.queue=function(e,t){if(t&&!(t.fragment.length()===0&&(t.type===y.ContentType.handshake||t.type===y.ContentType.alert||t.type===y.ContentType.change_cipher_spec))){if(t.type===y.ContentType.handshake){var n=t.fragment.bytes();e.session.md5.update(n),e.session.sha1.update(n),n=null}var r;if(t.fragment.length()<=y.MaxFragment)r=[t];else{r=[];for(var a=t.fragment.bytes();a.length>y.MaxFragment;)r.push(y.createRecord(e,{type:t.type,data:R.util.createBuffer(a.slice(0,y.MaxFragment))})),a=a.slice(y.MaxFragment);a.length>0&&r.push(y.createRecord(e,{type:t.type,data:R.util.createBuffer(a)}))}for(var i=0;i0&&(s=n.order[0]),s!==null&&s in n.cache){i=n.cache[s],delete n.cache[s];for(var o in n.order)if(n.order[o]===s){n.order.splice(o,1);break}}return i},n.setSession=function(a,i){if(n.order.length===n.capacity){var s=n.order.shift();delete n.cache[s]}var s=R.util.bytesToHex(a);n.order.push(s),n.cache[s]=i}}return n};y.createConnection=function(e){var t=null;e.caStore?R.util.isArray(e.caStore)?t=R.pki.createCaStore(e.caStore):t=e.caStore:t=R.pki.createCaStore();var n=e.cipherSuites||null;if(n===null){n=[];for(var r in y.CipherSuites)n.push(y.CipherSuites[r])}var a=e.server?y.ConnectionEnd.server:y.ConnectionEnd.client,i=e.sessionCache?y.createSessionCache(e.sessionCache):null,s={version:{major:y.Version.major,minor:y.Version.minor},entity:a,sessionId:e.sessionId,caStore:t,sessionCache:i,cipherSuites:n,connected:e.connected,virtualHost:e.virtualHost||null,verifyClient:e.verifyClient||!1,verify:e.verify||function(l,f,d,v){return f},verifyOptions:e.verifyOptions||{},getCertificate:e.getCertificate||null,getPrivateKey:e.getPrivateKey||null,getSignature:e.getSignature||null,input:R.util.createBuffer(),tlsData:R.util.createBuffer(),data:R.util.createBuffer(),tlsDataReady:e.tlsDataReady,dataReady:e.dataReady,heartbeatReceived:e.heartbeatReceived,closed:e.closed,error:function(l,f){f.origin=f.origin||(l.entity===y.ConnectionEnd.client?"client":"server"),f.send&&(y.queue(l,y.createAlert(l,f.alert)),y.flush(l));var d=f.fatal!==!1;d&&(l.fail=!0),e.error(l,f),d&&l.close(!1)},deflate:e.deflate||null,inflate:e.inflate||null};s.reset=function(l){s.version={major:y.Version.major,minor:y.Version.minor},s.record=null,s.session=null,s.peerCertificate=null,s.state={pending:null,current:null},s.expect=s.entity===y.ConnectionEnd.client?ly:vy,s.fragmented=null,s.records=[],s.open=!1,s.handshakes=0,s.handshaking=!1,s.isConnected=!1,s.fail=!(l||typeof l>"u"),s.input.clear(),s.tlsData.clear(),s.data.clear(),s.state.current=y.createConnectionState(s)},s.reset();var o=function(l,f){var d=f.type-y.ContentType.change_cipher_spec,v=ks[l.entity][l.expect];d in v?v[d](l,f):y.handleUnexpected(l,f)},u=function(l){var f=0,d=l.input,v=d.length();if(v<5)f=5-v;else{l.record={type:d.getByte(),version:{major:d.getByte(),minor:d.getByte()},length:d.getInt16(),fragment:R.util.createBuffer(),ready:!1};var p=l.record.version.major===l.version.major;p&&l.session&&l.session.version&&(p=l.record.version.minor===l.version.minor),p||l.error(l,{message:"Incompatible TLS version.",send:!0,alert:{level:y.Alert.Level.fatal,description:y.Alert.Description.protocol_version}})}return f},c=function(l){var f=0,d=l.input,v=d.length();if(v0&&(s.sessionCache&&(f=s.sessionCache.getSession(l)),f===null&&(l="")),l.length===0&&s.sessionCache&&(f=s.sessionCache.getSession(),f!==null&&(l=f.id)),s.session={id:l,version:null,cipherSuite:null,compressionMethod:null,serverCertificate:null,certificateRequest:null,clientCertificate:null,sp:{},md5:R.md.md5.create(),sha1:R.md.sha1.create()},f&&(s.version=f.version,s.session.sp=f.sp),s.session.sp.client_random=y.createRandom().getBytes(),s.open=!0,y.queue(s,y.createRecord(s,{type:y.ContentType.handshake,data:y.createClientHello(s)})),y.flush(s)}},s.process=function(l){var f=0;return l&&s.input.putBytes(l),s.fail||(s.record!==null&&s.record.ready&&s.record.fragment.isEmpty()&&(s.record=null),s.record===null&&(f=u(s)),!s.fail&&s.record!==null&&!s.record.ready&&(f=c(s)),!s.fail&&s.record!==null&&s.record.ready&&o(s,s.record)),f},s.prepare=function(l){return y.queue(s,y.createRecord(s,{type:y.ContentType.application_data,data:R.util.createBuffer(l)})),y.flush(s)},s.prepareHeartbeatRequest=function(l,f){return l instanceof R.util.ByteBuffer&&(l=l.bytes()),typeof f>"u"&&(f=l.length),s.expectedHeartbeatPayload=l,y.queue(s,y.createRecord(s,{type:y.ContentType.heartbeat,data:y.createHeartbeat(y.HeartbeatMessageType.heartbeat_request,l,f)})),y.flush(s)},s.close=function(l){if(!s.fail&&s.sessionCache&&s.session){var f={id:s.session.id,version:s.session.version,sp:s.session.sp};f.sp.keys=null,s.sessionCache.setSession(f.id,f)}s.open&&(s.open=!1,s.input.clear(),(s.isConnected||s.handshaking)&&(s.isConnected=s.handshaking=!1,y.queue(s,y.createAlert(s,{level:y.Alert.Level.warning,description:y.Alert.Description.close_notify})),y.flush(s)),s.closed(s)),s.reset(l)},s};Ic.exports=R.tls=R.tls||{};for(Oa in y)typeof y[Oa]!="function"&&(R.tls[Oa]=y[Oa]);var Oa;R.tls.prf_tls1=Fa;R.tls.hmac_sha1=oy;R.tls.createSessionCache=y.createSessionCache;R.tls.createConnection=y.createConnection});var _c=j((uC,Bc)=>{var yr=X();cr();Ls();var bt=Bc.exports=yr.tls;bt.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:function(e){e.bulk_cipher_algorithm=bt.BulkCipherAlgorithm.aes,e.cipher_type=bt.CipherType.block,e.enc_key_length=16,e.block_length=16,e.fixed_iv_length=16,e.record_iv_length=16,e.mac_algorithm=bt.MACAlgorithm.hmac_sha1,e.mac_length=20,e.mac_key_length=20},initConnectionState:Ac};bt.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA={id:[0,53],name:"TLS_RSA_WITH_AES_256_CBC_SHA",initSecurityParameters:function(e){e.bulk_cipher_algorithm=bt.BulkCipherAlgorithm.aes,e.cipher_type=bt.CipherType.block,e.enc_key_length=32,e.block_length=16,e.fixed_iv_length=16,e.record_iv_length=16,e.mac_algorithm=bt.MACAlgorithm.hmac_sha1,e.mac_length=20,e.mac_key_length=20},initConnectionState:Ac};function Ac(e,t,n){var r=t.entity===yr.tls.ConnectionEnd.client;e.read.cipherState={init:!1,cipher:yr.cipher.createDecipher("AES-CBC",r?n.keys.server_write_key:n.keys.client_write_key),iv:r?n.keys.server_write_IV:n.keys.client_write_IV},e.write.cipherState={init:!1,cipher:yr.cipher.createCipher("AES-CBC",r?n.keys.client_write_key:n.keys.server_write_key),iv:r?n.keys.client_write_IV:n.keys.server_write_IV},e.read.cipherFunction=Ry,e.write.cipherFunction=Ay,e.read.macLength=e.write.macLength=n.mac_length,e.read.macFunction=e.write.macFunction=bt.hmac_sha1}function Ay(e,t){var n=!1,r=t.macFunction(t.macKey,t.sequenceNumber,e);e.fragment.putBytes(r),t.updateSequenceNumber();var a;e.version.minor===bt.Versions.TLS_1_0.minor?a=t.cipherState.init?null:t.cipherState.iv:a=yr.random.getBytesSync(16),t.cipherState.init=!0;var i=t.cipherState.cipher;return i.start({iv:a}),e.version.minor>=bt.Versions.TLS_1_1.minor&&i.output.putBytes(a),i.update(e.fragment),i.finish(By)&&(e.fragment=i.output,e.length=e.fragment.length(),n=!0),n}function By(e,t,n){if(!n){var r=e-t.length()%e;t.fillWithByte(r-1,r)}return!0}function _y(e,t,n){var r=!0;if(n){for(var a=t.length(),i=t.last(),s=a-1-i;s=i?(e.fragment=a.output.getBytes(o-i),s=a.output.getBytes(i)):e.fragment=a.output.getBytes(),e.fragment=yr.util.createBuffer(e.fragment),e.length=e.fragment.length();var u=t.macFunction(t.macKey,t.sequenceNumber,e);return t.updateSequenceNumber(),n=Ny(t.macKey,s,u)&&n,n}function Ny(e,t,n){var r=yr.hmac.create();return r.start("SHA1",e),r.update(t),t=r.digest().getBytes(),r.start(null,null),r.update(n),n=r.digest().getBytes(),t===n}});var Us=j((cC,Lc)=>{var Ce=X();kt();se();var Mn=Lc.exports=Ce.sha512=Ce.sha512||{};Ce.md.sha512=Ce.md.algorithms.sha512=Mn;var Nc=Ce.sha384=Ce.sha512.sha384=Ce.sha512.sha384||{};Nc.create=function(){return Mn.create("SHA-384")};Ce.md.sha384=Ce.md.algorithms.sha384=Nc;Ce.sha512.sha256=Ce.sha512.sha256||{create:function(){return Mn.create("SHA-512/256")}};Ce.md["sha512/256"]=Ce.md.algorithms["sha512/256"]=Ce.sha512.sha256;Ce.sha512.sha224=Ce.sha512.sha224||{create:function(){return Mn.create("SHA-512/224")}};Ce.md["sha512/224"]=Ce.md.algorithms["sha512/224"]=Ce.sha512.sha224;Mn.create=function(e){if(kc||ky(),typeof e>"u"&&(e="SHA-512"),!(e in Ar))throw new Error("Invalid SHA-512 algorithm: "+e);for(var t=Ar[e],n=null,r=Ce.util.createBuffer(),a=new Array(80),i=0;i<80;++i)a[i]=new Array(2);var s=64;switch(e){case"SHA-384":s=48;break;case"SHA-512/256":s=32;break;case"SHA-512/224":s=28;break}var o={algorithm:e.replace("-","").toLowerCase(),blockLength:128,digestLength:s,messageLength:0,fullMessageLength:null,messageLengthSize:16};return o.start=function(){o.messageLength=0,o.fullMessageLength=o.messageLength128=[];for(var u=o.messageLengthSize/4,c=0;c>>0,l>>>0];for(var f=o.fullMessageLength.length-1;f>=0;--f)o.fullMessageLength[f]+=l[1],l[1]=l[0]+(o.fullMessageLength[f]/4294967296>>>0),o.fullMessageLength[f]=o.fullMessageLength[f]>>>0,l[0]=l[1]/4294967296>>>0;return r.putBytes(u),Rc(n,a,r),(r.read>2048||r.length()===0)&&r.compact(),o},o.digest=function(){var u=Ce.util.createBuffer();u.putBytes(r.bytes());var c=o.fullMessageLength[o.fullMessageLength.length-1]+o.messageLengthSize,l=c&o.blockLength-1;u.putBytes(Ds.substr(0,o.blockLength-l));for(var f,d,v=o.fullMessageLength[0]*8,p=0;p>>0,v+=d,u.putInt32(v>>>0),v=f>>>0;u.putInt32(v);for(var g=new Array(n.length),p=0;p=128;){for(de=0;de<16;++de)t[de][0]=n.getInt32()>>>0,t[de][1]=n.getInt32()>>>0;for(;de<80;++de)gr=t[de-2],Te=gr[0],K=gr[1],r=((Te>>>19|K<<13)^(K>>>29|Te<<3)^Te>>>6)>>>0,a=((Te<<13|K>>>19)^(K<<3|Te>>>29)^(Te<<26|K>>>6))>>>0,we=t[de-15],Te=we[0],K=we[1],i=((Te>>>1|K<<31)^(Te>>>8|K<<24)^Te>>>7)>>>0,s=((Te<<31|K>>>1)^(Te<<24|K>>>8)^(Te<<25|K>>>7))>>>0,Rr=t[de-7],Ie=t[de-16],K=a+Rr[1]+s+Ie[1],t[de][0]=r+Rr[0]+i+Ie[0]+(K/4294967296>>>0)>>>0,t[de][1]=K>>>0;for(g=e[0][0],x=e[0][1],b=e[1][0],w=e[1][1],A=e[2][0],D=e[2][1],k=e[3][0],L=e[3][1],z=e[4][0],Z=e[4][1],le=e[5][0],fe=e[5][1],he=e[6][0],ve=e[6][1],$e=e[7][0],ht=e[7][1],de=0;de<80;++de)c=((z>>>14|Z<<18)^(z>>>18|Z<<14)^(Z>>>9|z<<23))>>>0,l=((z<<18|Z>>>14)^(z<<14|Z>>>18)^(Z<<23|z>>>9))>>>0,f=(he^z&(le^he))>>>0,d=(ve^Z&(fe^ve))>>>0,o=((g>>>28|x<<4)^(x>>>2|g<<30)^(x>>>7|g<<25))>>>0,u=((g<<4|x>>>28)^(x<<30|g>>>2)^(x<<25|g>>>7))>>>0,v=(g&b|A&(g^b))>>>0,p=(x&w|D&(x^w))>>>0,K=ht+l+d+Ps[de][1]+t[de][1],r=$e+c+f+Ps[de][0]+t[de][0]+(K/4294967296>>>0)>>>0,a=K>>>0,K=u+p,i=o+v+(K/4294967296>>>0)>>>0,s=K>>>0,$e=he,ht=ve,he=le,ve=fe,le=z,fe=Z,K=L+a,z=k+r+(K/4294967296>>>0)>>>0,Z=K>>>0,k=A,L=D,A=b,D=w,b=g,w=x,K=a+s,g=r+i+(K/4294967296>>>0)>>>0,x=K>>>0;K=e[0][1]+x,e[0][0]=e[0][0]+g+(K/4294967296>>>0)>>>0,e[0][1]=K>>>0,K=e[1][1]+w,e[1][0]=e[1][0]+b+(K/4294967296>>>0)>>>0,e[1][1]=K>>>0,K=e[2][1]+D,e[2][0]=e[2][0]+A+(K/4294967296>>>0)>>>0,e[2][1]=K>>>0,K=e[3][1]+L,e[3][0]=e[3][0]+k+(K/4294967296>>>0)>>>0,e[3][1]=K>>>0,K=e[4][1]+Z,e[4][0]=e[4][0]+z+(K/4294967296>>>0)>>>0,e[4][1]=K>>>0,K=e[5][1]+fe,e[5][0]=e[5][0]+le+(K/4294967296>>>0)>>>0,e[5][1]=K>>>0,K=e[6][1]+ve,e[6][0]=e[6][0]+he+(K/4294967296>>>0)>>>0,e[6][1]=K>>>0,K=e[7][1]+ht,e[7][0]=e[7][0]+$e+(K/4294967296>>>0)>>>0,e[7][1]=K>>>0,Re-=128}}});var Dc=j(Os=>{var Ly=X();It();var De=Ly.asn1;Os.privateKeyValidator={name:"PrivateKeyInfo",tagClass:De.Class.UNIVERSAL,type:De.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:De.Class.UNIVERSAL,type:De.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:De.Class.UNIVERSAL,type:De.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:De.Class.UNIVERSAL,type:De.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:De.Class.UNIVERSAL,type:De.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]};Os.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:De.Class.UNIVERSAL,type:De.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:De.Class.UNIVERSAL,type:De.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:De.Class.UNIVERSAL,type:De.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{tagClass:De.Class.UNIVERSAL,type:De.Type.BITSTRING,constructed:!1,composed:!0,captureBitStringValue:"ed25519PublicKey"}]}});var jc=j((fC,zc)=>{var Ve=X();Un();vt();Us();se();var Mc=Dc(),Dy=Mc.publicKeyValidator,Py=Mc.privateKeyValidator;typeof Pc>"u"&&(Pc=Ve.jsbn.BigInteger);var Pc,Ms=Ve.util.ByteBuffer,lt=typeof Buffer>"u"?Uint8Array:Buffer;Ve.pki=Ve.pki||{};zc.exports=Ve.pki.ed25519=Ve.ed25519=Ve.ed25519||{};var re=Ve.ed25519;re.constants={};re.constants.PUBLIC_KEY_BYTE_LENGTH=32;re.constants.PRIVATE_KEY_BYTE_LENGTH=64;re.constants.SEED_BYTE_LENGTH=32;re.constants.SIGN_BYTE_LENGTH=64;re.constants.HASH_BYTE_LENGTH=64;re.generateKeyPair=function(e){e=e||{};var t=e.seed;if(t===void 0)t=Ve.random.getBytesSync(re.constants.SEED_BYTE_LENGTH);else if(typeof t=="string"){if(t.length!==re.constants.SEED_BYTE_LENGTH)throw new TypeError('"seed" must be '+re.constants.SEED_BYTE_LENGTH+" bytes in length.")}else if(!(t instanceof Uint8Array))throw new TypeError('"seed" must be a node.js Buffer, Uint8Array, or a binary string.');t=Zt({message:t,encoding:"binary"});for(var n=new lt(re.constants.PUBLIC_KEY_BYTE_LENGTH),r=new lt(re.constants.PRIVATE_KEY_BYTE_LENGTH),a=0;a<32;++a)r[a]=t[a];return Fy(n,r),{publicKey:n,privateKey:r}};re.privateKeyFromAsn1=function(e){var t={},n=[],r=Ve.asn1.validate(e,Py,t,n);if(!r){var a=new Error("Invalid Key.");throw a.errors=n,a}var i=Ve.asn1.derToOid(t.privateKeyOid),s=Ve.oids.EdDSA25519;if(i!==s)throw new Error('Invalid OID "'+i+'"; OID must be "'+s+'".');var o=t.privateKey,u=Zt({message:Ve.asn1.fromDer(o).value,encoding:"binary"});return{privateKeyBytes:u}};re.publicKeyFromAsn1=function(e){var t={},n=[],r=Ve.asn1.validate(e,Dy,t,n);if(!r){var a=new Error("Invalid Key.");throw a.errors=n,a}var i=Ve.asn1.derToOid(t.publicKeyOid),s=Ve.oids.EdDSA25519;if(i!==s)throw new Error('Invalid OID "'+i+'"; OID must be "'+s+'".');var o=t.ed25519PublicKey;if(o.length!==re.constants.PUBLIC_KEY_BYTE_LENGTH)throw new Error("Key length is invalid.");return Zt({message:o,encoding:"binary"})};re.publicKeyFromPrivateKey=function(e){e=e||{};var t=Zt({message:e.privateKey,encoding:"binary"});if(t.length!==re.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+re.constants.PRIVATE_KEY_BYTE_LENGTH);for(var n=new lt(re.constants.PUBLIC_KEY_BYTE_LENGTH),r=0;r=0};function Zt(e){var t=e.message;if(t instanceof Uint8Array||t instanceof lt)return t;var n=e.encoding;if(t===void 0)if(e.md)t=e.md.digest().getBytes(),n="binary";else throw new TypeError('"options.message" or "options.md" not specified.');if(typeof t=="string"&&!n)throw new TypeError('"options.encoding" must be "binary" or "utf8".');if(typeof t=="string"){if(typeof Buffer<"u")return Buffer.from(t,n);t=new Ms(t,n)}else if(!(t instanceof Ms))throw new TypeError('"options.message" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a string with "options.encoding" specifying its encoding.');for(var r=new lt(t.length()),a=0;a=32;--r){for(n=0,a=r-32,i=r-12;a>8,t[a]-=n*256;t[a]+=n,t[r]=0}for(n=0,a=0;a<32;++a)t[a]+=n-(t[31]>>4)*Vs[a],n=t[a]>>8,t[a]&=255;for(a=0;a<32;++a)t[a]-=n*Vs[a];for(r=0;r<32;++r)t[r+1]+=t[r]>>8,e[r]=t[r]&255}function qs(e){for(var t=new Float64Array(64),n=0;n<64;++n)t[n]=e[n],e[n]=0;Kc(e,t)}function Hs(e,t){var n=G(),r=G(),a=G(),i=G(),s=G(),o=G(),u=G(),c=G(),l=G();rn(n,e[1],e[0]),rn(l,t[1],t[0]),pe(n,n,l),tn(r,e[0],e[1]),tn(l,t[0],t[1]),pe(r,r,l),pe(a,e[3],t[3]),pe(a,a,Oy),pe(i,e[2],t[2]),tn(i,i,i),rn(s,r,n),rn(o,i,a),tn(u,i,a),tn(c,r,n),pe(e[0],s,o),pe(e[1],c,u),pe(e[2],u,o),pe(e[3],s,c)}function Vc(e,t,n){for(var r=0;r<4;++r)Wc(e[r],t[r],n)}function Gs(e,t){var n=G(),r=G(),a=G();zy(a,t[2]),pe(n,t[0],a),pe(r,t[1],a),Ka(e,r),e[31]^=Hc(n)<<7}function Ka(e,t){var n,r,a,i=G(),s=G();for(n=0;n<16;++n)s[n]=t[n];for(Fs(s),Fs(s),Fs(s),r=0;r<2;++r){for(i[0]=s[0]-65517,n=1;n<15;++n)i[n]=s[n]-65535-(i[n-1]>>16&1),i[n-1]&=65535;i[15]=s[15]-32767-(i[14]>>16&1),a=i[15]>>16&1,i[14]&=65535,Wc(s,i,1-a)}for(n=0;n<16;n++)e[2*n]=s[n]&255,e[2*n+1]=s[n]>>8}function qy(e,t){var n=G(),r=G(),a=G(),i=G(),s=G(),o=G(),u=G();return vr(e[2],Ma),Hy(e[1],t),Br(a,e[1]),pe(i,a,Uy),rn(a,a,e[2]),tn(i,e[2],i),Br(s,i),Br(o,s),pe(u,o,s),pe(n,u,a),pe(n,n,i),Gy(n,n),pe(n,n,a),pe(n,n,i),pe(n,n,i),pe(e[0],n,i),Br(r,e[0]),pe(r,r,i),Fc(r,a)&&pe(e[0],e[0],Vy),Br(r,e[0]),pe(r,r,i),Fc(r,a)?-1:(Hc(e[0])===t[31]>>7&&rn(e[0],Ks,e[0]),pe(e[3],e[0],e[1]),0)}function Hy(e,t){var n;for(n=0;n<16;++n)e[n]=t[2*n]+(t[2*n+1]<<8);e[15]&=32767}function Gy(e,t){var n=G(),r;for(r=0;r<16;++r)n[r]=t[r];for(r=250;r>=0;--r)Br(n,n),r!==1&&pe(n,n,t);for(r=0;r<16;++r)e[r]=n[r]}function Fc(e,t){var n=new lt(32),r=new lt(32);return Ka(n,e),Ka(r,t),qc(n,0,r,0)}function qc(e,t,n,r){return Wy(e,t,n,r,32)}function Wy(e,t,n,r,a){var i,s=0;for(i=0;i>>8)-1}function Hc(e){var t=new lt(32);return Ka(t,e),t[0]&1}function Gc(e,t,n){var r,a;for(vr(e[0],Ks),vr(e[1],Ma),vr(e[2],Ma),vr(e[3],Ks),a=255;a>=0;--a)r=n[a/8|0]>>(a&7)&1,Vc(e,t,r),Hs(t,e),Hs(e,e),Vc(e,t,r)}function Ws(e,t){var n=[G(),G(),G(),G()];vr(n[0],Uc),vr(n[1],Oc),vr(n[2],Ma),pe(n[3],Uc,Oc),Gc(e,n,t)}function vr(e,t){var n;for(n=0;n<16;n++)e[n]=t[n]|0}function zy(e,t){var n=G(),r;for(r=0;r<16;++r)n[r]=t[r];for(r=253;r>=0;--r)Br(n,n),r!==2&&r!==4&&pe(n,n,t);for(r=0;r<16;++r)e[r]=n[r]}function Fs(e){var t,n,r=1;for(t=0;t<16;++t)n=e[t]+r+65535,r=Math.floor(n/65536),e[t]=n-r*65536;e[0]+=r-1+37*(r-1)}function Wc(e,t,n){for(var r,a=~(n-1),i=0;i<16;++i)r=a&(e[i]^t[i]),e[i]^=r,t[i]^=r}function G(e){var t,n=new Float64Array(16);if(e)for(t=0;t{var pt=X();se();vt();Un();Xc.exports=pt.kem=pt.kem||{};var Yc=pt.jsbn.BigInteger;pt.kem.rsa={};pt.kem.rsa.create=function(e,t){t=t||{};var n=t.prng||pt.random,r={};return r.encrypt=function(a,i){var s=Math.ceil(a.n.bitLength()/8),o;do o=new Yc(pt.util.bytesToHex(n.getBytesSync(s)),16).mod(a.n);while(o.compareTo(Yc.ONE)<=0);o=pt.util.hexToBytes(o.toString(16));var u=s-o.length;u>0&&(o=pt.util.fillString(String.fromCharCode(0),u)+o);var c=a.encrypt(o,"NONE"),l=e.generate(o,i);return{encapsulation:c,key:l}},r.decrypt=function(a,i,s){var o=a.decrypt(i,"NONE");return e.generate(o,s)},r};pt.kem.kdf1=function(e,t){Qc(this,e,0,t||e.digestLength)};pt.kem.kdf2=function(e,t){Qc(this,e,1,t||e.digestLength)};function Qc(e,t,n,r){e.generate=function(a,i){for(var s=new pt.util.ByteBuffer,o=Math.ceil(i/r)+n,u=new pt.util.ByteBuffer,c=n;c{var ne=X();se();el.exports=ne.log=ne.log||{};ne.log.levels=["none","error","warning","info","debug","verbose","max"];var qa={},Ys=[],Hn=null;ne.log.LEVEL_LOCKED=1<<1;ne.log.NO_LEVEL_CHECK=1<<2;ne.log.INTERPOLATE=1<<3;for(Mt=0;Mt"u"||t?e.flags|=ne.log.LEVEL_LOCKED:e.flags&=~ne.log.LEVEL_LOCKED};ne.log.addLogger=function(e){Ys.push(e)};typeof console<"u"&&"log"in console?(console.error&&console.warn&&console.info&&console.debug?(Jc={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},Gn=function(e,t){ne.log.prepareStandard(t);var n=Jc[t.level],r=[t.standard];r=r.concat(t.arguments.slice()),n.apply(console,r)},nn=ne.log.makeLogger(Gn)):(Gn=function(t,n){ne.log.prepareStandardFull(n),console.log(n.standardFull)},nn=ne.log.makeLogger(Gn)),ne.log.setLevel(nn,"debug"),ne.log.addLogger(nn),Hn=nn):console={log:function(){}};var nn,Jc,Gn;Hn!==null&&typeof window<"u"&&window.location&&(qn=new URL(window.location.href).searchParams,qn.has("console.level")&&ne.log.setLevel(Hn,qn.get("console.level").slice(-1)[0]),qn.has("console.lock")&&($c=qn.get("console.lock").slice(-1)[0],$c=="true"&&ne.log.lock(Hn)));var qn,$c;ne.log.consoleLogger=Hn});var nl=j((hC,rl)=>{rl.exports=kt();Ca();Xr();os();Us()});var sl=j((mC,il)=>{var U=X();cr();It();Dn();lr();Er();Es();vt();se();Pa();var E=U.asn1,ut=il.exports=U.pkcs7=U.pkcs7||{};ut.messageFromPem=function(e){var t=U.pem.decode(e)[0];if(t.type!=="PKCS7"){var n=new Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');throw n.headerType=t.type,n}if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");var r=E.fromDer(t.body);return ut.messageFromAsn1(r)};ut.messageToPem=function(e,t){var n={type:"PKCS7",body:E.toDer(e.toAsn1()).getBytes()};return U.pem.encode(n,{maxline:t})};ut.messageFromAsn1=function(e){var t={},n=[];if(!E.validate(e,ut.asn1.contentInfoValidator,t,n)){var r=new Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo.");throw r.errors=n,r}var a=E.derToOid(t.contentType),i;switch(a){case U.pki.oids.envelopedData:i=ut.createEnvelopedData();break;case U.pki.oids.encryptedData:i=ut.createEncryptedData();break;case U.pki.oids.signedData:i=ut.createSignedData();break;default:throw new Error("Cannot read PKCS#7 message. ContentType with OID "+a+" is not (yet) supported.")}return i.fromAsn1(t.content.value[0]),i};ut.createSignedData=function(){var e=null;return e={type:U.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:function(r){if(Xs(e,r,ut.asn1.signedDataValidator),e.certificates=[],e.crls=[],e.digestAlgorithmIdentifiers=[],e.contentInfo=null,e.signerInfos=[],e.rawCapture.certificates)for(var a=e.rawCapture.certificates.value,i=0;i0&&s.value[0].value.push(E.create(E.Class.CONTEXT_SPECIFIC,0,!0,r)),i.length>0&&s.value[0].value.push(E.create(E.Class.CONTEXT_SPECIFIC,1,!0,i)),s.value[0].value.push(E.create(E.Class.UNIVERSAL,E.Type.SET,!0,e.signerInfos)),E.create(E.Class.UNIVERSAL,E.Type.SEQUENCE,!0,[E.create(E.Class.UNIVERSAL,E.Type.OID,!1,E.oidToDer(e.type).getBytes()),s])},addSigner:function(r){var a=r.issuer,i=r.serialNumber;if(r.certificate){var s=r.certificate;typeof s=="string"&&(s=U.pki.certificateFromPem(s)),a=s.issuer.attributes,i=s.serialNumber}var o=r.key;if(!o)throw new Error("Could not add PKCS#7 signer; no private key specified.");typeof o=="string"&&(o=U.pki.privateKeyFromPem(o));var u=r.digestAlgorithm||U.pki.oids.sha1;switch(u){case U.pki.oids.sha1:case U.pki.oids.sha256:case U.pki.oids.sha384:case U.pki.oids.sha512:case U.pki.oids.md5:break;default:throw new Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+u)}var c=r.authenticatedAttributes||[];if(c.length>0){for(var l=!1,f=!1,d=0;d0){for(var n=E.create(E.Class.CONTEXT_SPECIFIC,1,!0,[]),r=0;r=n&&a{var _e=X();cr();zr();Ca();Xr();se();var Ga=ol.exports=_e.ssh=_e.ssh||{};Ga.privateKeyToPutty=function(e,t,n){n=n||"",t=t||"";var r="ssh-rsa",a=t===""?"none":"aes256-cbc",i="PuTTY-User-Key-File-2: "+r+`\r `;i+="Encryption: "+a+`\r `,i+="Comment: "+n+`\r `;var s=_e.util.createBuffer();an(s,r),Kt(s,e.e),Kt(s,e.n);var o=_e.util.encode64(s.bytes(),64),u=Math.floor(o.length/66)+1;i+="Public-Lines: "+u+`\r `,i+=o;var c=_e.util.createBuffer();Kt(c,e.d),Kt(c,e.p),Kt(c,e.q),Kt(c,e.qInv);var l;if(!t)l=_e.util.encode64(c.bytes(),64);else{var f=c.length()+16-1;f-=f%16;var d=Ha(c.bytes());d.truncate(d.length()-f+c.length()),c.putBuffer(d);var v=_e.util.createBuffer();v.putBuffer(Ha("\0\0\0\0",t)),v.putBuffer(Ha("\0\0\0",t));var p=_e.aes.createEncryptionCipher(v.truncate(8),"CBC");p.start(_e.util.createBuffer().fillWithByte(0,16)),p.update(c.copy()),p.finish();var g=p.output;g.truncate(16),l=_e.util.encode64(g.bytes(),64)}u=Math.floor(l.length/66)+1,i+=`\r Private-Lines: `+u+`\r `,i+=l;var x=Ha("putty-private-key-file-mac-key",t),b=_e.util.createBuffer();an(b,r),an(b,a),an(b,n),b.putInt32(s.length()),b.putBuffer(s),b.putInt32(c.length()),b.putBuffer(c);var w=_e.hmac.create();return w.start("sha1",x),w.update(b.bytes()),i+=`\r Private-MAC: `+w.digest().toHex()+`\r `,i};Ga.publicKeyToOpenSSH=function(e,t){var n="ssh-rsa";t=t||"";var r=_e.util.createBuffer();return an(r,n),Kt(r,e.e),Kt(r,e.n),n+" "+_e.util.encode64(r.bytes())+" "+t};Ga.privateKeyToOpenSSH=function(e,t){return t?_e.pki.encryptRsaPrivateKey(e,t,{legacy:!0,algorithm:"aes128"}):_e.pki.privateKeyToPem(e)};Ga.getPublicKeyFingerprint=function(e,t){t=t||{};var n=t.md||_e.md.md5.create(),r="ssh-rsa",a=_e.util.createBuffer();an(a,r),Kt(a,e.e),Kt(a,e.n),n.start(),n.update(a.getBytes());var i=n.digest();if(t.encoding==="hex"){var s=i.toHex();return t.delimiter?s.match(/.{2}/g).join(t.delimiter):s}else{if(t.encoding==="binary")return i.getBytes();if(t.encoding)throw new Error('Unknown encoding "'+t.encoding+'".')}return i};function Kt(e,t){var n=t.toString(16);n[0]>="8"&&(n="00"+n);var r=_e.util.hexToBytes(n);e.putInt32(r.length),e.putBytes(r)}function an(e,t){e.putInt32(t.length),e.putString(t)}function Ha(){for(var e=_e.md.sha1.create(),t=arguments.length,n=0;n{cl.exports=X();cr();_c();It();pa();Dn();jc();zr();Zc();tl();nl();bs();wa();Er();ys();ws();sl();As();gs();us();ka();vt();fs();ul();Ls();se()});var Bt,sn,fl=F(()=>{Bt=_l(ll());xn();sn=class{static async encrypt(t){let n=Gt()?.pk;if(n)try{let r=Bt.default.pki.publicKeyFromPem(n),a=Bt.default.random.getBytesSync(32),i=Bt.default.cipher.createCipher("AES-GCM",a),s=Bt.default.random.getBytesSync(12);i.start({iv:s}),i.update(Bt.default.util.createBuffer(JSON.stringify(t),"utf8")),i.finish();let o=i.output.bytes(),u=i.mode.tag.bytes(),c=r.encrypt(a,"RSA-OAEP",{md:Bt.default.md.sha256.create()});return{k:Bt.default.util.encode64(c),i:Bt.default.util.encode64(s),c:Bt.default.util.encode64(o),t:Bt.default.util.encode64(u)}}catch(r){throw console.error("Encryption failed:",r),new Error("Failed to encrypt data.")}else return JSON.stringify(t)}static secureEnv(){return Boolean(window.crypto?.subtle)}}});var Jt,dl=F(()=>{o0();xn();Cn();Bi();H0();Y0();ji();fl();Or.defaults.withCredentials=!0;Jt=class{static async formatRequest(t,n){try{if(sn.secureEnv()){t=`s_${t}`;let r=await sn.encrypt(n);return JSON.stringify({type:t,data:r})}}catch{}return JSON.stringify({type:t,data:n})}static async post(t,n,r,a){try{let i=Gt()?.api?.baseUrl;if(!i)throw console.error("Internal honeypot error: missing base url"),new Error("Missing base URL");let s=`${i}${t}`,o={identity:En.getIdentity(),identities:En.getIdentities()};try{o={...o,...await ir.get()}}catch{}let u=!navigator.geolocation.getCurrentPosition.toString().includes("[native code]")||window?.geoLocationStorage!==void 0,c=a||[];u&&c.push("blsf");let l={};try{l=await j0.detect()}catch{}let f={...r,...o,library_version:fa,ctags:c,cbt:l},d=await Jt.formatRequest(n,f);return(await Or.post(s,d,{headers:{"Content-Type":"application/json;charset=UTF-8"}})).data}catch(i){throw Nt.addError("Failed to communicate with the backend server"),Jt.postError(i),i}}static async postError(t){try{let r=Gt()?.api?.routes?.errors;if(!r)return;let a=await Jt.formatRequest("error",{message:t}),i=await Or.post(r,a,{headers:{"Content-Type":"application/json;charset=UTF-8"}})}catch{console.error("error HP10002")}}}});var Wa,Zs=F(()=>{Wa=(e,t,n,r)=>{let a=0,i=s=>{try{let o=new URLSearchParams(window.location.search).has("hpdebug");(r?.debug===!0||o)&&console.log(`[hp] ${s}`)}catch{}};return{name:"honeypot-enrichment",type:"before",setup:async s=>{try{s.userId&&(r?.trackIdentities?(i(`setting user_id: ${s.userId}`),await n(s.userId)):i(`ignoring user_id since trackIdentities is set to false: ${s.userId}`))}catch{}let o=await t();i(`initialized plugin. honey=${JSON.stringify(o)}`)},execute:async s=>{try{let{user_id:o,event_type:u}=s;try{o&&(r?.trackIdentities?(i(`processing identify event: ${o}`),await n(o)):i(`ignoring identify event since trackIdentities is set to false: ${o}`))}catch{}let l=u.startsWith("[Amplitude] ")?u.replace("[Amplitude] ",""):u;a=a+1;let f=!1;if(r?.excludeEvents?.includes(l)||r?.includeEvents?.length&&!r?.includeEvents.includes(l)){if(r?.enrichEventProperties){let p={ignored:!0};s.event_properties={...s.event_properties,honey:p}}return i(`ignoring event: ${u}`),s}f||(i(`tracking event: ${u}`),await e(u,s.event_properties));let v=await t();return v?.geofenced&&v?.redirect_auto?(i(`dropping event: ${u}`),null):(r?.enrichEventProperties&&(s.event_properties={...s.event_properties,honey:v},i(`enriching event: ${u}. ${JSON.stringify(s.event_properties)}`)),s)}catch{return s}}}}});var Js,ev,pl=F(()=>{Zs();Js=class{constructor(){this.config=null;this.honey=null;this.id=[];this.q=[];this.didInit=!1;this.didLoad=!1;this.callbacks={};this.geofenced=!1}setup(t){this.config=t}amplitudePlugin(t){return Wa(this.track.bind(this),this.get.bind(this),this.identify.bind(this),t)}geofence(){window.honeypot?.geofence&&window.honeypot.geofence(),this.geofenced=!0}ensureHoneypot(){window.honeypot||(window.honeypot={q:[],id:[]})}async identify(t,n,r){if(this.ensureHoneypot(),window.honeypot?.identify)window.honeypot.identify(t,n,r);else{let a={id:t,...n?{properties:n}:{},...r?{type:r}:{}};Array.isArray(window.honeypot.id)||(window.honeypot.id=[]),window.honeypot.id.push(a)}}on(t,n){this.ensureHoneypot(),window.honeypot.on?window.honeypot.on(t,n):(window.honeypot.callbacks[t]??=[]).push(n)}async flow(t,n){return this.ensureHoneypot(),new Promise((r,a)=>{let i=Date.now(),s=()=>{window&&window.honeypot&&this.didInit?r(window.honeypot.flow(t,n)):Date.now()-i>=5e3?a(new Error("Flow could not be created. Did you call the load() method first?")):setTimeout(s,100)};s()})}async track(t,n={}){this.ensureHoneypot();try{if(window.honeypot?.track)window.honeypot.track(t,n);else{let r=this.q||[];r.push([t,n]),this.q=r}}catch(r){this.config?.debug&&console.error("Error tracking event:",r)}}async init(){}maybeTime(t,n){if(this.config?.debug){if(n){console.timeEnd(t);return}console.time(t)}}load(t,n,r){return this.didLoad=!0,new Promise(a=>{let i=document.createElement("script");i.async=!0;let s=new URL(t),o=null,u=null;try{o=window.location.href}catch{}try{u=document.title}catch{}s.searchParams.append("url",o||"URL not available"),s.searchParams.append("title",u||"Title not available");try{if(window.honeypot&&Array.isArray(window.honeypot.q)){let f=window.honeypot.q.map(d=>d[0]);s.searchParams.append("events",JSON.stringify(f))}}catch(f){this.config?.debug&&console.error("Error appending event names to the script URL:",f)}try{let f=["hpdebug","hpgeotest"],d=new URLSearchParams(window.location.search);f.forEach(v=>{d.has(v)&&s.searchParams.append(v,d.get(v)||"")})}catch{}n&&(s.searchParams.append("identity",n),r&&s.searchParams.append("type",r));let c=new URLSearchParams(window.location.search).get("georef");c&&s.searchParams.append("georef",c),this.maybeTime("load honeypot");try{let f=window?.honeypot?.id;if(f){let d=null;Array.isArray(f)&&f.length>0?d=f[0]?.id:d=f?.id,d&&s.searchParams.append("identity",d)}}catch{}i.src=s.toString(),document.head.appendChild(i);let l=this.config;i.onload=()=>{this.didInit=!0,this.maybeTime("load honeypot",!0);try{window.honeypot&&(window.honeypot.config=l)}catch{}a(window.honeypot)}})}async get(){if(!this.didLoad&&this.config?.url)try{if(await this.load(this.config.url),window.honeypot)return window.honeypot.get()}catch{throw new Error("Failed to load")}else if(this.didLoad&&!this.didInit)return new Promise((t,n)=>{let r=Date.now(),a=()=>{window.honeypot&&window.honeypot.get?t(window.honeypot.get()):Date.now()-r>=2e3?n(new Error("Timeout: Honeypot SDK did not initialize in time.")):setTimeout(a,50)};a()});return new Promise((t,n)=>{(()=>{if(window.honeypot&&window.honeypot.honey)t(window.honeypot.honey);else{if(window.honeypot?.get)return window.honeypot.get();n(new Error("Honey not found"))}})()})}},ev=new Js});var Wn,hl=F(()=>{Zs();Wn=class{amplitudePlugin(t){return Wa(this.track.bind(this),this.get.bind(this),this.identify.bind(this),t)}}});var ml=F(()=>{pl();hl()});var _t,yl=F(()=>{_t=class{static sleep(t){return new Promise(n=>setTimeout(n,t))}static isConstantLike(t){return typeof t=="string"&&!t.match(/[^A-Z0-9_x]/)}static getConstantsFromPrototype(t){return Object.keys(t.__proto__).filter(_t.isConstantLike)}static recur(t,n=new WeakSet,r=!1){if(n.has(t))return{};try{n.add(t)}catch{}var a=r?[]:{};for(var i in t)try{let s;if(i==="enabledPlugin"||typeof t[i]=="function")continue;Array.isArray(t[i])?typeof t[i][0]=="object"?(s=_t.recur(t[i],n,!0),a[i]=s.length?s:t[i]):a[i]=t[i]:typeof t[i]=="object"?(s=_t.recur(t[i],n),Object.keys(s).length&&(a[i]=s)):r?a.push(t[i]):a[i]=t[i]}catch{}return a}static isValidUrlOrPath(t){try{if(!t)return!1;if(t.startsWith("/"))return!0;if(t.startsWith("http://")||t.startsWith("https://"))return new URL(t),!0}catch{return!1}return!1}static onRedirectPage(t){if(!_t.isValidUrlOrPath(t))return!1;var n=t===window.location.pathname;if(!n)try{n=new URL(t,window.location.origin).href===window.location.href}catch{}return n}}});var vl,gl=F(()=>{vl=` /* Base styles */ .nicebox { color: black; width: 100%; font-family: 'Raleway', 'Helvetica Neue', Arial, sans-serif; font-size: 1.2em; height: 100%; line-height: 2em; top: 0; left: 0; position: fixed; display: flex; align-items: center; justify-content: center; pointer-events: none; z-index: 1000; } .nicebox a, .nicebox button { color: #74716D; text-decoration: none; outline: none; } .nicebox a:hover, .nicebox a:focus { color: #c94e50; outline: none; } .nicebox__title { font-size: 1.5em; line-height: 2.5em; } .nicebox button { cursor: pointer; font-size: 1.2em; padding: 0.6em 1.2em; outline: none; border: none; color: #fff; background: #c94e50; position:relative; } .nicebox__overlay { position: absolute; z-index: 1; background: rgba(55, 58, 71, 0.9); width: 100%; height: 100%; top: 0; left: 0; opacity: 0; transition: opacity 0.3s ease-in-out; } .nicebox--open .nicebox__overlay { opacity: 1; pointer-events: auto; } .nicebox__content { width: 50%; max-width: 560px; min-width: 290px; background: #fff; padding: 2em 3em; text-align: center; position: relative; z-index: 5; opacity: 0; transform: scale(0.9); transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out; } .nicebox--open .nicebox__content { opacity: 1; transform: scale(1); pointer-events: auto; } .nicebox__buttons { cursor: pointer; display: flex; gap: 10px; margin-top: 20px; justify-content: center; } /* fancy animation */ .nicebox.fancy.nicebox--open .nicebox__content, .nicebox.fancy.nicebox--close .nicebox__content { -webkit-animation-duration: 1s; animation-duration: 1s; -webkit-animation-timing-function: linear; animation-timing-function: linear; -webkit-animation-fill-mode: forwards; animation-fill-mode: forwards; } .nicebox.fancy.nicebox--open .nicebox__content { -webkit-animation-name: fancy-anim-open; animation-name: fancy-anim-open; } .nicebox.fancy.nicebox--close .nicebox__content { -webkit-animation-name: fancy-anim-close; animation-name: fancy-anim-close; -webkit-animation-duration: 0.3s; animation-duration: 0.3s; -webkit-animation-timing-function: ease-out; animation-timing-function: ease-out; } @-webkit-keyframes fancy-anim-open { 0% { opacity: 0; -webkit-transform: matrix3d(0.7, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.7, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 2.083333% { -webkit-transform: matrix3d(0.75266, 0, 0, 0, 0, 0.76342, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.75266, 0, 0, 0, 0, 0.76342, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 4.166667% { -webkit-transform: matrix3d(0.81071, 0, 0, 0, 0, 0.84545, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.81071, 0, 0, 0, 0, 0.84545, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 6.25% { -webkit-transform: matrix3d(0.86808, 0, 0, 0, 0, 0.9286, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.86808, 0, 0, 0, 0, 0.9286, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 8.333333% { -webkit-transform: matrix3d(0.92038, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.92038, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 10.416667% { -webkit-transform: matrix3d(0.96482, 0, 0, 0, 0, 1.05202, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.96482, 0, 0, 0, 0, 1.05202, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 12.5% { -webkit-transform: matrix3d(1, 0, 0, 0, 0, 1.08204, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1, 0, 0, 0, 0, 1.08204, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 14.583333% { -webkit-transform: matrix3d(1.02563, 0, 0, 0, 0, 1.09149, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.02563, 0, 0, 0, 0, 1.09149, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 16.666667% { -webkit-transform: matrix3d(1.04227, 0, 0, 0, 0, 1.08453, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.04227, 0, 0, 0, 0, 1.08453, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 18.75% { -webkit-transform: matrix3d(1.05102, 0, 0, 0, 0, 1.06666, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.05102, 0, 0, 0, 0, 1.06666, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 20.833333% { -webkit-transform: matrix3d(1.05334, 0, 0, 0, 0, 1.04355, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.05334, 0, 0, 0, 0, 1.04355, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 22.916667% { -webkit-transform: matrix3d(1.05078, 0, 0, 0, 0, 1.02012, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.05078, 0, 0, 0, 0, 1.02012, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 25% { -webkit-transform: matrix3d(1.04487, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.04487, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 27.083333% { -webkit-transform: matrix3d(1.03699, 0, 0, 0, 0, 0.98534, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.03699, 0, 0, 0, 0, 0.98534, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 29.166667% { -webkit-transform: matrix3d(1.02831, 0, 0, 0, 0, 0.97688, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.02831, 0, 0, 0, 0, 0.97688, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 31.25% { -webkit-transform: matrix3d(1.01973, 0, 0, 0, 0, 0.97422, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.01973, 0, 0, 0, 0, 0.97422, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 33.333333% { -webkit-transform: matrix3d(1.01191, 0, 0, 0, 0, 0.97618, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.01191, 0, 0, 0, 0, 0.97618, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 35.416667% { -webkit-transform: matrix3d(1.00526, 0, 0, 0, 0, 0.98122, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00526, 0, 0, 0, 0, 0.98122, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 37.5% { -webkit-transform: matrix3d(1, 0, 0, 0, 0, 0.98773, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1, 0, 0, 0, 0, 0.98773, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 39.583333% { -webkit-transform: matrix3d(0.99617, 0, 0, 0, 0, 0.99433, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99617, 0, 0, 0, 0, 0.99433, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 41.666667% { -webkit-transform: matrix3d(0.99368, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99368, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 43.75% { -webkit-transform: matrix3d(0.99237, 0, 0, 0, 0, 1.00413, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99237, 0, 0, 0, 0, 1.00413, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 45.833333% { -webkit-transform: matrix3d(0.99202, 0, 0, 0, 0, 1.00651, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99202, 0, 0, 0, 0, 1.00651, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 47.916667% { -webkit-transform: matrix3d(0.99241, 0, 0, 0, 0, 1.00726, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99241, 0, 0, 0, 0, 1.00726, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 50% { opacity: 1; -webkit-transform: matrix3d(0.99329, 0, 0, 0, 0, 1.00671, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99329, 0, 0, 0, 0, 1.00671, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 52.083333% { -webkit-transform: matrix3d(0.99447, 0, 0, 0, 0, 1.00529, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99447, 0, 0, 0, 0, 1.00529, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 54.166667% { -webkit-transform: matrix3d(0.99577, 0, 0, 0, 0, 1.00346, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99577, 0, 0, 0, 0, 1.00346, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 56.25% { -webkit-transform: matrix3d(0.99705, 0, 0, 0, 0, 1.0016, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99705, 0, 0, 0, 0, 1.0016, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 58.333333% { -webkit-transform: matrix3d(0.99822, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99822, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 60.416667% { -webkit-transform: matrix3d(0.99921, 0, 0, 0, 0, 0.99884, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99921, 0, 0, 0, 0, 0.99884, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 62.5% { -webkit-transform: matrix3d(1, 0, 0, 0, 0, 0.99816, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1, 0, 0, 0, 0, 0.99816, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 64.583333% { -webkit-transform: matrix3d(1.00057, 0, 0, 0, 0, 0.99795, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00057, 0, 0, 0, 0, 0.99795, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 66.666667% { -webkit-transform: matrix3d(1.00095, 0, 0, 0, 0, 0.99811, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00095, 0, 0, 0, 0, 0.99811, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 68.75% { -webkit-transform: matrix3d(1.00114, 0, 0, 0, 0, 0.99851, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00114, 0, 0, 0, 0, 0.99851, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 70.833333% { -webkit-transform: matrix3d(1.00119, 0, 0, 0, 0, 0.99903, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00119, 0, 0, 0, 0, 0.99903, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 72.916667% { -webkit-transform: matrix3d(1.00114, 0, 0, 0, 0, 0.99955, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00114, 0, 0, 0, 0, 0.99955, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 75% { -webkit-transform: matrix3d(1.001, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.001, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 77.083333% { -webkit-transform: matrix3d(1.00083, 0, 0, 0, 0, 1.00033, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00083, 0, 0, 0, 0, 1.00033, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 79.166667% { -webkit-transform: matrix3d(1.00063, 0, 0, 0, 0, 1.00052, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00063, 0, 0, 0, 0, 1.00052, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 81.25% { -webkit-transform: matrix3d(1.00044, 0, 0, 0, 0, 1.00058, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00044, 0, 0, 0, 0, 1.00058, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 83.333333% { -webkit-transform: matrix3d(1.00027, 0, 0, 0, 0, 1.00053, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00027, 0, 0, 0, 0, 1.00053, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 85.416667% { -webkit-transform: matrix3d(1.00012, 0, 0, 0, 0, 1.00042, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00012, 0, 0, 0, 0, 1.00042, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 87.5% { -webkit-transform: matrix3d(1, 0, 0, 0, 0, 1.00027, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1, 0, 0, 0, 0, 1.00027, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 89.583333% { -webkit-transform: matrix3d(0.99991, 0, 0, 0, 0, 1.00013, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99991, 0, 0, 0, 0, 1.00013, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 91.666667% { -webkit-transform: matrix3d(0.99986, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99986, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 93.75% { -webkit-transform: matrix3d(0.99983, 0, 0, 0, 0, 0.99991, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99983, 0, 0, 0, 0, 0.99991, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 95.833333% { -webkit-transform: matrix3d(0.99982, 0, 0, 0, 0, 0.99985, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99982, 0, 0, 0, 0, 0.99985, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 97.916667% { -webkit-transform: matrix3d(0.99983, 0, 0, 0, 0, 0.99984, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99983, 0, 0, 0, 0, 0.99984, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 100% { opacity: 1; -webkit-transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } } @keyframes fancy-anim-open { 0% { opacity: 0; -webkit-transform: matrix3d(0.7, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.7, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 2.083333% { -webkit-transform: matrix3d(0.75266, 0, 0, 0, 0, 0.76342, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.75266, 0, 0, 0, 0, 0.76342, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 4.166667% { -webkit-transform: matrix3d(0.81071, 0, 0, 0, 0, 0.84545, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.81071, 0, 0, 0, 0, 0.84545, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 6.25% { -webkit-transform: matrix3d(0.86808, 0, 0, 0, 0, 0.9286, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.86808, 0, 0, 0, 0, 0.9286, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 8.333333% { -webkit-transform: matrix3d(0.92038, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.92038, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 10.416667% { -webkit-transform: matrix3d(0.96482, 0, 0, 0, 0, 1.05202, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.96482, 0, 0, 0, 0, 1.05202, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 12.5% { -webkit-transform: matrix3d(1, 0, 0, 0, 0, 1.08204, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1, 0, 0, 0, 0, 1.08204, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 14.583333% { -webkit-transform: matrix3d(1.02563, 0, 0, 0, 0, 1.09149, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.02563, 0, 0, 0, 0, 1.09149, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 16.666667% { -webkit-transform: matrix3d(1.04227, 0, 0, 0, 0, 1.08453, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.04227, 0, 0, 0, 0, 1.08453, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 18.75% { -webkit-transform: matrix3d(1.05102, 0, 0, 0, 0, 1.06666, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.05102, 0, 0, 0, 0, 1.06666, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 20.833333% { -webkit-transform: matrix3d(1.05334, 0, 0, 0, 0, 1.04355, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.05334, 0, 0, 0, 0, 1.04355, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 22.916667% { -webkit-transform: matrix3d(1.05078, 0, 0, 0, 0, 1.02012, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.05078, 0, 0, 0, 0, 1.02012, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 25% { -webkit-transform: matrix3d(1.04487, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.04487, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 27.083333% { -webkit-transform: matrix3d(1.03699, 0, 0, 0, 0, 0.98534, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.03699, 0, 0, 0, 0, 0.98534, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 29.166667% { -webkit-transform: matrix3d(1.02831, 0, 0, 0, 0, 0.97688, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.02831, 0, 0, 0, 0, 0.97688, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 31.25% { -webkit-transform: matrix3d(1.01973, 0, 0, 0, 0, 0.97422, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.01973, 0, 0, 0, 0, 0.97422, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 33.333333% { -webkit-transform: matrix3d(1.01191, 0, 0, 0, 0, 0.97618, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.01191, 0, 0, 0, 0, 0.97618, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 35.416667% { -webkit-transform: matrix3d(1.00526, 0, 0, 0, 0, 0.98122, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00526, 0, 0, 0, 0, 0.98122, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 37.5% { -webkit-transform: matrix3d(1, 0, 0, 0, 0, 0.98773, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1, 0, 0, 0, 0, 0.98773, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 39.583333% { -webkit-transform: matrix3d(0.99617, 0, 0, 0, 0, 0.99433, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99617, 0, 0, 0, 0, 0.99433, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 41.666667% { -webkit-transform: matrix3d(0.99368, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99368, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 43.75% { -webkit-transform: matrix3d(0.99237, 0, 0, 0, 0, 1.00413, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99237, 0, 0, 0, 0, 1.00413, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 45.833333% { -webkit-transform: matrix3d(0.99202, 0, 0, 0, 0, 1.00651, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99202, 0, 0, 0, 0, 1.00651, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 47.916667% { -webkit-transform: matrix3d(0.99241, 0, 0, 0, 0, 1.00726, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99241, 0, 0, 0, 0, 1.00726, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 50% { opacity: 1; -webkit-transform: matrix3d(0.99329, 0, 0, 0, 0, 1.00671, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99329, 0, 0, 0, 0, 1.00671, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 52.083333% { -webkit-transform: matrix3d(0.99447, 0, 0, 0, 0, 1.00529, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99447, 0, 0, 0, 0, 1.00529, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 54.166667% { -webkit-transform: matrix3d(0.99577, 0, 0, 0, 0, 1.00346, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99577, 0, 0, 0, 0, 1.00346, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 56.25% { -webkit-transform: matrix3d(0.99705, 0, 0, 0, 0, 1.0016, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99705, 0, 0, 0, 0, 1.0016, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 58.333333% { -webkit-transform: matrix3d(0.99822, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99822, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 60.416667% { -webkit-transform: matrix3d(0.99921, 0, 0, 0, 0, 0.99884, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99921, 0, 0, 0, 0, 0.99884, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 62.5% { -webkit-transform: matrix3d(1, 0, 0, 0, 0, 0.99816, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1, 0, 0, 0, 0, 0.99816, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 64.583333% { -webkit-transform: matrix3d(1.00057, 0, 0, 0, 0, 0.99795, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00057, 0, 0, 0, 0, 0.99795, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 66.666667% { -webkit-transform: matrix3d(1.00095, 0, 0, 0, 0, 0.99811, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00095, 0, 0, 0, 0, 0.99811, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 68.75% { -webkit-transform: matrix3d(1.00114, 0, 0, 0, 0, 0.99851, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00114, 0, 0, 0, 0, 0.99851, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 70.833333% { -webkit-transform: matrix3d(1.00119, 0, 0, 0, 0, 0.99903, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00119, 0, 0, 0, 0, 0.99903, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 72.916667% { -webkit-transform: matrix3d(1.00114, 0, 0, 0, 0, 0.99955, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00114, 0, 0, 0, 0, 0.99955, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 75% { -webkit-transform: matrix3d(1.001, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.001, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 77.083333% { -webkit-transform: matrix3d(1.00083, 0, 0, 0, 0, 1.00033, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00083, 0, 0, 0, 0, 1.00033, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 79.166667% { -webkit-transform: matrix3d(1.00063, 0, 0, 0, 0, 1.00052, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00063, 0, 0, 0, 0, 1.00052, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 81.25% { -webkit-transform: matrix3d(1.00044, 0, 0, 0, 0, 1.00058, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00044, 0, 0, 0, 0, 1.00058, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 83.333333% { -webkit-transform: matrix3d(1.00027, 0, 0, 0, 0, 1.00053, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00027, 0, 0, 0, 0, 1.00053, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 85.416667% { -webkit-transform: matrix3d(1.00012, 0, 0, 0, 0, 1.00042, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00012, 0, 0, 0, 0, 1.00042, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 87.5% { -webkit-transform: matrix3d(1, 0, 0, 0, 0, 1.00027, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1, 0, 0, 0, 0, 1.00027, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 89.583333% { -webkit-transform: matrix3d(0.99991, 0, 0, 0, 0, 1.00013, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99991, 0, 0, 0, 0, 1.00013, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 91.666667% { -webkit-transform: matrix3d(0.99986, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99986, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 93.75% { -webkit-transform: matrix3d(0.99983, 0, 0, 0, 0, 0.99991, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99983, 0, 0, 0, 0, 0.99991, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 95.833333% { -webkit-transform: matrix3d(0.99982, 0, 0, 0, 0, 0.99985, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99982, 0, 0, 0, 0, 0.99985, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 97.916667% { -webkit-transform: matrix3d(0.99983, 0, 0, 0, 0, 0.99984, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99983, 0, 0, 0, 0, 0.99984, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 100% { opacity: 1; -webkit-transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } } @-webkit-keyframes fancy-anim-close { 0% { opacity: 1; } 100% { opacity: 0; -webkit-transform: scale3d(0.8, 0.8, 1); } } @keyframes fancy-anim-close { 0% { opacity: 1; } 100% { opacity: 0; -webkit-transform: scale3d(0.8, 0.8, 1); transform: scale3d(0.8, 0.8, 1); } } /* simple animation */ .nicebox.simple.nicebox--open .nicebox__content, .nicebox.simple.nicebox--close .nicebox__content { animation-duration: 0.4s; animation-fill-mode: forwards; } .nicebox.simple.nicebox--open .nicebox__content { animation-name: simple-anim-open; animation-timing-function: cubic-bezier(0.6, 0, 0.4, 1); } .nicebox.simple.nicebox--close .nicebox__content { animation-name: simple-anim-close; } @keyframes simple-anim-open { 0% { opacity: 0; transform: scale3d(0, 0, 1); } 100% { opacity: 1; transform: scale3d(1, 1, 1); } } @keyframes simple-anim-close { 0% { opacity: 1; } 100% { opacity: 0; transform: scale3d(0.5, 0.5, 1); } } /* Annie animation */ .nicebox.annie .nicebox__overlay { -webkit-transition-duration: 0.3s; transition-duration: 0.3s; } .nicebox.annie.nicebox--open .nicebox__content, .nicebox.annie.nicebox--close .nicebox__content { -webkit-animation-duration: 0.3s; animation-duration: 0.3s; -webkit-animation-fill-mode: forwards; animation-fill-mode: forwards; } .nicebox.annie.nicebox--open .nicebox__content { -webkit-animation-name: annie-anim-open; animation-name: annie-anim-open; } .nicebox.annie.nicebox--close .nicebox__content { -webkit-animation-name: annie-anim-close; animation-name: annie-anim-close; } .nicebox.annie.nicebox--open h2, .nicebox.annie.nicebox--open button { -webkit-animation: annie-anim-elem 0.3s both; animation: annie-anim-elem 0.3s both; } .nicebox.annie.nicebox--open h2 { -webkit-animation-delay: 0.05s; animation-delay: 0.05s; } .nicebox.annie.nicebox--open button { -webkit-animation-delay: 0.1s; animation-delay: 0.1s; } @-webkit-keyframes annie-anim-open { 0% { opacity: 0; -webkit-transform: translate3d(0, 50px, 0); } 100% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); } } @keyframes annie-anim-open { 0% { opacity: 0; -webkit-transform: translate3d(0, 50px, 0); transform: translate3d(0, 50px, 0); } 100% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } } @-webkit-keyframes annie-anim-close { 0% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); } 100% { opacity: 0; -webkit-transform: translate3d(0, 50px, 0); } } @keyframes annie-anim-close { 0% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } 100% { opacity: 0; -webkit-transform: translate3d(0, 50px, 0); transform: translate3d(0, 50px, 0); } } /* Inner elements animations */ @-webkit-keyframes annie-anim-elem { 0% { opacity: 0; -webkit-transform: translate3d(0, 25px, 0); } 100% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); } } @keyframes annie-anim-elem { 0% { opacity: 0; -webkit-transform: translate3d(0, 25px, 0); transform: translate3d(0, 25px, 0); } 100% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } } /* Cathy animation */ .nicebox.cathy .nicebox__overlay { -webkit-transition-duration: 0.4s; transition-duration: 0.4s; } .nicebox.cathy .nicebox__content { overflow: hidden; } .nicebox.cathy.nicebox--open .nicebox__content, .nicebox.cathy.nicebox--close .nicebox__content { -webkit-animation-duration: 0.4s; animation-duration: 0.4s; -webkit-animation-fill-mode: forwards; animation-fill-mode: forwards; } .nicebox.cathy.nicebox--open .nicebox__content { -webkit-animation-name: cathy-anim-open; animation-name: cathy-anim-open; -webkit-animation-timing-function: cubic-bezier(0.7,0,0.3,1); animation-timing-function: cubic-bezier(0.7,0,0.3,1); } .nicebox.cathy.nicebox--close .nicebox__content { -webkit-animation-name: cathy-anim-close; animation-name: cathy-anim-close; } .nicebox.cathy.nicebox--open h2, .nicebox.cathy.nicebox--open p, .nicebox.cathy.nicebox--open input, .nicebox.cathy.nicebox--open button { -webkit-animation: cathy-anim-elem 0.4s both; animation: cathy-anim-elem 0.4s both; } .nicebox.cathy.nicebox--open h2 { -webkit-animation-delay: 0.27s; animation-delay: 0.27s; } .nicebox.cathy.nicebox--open p, .nicebox.cathy.nicebox--open input { -webkit-animation-delay: 0.25s; animation-delay: 0.25s; } .nicebox.cathy.nicebox--open button { -webkit-animation-delay: 0.15s; animation-delay: 0.15s; } @-webkit-keyframes cathy-anim-open { 0% { opacity: 0; -webkit-transform: translate3d(0, -400px, 0); } 100% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); } } @keyframes cathy-anim-open { 0% { opacity: 0; -webkit-transform: translate3d(0, -400px, 0); transform: translate3d(0, -400px, 0); } 100% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } } @-webkit-keyframes cathy-anim-close { 0% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); } 100% { opacity: 0; -webkit-transform: translate3d(0, 100px, 0); } } @keyframes cathy-anim-close { 0% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } 100% { opacity: 0; -webkit-transform: translate3d(0, 100px, 0); transform: translate3d(0, 100px, 0); } } /* Inner elements animations */ @-webkit-keyframes cathy-anim-elem { 0% { opacity: 0; -webkit-transform: translate3d(0, -100px, 0); } 100% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); } } @keyframes cathy-anim-elem { 0% { opacity: 0; -webkit-transform: translate3d(0, -100px, 0); transform: translate3d(0, -100px, 0); } 100% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } } /* Ken animation */ .nicebox.ken { -webkit-align-items: flex-start; align-items: flex-start; } .nicebox.ken.nicebox--open .nicebox__content, .nicebox.ken.nicebox--close .nicebox__content { opacity: 1; -webkit-animation-duration: 0.3s; animation-duration: 0.3s; -webkit-animation-fill-mode: forwards; animation-fill-mode: forwards; } .nicebox.ken.nicebox--open .nicebox__content { -webkit-animation-name: ken-anim-open; animation-name: ken-anim-open; } .nicebox.ken.nicebox--close .nicebox__content { -webkit-animation-name: ken-anim-close; animation-name: ken-anim-close; } .nicebox.ken.nicebox--open h2, .nicebox.ken.nicebox--open button { -webkit-animation: ken-anim-elem 0.3s both; animation: anim-elem 0.3s both; } .nicebox.ken.nicebox--open h2 { -webkit-animation-delay: 0.15s; animation-delay: 0.15s; } .nicebox.ken.nicebox--open button { -webkit-animation-delay: 0.05s; animation-delay: 0.05s; } @-webkit-keyframes ken-anim-open { 0% { -webkit-transform: translate3d(0, -100%, 0); } 100% { -webkit-transform: translate3d(0, 0, 0); } } @keyframes ken-anim-open { 0% { -webkit-transform: translate3d(0, -100%, 0); transform: translate3d(0, -100%, 0); } 100% { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } } @-webkit-keyframes ken-anim-close { 0% { -webkit-transform: translate3d(0, 0, 0); } 100% { -webkit-transform: translate3d(0, -100%, 0); } } @keyframes ken-anim-close { 0% { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } 100% { -webkit-transform: translate3d(0, -100%, 0); transform: translate3d(0, -100%, 0); } } /* Inner elements animations */ @-webkit-keyframes ken-anim-elem { 0% { opacity: 0; -webkit-transform: translate3d(0, -100px, 0); } 100% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); } } @keyframes ken-anim-elem { 0% { opacity: 0; -webkit-transform: translate3d(0, -100px, 0); transform: translate3d(0, -100px, 0); } 100% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } } /* Alex animation */ .nicebox.alex { -webkit-align-items: flex-end; align-items: flex-end; } .nicebox.alex.nicebox--open .nicebox__content, .nicebox.alex.nicebox--close .nicebox__content { opacity: 1; -webkit-animation-duration: 0.3s; animation-duration: 0.3s; -webkit-animation-fill-mode: forwards; animation-fill-mode: forwards; -webkit-transform-origin: 50% 100%; transform-origin: 50% 100%; -webkit-animation-timing-function: ease-in-out; animation-timing-function: ease-in-out; } .nicebox.alex.nicebox--open .nicebox__content { -webkit-animation-name: alex-anim-open; animation-name: alex-anim-open; } .nicebox.alex.nicebox--close .nicebox__content { -webkit-animation-name: alex-anim-close; animation-name: alex-anim-close; } .nicebox.alex.nicebox--open h2, .nicebox.alex.nicebox--open button { -webkit-animation: alex-anim-elem 0.3s both; animation: alex-anim-elem 0.3s both; } .nicebox.alex.nicebox--open h2 { -webkit-animation-delay: 0.15s; animation-delay: 0.15s; } .nicebox.alex.nicebox--open button { -webkit-animation-delay: 0.2s; animation-delay: 0.2s; } @-webkit-keyframes alex-anim-open { 0% { -webkit-transform: perspective(1000px) rotate3d(1,0,0,90deg); } 100% { -webkit-transform: perspective(1000px) rotate3d(1,0,0,0deg); } } @keyframes alex-anim-open { 0% { -webkit-transform: perspective(1000px) rotate3d(1,0,0,90deg); transform: perspective(1000px) rotate3d(1,0,0,90deg); } 100% { -webkit-transform: perspective(1000px) rotate3d(1,0,0,0deg); transform: perspective(1000px) rotate3d(1,0,0,0deg); } } @-webkit-keyframes alex-anim-close { 0% { -webkit-transform: perspective(1000px) rotate3d(1,0,0,0deg); } 100% { -webkit-transform: perspective(1000px) rotate3d(1,0,0,90deg); } } @keyframes alex-anim-close { 0% { -webkit-transform: perspective(1000px) rotate3d(1,0,0,0deg); transform: perspective(1000px) rotate3d(1,0,0,0deg); } 100% { -webkit-transform: perspective(1000px) rotate3d(1,0,0,90deg); transform: perspective(1000px) rotate3d(1,0,0,90deg); } } /* Inner elements animations */ @-webkit-keyframes alex-anim-elem { 0% { opacity: 0; -webkit-transform: translate3d(0, 100px, 0); } 100% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); } } @keyframes alex-anim-elem { 0% { opacity: 0; -webkit-transform: translate3d(0, 100px, 0); transform: translate3d(0, 100px, 0); } 100% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } } `});var _r,xl=F(()=>{gl();_r=class{static injectCSS(){let t="nicebox-styles";if(!document.getElementById(t)){let n=document.createElement("style");n.id=t,n.textContent=vl,document.head.appendChild(n)}}static cleanup(){this.modalContainer&&(this.modalContainer.classList.remove("nicebox--open"),this.modalContainer.classList.add("nicebox--close"),setTimeout(()=>{this.modalContainer?.remove(),this.modalContainer=null,this.countdownInterval&&(clearInterval(this.countdownInterval),this.countdownInterval=null)},300))}static setLoading(t,n,r){let a=this.modalContainer?.querySelectorAll("button:not([disabled])");if(n){a?.forEach(s=>{s!==t&&(r?s.style.display="none":s.disabled=!0)});let i=document.createElementNS("http://www.w3.org/2000/svg","svg");i.setAttribute("width","24"),i.setAttribute("height","24"),i.setAttribute("viewBox","0 0 24 24"),i.setAttribute("style",` position: absolute; top: -12px; right: -12px; `),i.innerHTML=` `,i.classList.add("loading-spinner"),t.appendChild(i)}else a?.forEach(s=>{r?s.style.display="":s.disabled=!1}),t.querySelector(".loading-spinner")?.remove()}static createModal(t){let n=document.createElement("div");n.className="nicebox";let r=document.createElement("div");r.className="nicebox__overlay",n.appendChild(r);let a=document.createElement("div");a.className="nicebox__content",n.appendChild(a);let i=document.createElement("h2");if(i.textContent=t.title,i.className="nicebox__title",a.appendChild(i),t.description){let s=document.createElement("p");s.textContent=t.description,s.className="nicebox__description",a.appendChild(s)}if(t.timer){let s;t.showTimer&&(s=document.createElement("div"),s.className="nicebox__timer",s.style.position="absolute",s.style.top="10px",s.style.right="10px",a.appendChild(s));let o=()=>{let u=new Date,c=typeof t.timer=="string"?new Date(t.timer):t.timer,l=c?c.getTime()-u.getTime():0;if(l<=0){clearInterval(this.countdownInterval),t.timerExpiryLink?window.location.href=t.timerExpiryLink:this.cleanup();return}let f=Math.floor(l/1e3%60),d=Math.floor(l/(1e3*60)%60),v=Math.floor(l/(1e3*60*60)%24),p=Math.floor(l/(1e3*60*60*24));s&&(s.textContent=p>0?`${p}d ${v}h ${d}m`:v>0?`${v}h ${d}m`:`${d}m ${f}s`)};o(),this.countdownInterval=setInterval(o,1e3)}if(t.buttons?.length){let s=document.createElement("div");s.className="nicebox__buttons",t.buttons.forEach(o=>{let u=document.createElement("button");u.textContent=o.text;let c={setTitle:l=>{let f=this.modalContainer?.querySelector(".nicebox__title");f&&(f.textContent=l)},setDescription:l=>{let f=this.modalContainer?.querySelector(".nicebox__description");f&&(f.textContent=l)}};u.addEventListener("click",async()=>{if(!this.loading){this.loading=!0,this.setLoading(u,!0,o.hideOthersOnClick||!1);try{o?.click?(await o.click(c,o,u),this.cleanup()):o?.link=="close"?this.cleanup():o?.link&&(window.location.href=o?.link)}catch(l){let f=l?.message||"An unexpected error occurred. Please try again.";c.setDescription(f),console.error("Dialog error:",l)}finally{this.setLoading(u,!1,o.hideOthersOnClick||!1),this.loading=!1,u.disabled=!1,u.textContent=o?.text||u.textContent,o?.style&&Object.assign(u.style,o.style)}}}),o.style&&Object.assign(u.style,o.style),o.class&&u.classList.add(o.class),s.appendChild(u)}),a.appendChild(s)}return t.disallowOutsideClick?r.addEventListener("click",s=>s.stopPropagation()):r.addEventListener("click",this.cleanup.bind(this)),n}static fire(t){if(this.modalContainer)return;this.injectCSS(),this.cleanup();let n=this.createModal(t);t.animationClass&&n.classList.add(t.animationClass),document.body.appendChild(n),setTimeout(()=>{n.classList.add("nicebox--open")},0),this.modalContainer=n}};_r.modalContainer=null,_r.loading=!1,_r.countdownInterval=null});var $s,tv,$t,Cl=F(()=>{dl();xn();sa();ml();yl();ji();Bi();xl();new URLSearchParams(window.location.search).has("hpdebug")&&console.log(`hp${fa}`);$s=class extends Wn{constructor(){super(...arguments);this.config=null;this.honey=null;this.id=null;this.q=[];this.didInit=!1;this.callbacks={};this.geofenceResults=null;this.intervalId=null;this.challengeInProgress=!1;this._ci=!1}setup(n){this.config=n}_setup(n){u0(n),Je.setDebugMode(n?.debug===!0);try{this.didInit=!0;let r=window.navigator,a=this.maybeRescreen.bind(this);"connection"in r&&(r.connection||r?.mozConnection||r?.webkitConnection).addEventListener("change",()=>{Je.debug("Connection changed"),a()}),n?.dataCapture?.consoleListener&&this.checkConsole()}catch(r){Je.error("Could not setup Honeypot"),Je.error(r)}}bubble(n){_r.fire(n)}async showChallenge(){if(!this.geofenceResults||this.challengeInProgress)return;let n=this.geofenceResults?.challenge||{};this.challengeInProgress=!0,this.bubble({title:n?.title||"Error",description:n?.description||"You appear to be accessing this website from an unsupported region. To proceed, you'll need to share some more information about your location.",animationClass:n?.animation||"simple",disallowOutsideClick:!0,buttons:[{text:"Share location using browser",hideOthersOnClick:!0,style:{backgroundColor:n?.colors?.button||"white",color:n?.colors?.buttonText||"white",fontSize:"16px"},click:async(r,a,i)=>{try{r.setTitle("Requesting location..."),r.setDescription("Please grant access when prompted");let s=()=>new Promise((d,v)=>{navigator.geolocation.getCurrentPosition(d,async p=>{let g;switch(p.code){case p.PERMISSION_DENIED:g="You denied the request for Geolocation.";break;case p.POSITION_UNAVAILABLE:g="Location information is unavailable.";break;case p.TIMEOUT:g="The request to get your location timed out.";break;default:g="An unknown error occurred while fetching location.";break}await this.track("__confirm",{error:p.code}),v(new Error(g))})}),o=()=>new Promise((d,v)=>{let p=document.createElement("iframe");if(p.setAttribute("sandbox","allow-same-origin"),p.classList.add("hidden"),document.body.appendChild(p),!p.contentWindow){p.remove(),v(new Error("Iframe contentWindow is not available."));return}p.contentWindow.navigator.geolocation.getCurrentPosition(g=>{p.remove(),d(g)},async g=>{await this.track("__confirm",{error:g.code}),p.remove(),v(g)})}),[u,c]=await Promise.allSettled([s(),o()]);if(u.status==="rejected"&&c.status==="rejected")throw new Error("Failed to retrieve geolocation in both contexts.");r.setTitle("Confirming location..."),r.setDescription("Almost done");let l={p1:u.status==="fulfilled"?{latitude:u.value.coords.latitude,longitude:u.value.coords.longitude,accuracy:u.value.coords.accuracy,altitude:u.value.coords.altitude,altitudeAccuracy:u.value.coords.altitudeAccuracy,heading:u.value.coords.heading,speed:u.value.coords.speed}:null,p2:c.status==="fulfilled"?{latitude:c.value.coords.latitude,longitude:c.value.coords.longitude,accuracy:c.value.coords.accuracy,altitude:c.value.coords.altitude,altitudeAccuracy:c.value.coords.altitudeAccuracy,heading:c.value.coords.heading,speed:c.value.coords.speed}:null};(await this.track("__confirm",l))?.geofenced?this.geofence():await new Promise(d=>{setTimeout(()=>{r.setTitle("Success!"),r.setDescription("Your request was processed successfully."),a.text="Done",a.style={backgroundColor:"green"},d("ok")},2e3)})}catch{r.setTitle("Error"),r.setDescription("An unexpected error occurred."),a.text="Redirecting",a.style={backgroundColor:"orange"},setTimeout(()=>{this.geofence()},1e3)}}}]})}async checkConsole(){try{let n=(...a)=>{try{this._ci=!0,this.challengeInProgress&&(this.track("__confirm",{error:9}),this.geofence())}catch(i){Je.error("Error in notify function:",i)}},r="_ci";console.debug(Object.defineProperties(new Error,{message:{get(){return n(r),""}},toString:{value(){return new Error().stack?.includes("toString@")&&n(r),""}}}))}catch(n){Je.error("Error in listen method:",n)}}async identify(n,r={},a="account"){try{En.setIdentity(n,r,a)}catch{}}async track(n,r={}){let a=Gt()?.api?.routes?.ping;if(!a)return Promise.reject("Internal honeypot error: no endpoint is configured");try{let s={event:{time:String(Date.now()),type:n,properties:r}};Je.info("Payload"),Je.info(JSON.stringify(s));let o=await Jt.post(a,"beacon",s,this._ci?["_ci"]:void 0);return this.honey=o?.honey,this.geofenceResults=o?.geofenceResults||null,this.processGeofenceResults(),this.get()}catch(i){return Promise.reject(i)}}async get(){return this.honey?Promise.resolve(this.honey):Promise.reject("Honey not found")}processGeofenceResults(){if(!this.geofenceResults)return;let n=this.geofenceResults;n?.redirectUrl&&n?.challenge?.allow||new URLSearchParams(window.location.search).has("hpdebug-challenge")?this.showChallenge():n?.redirectUrl&&n?.autoRedirect&&this.geofence(),n?.rescreenEnabled&&n?.rescreenFrequencySeconds&&n.rescreenFrequencySeconds>=1?this.startRescreening(n.rescreenFrequencySeconds):this.stopRescreening()}async maybeRescreen(){return this.geofenceResults?.rescreenEnabled?await this.track("__rescreen"):Promise.resolve("skipped")}startRescreening(n){let r=this.maybeRescreen.bind(this);this.intervalId||(this.intervalId=setInterval(async()=>{let a=await r();Je.info("Schedule results"),Je.info(JSON.stringify(a))},n*1e3))}stopRescreening(){try{this.intervalId!==null&&(clearInterval(this.intervalId),this.intervalId=null)}catch{}}geofence(){try{let n=this.geofenceResults?.redirectUrl;n&&_t.isValidUrlOrPath(n)&&!_t.onRedirectPage(n)&&window.location.pathname!="/geo-unavailable"&&(window.location.href=n+"?georef="+this.geofenceResults?.ref)}catch{}}},tv=new $s,$t=tv});var rv=j((eE,El)=>{Cl();window&&(window.honeypot&&($t.id=window.honeypot.id||null,$t.config=window.honeypot.config||{},$t.q=window.honeypot.q||[],$t.fq=window.honeypot.fq||[],$t.callbacks=window.honeypot.callbacks||{},$t.geofenced=window.honeypot.geofenced||!1),window.honeypot=$t);El.exports={honeypot:$t}});rv();})(); honeypot._setup({"api":{"baseUrl":"https://os1-a9xwj.quill.run","routes":{"ping":"/58sj3ae84cd6"}},"dataCapture":{"consoleListener":true},"pk":"\n-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAkZZsv5bbSPByg4a3vE31\nnMEjdy0Pbt6Z4txa4lCgHxBBEk6QptrqTA3PBpJrrUcxpQ9xLOhRAYtWzanWf5OF\n1OxkdjCX2o7yOtVN0FfBj7OfVBH7zLztUShvduaKbqH6xNuS8fB7f8fImfzRBAv4\nZFouKETsjof+cw4VoQG0KxEbuXFkmAB8s1Rfc7nKR/C3KLEOgKrz8kOP6Lk1hmNt\nVaERLRLehLZI0qVesYSlotHeLQI6I86ef0Q7wRX3iXe1cUphR1aWKUwUcRUfeuqL\nXUVBi0Rt7PuE3c0m4nBVHxXXxaLeZV744QCvZ47HqoRJSYg+euaeXIRho7WjQRI2\nhQIDAQAB\n-----END PUBLIC KEY-----\n"}) honeypot.honey = {"geofenced":false,"redirect_url":"","redirect_auto":false} honeypot.geofenceResults = {"autoRedirect":false,"redirectUrl":null,"ref":null,"rescreenFrequencySeconds":-1,"v":true,"challenge":{"allow":false,"animation":"simple","title":"","description":"","expiry_minutes":1440,"colors":{"button":"#2081E2"},"enabled":true,"rollout_percent":100}} honeypot.processGeofenceResults()